From 7fc8531b767855e69fb4016783a1131ba581fd5b Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu, 3 Aug 2023 07:57:29 -0500 Subject: Merge Made HGOTO_ERROR a do-while loop changes from develop (#3334) --- .clang-format | 1 - .github/workflows/codespell.yml | 4 +- bin/make_err | 8 +- bin/release | 6 +- configure.ac | 13 +- doc/getting-started-with-hdf5-development.md | 8 +- src/H5.c | 14 +- src/H5A.c | 345 ++--- src/H5AC.c | 204 +-- src/H5ACdbg.c | 6 +- src/H5ACmpio.c | 89 +- src/H5ACproxy_entry.c | 57 +- src/H5Abtree2.c | 6 +- src/H5Adense.c | 227 ++-- src/H5Adeprec.c | 38 +- src/H5Aint.c | 276 ++-- src/H5Atest.c | 8 +- src/H5B.c | 156 +-- src/H5B2.c | 182 +-- src/H5B2cache.c | 72 +- src/H5B2dbg.c | 10 +- src/H5B2hdr.c | 55 +- src/H5B2int.c | 138 +- src/H5B2internal.c | 134 +- src/H5B2leaf.c | 76 +- src/H5B2stat.c | 2 +- src/H5B2test.c | 26 +- src/H5Bcache.c | 26 +- src/H5Bdbg.c | 6 +- src/H5C.c | 145 +- src/H5CS.c | 4 +- src/H5CX.c | 164 +-- src/H5Cdbg.c | 70 +- src/H5Centry.c | 353 ++--- src/H5Cimage.c | 142 +- src/H5Cint.c | 124 +- src/H5Clog.c | 70 +- src/H5Clog_json.c | 56 +- src/H5Clog_trace.c | 46 +- src/H5Cmpio.c | 72 +- src/H5Cpkg.h | 38 +- src/H5Cprefetched.c | 6 +- src/H5Cquery.c | 22 +- src/H5Ctag.c | 54 +- src/H5Ctest.c | 8 +- src/H5D.c | 358 ++--- src/H5Dbtree.c | 56 +- src/H5Dbtree2.c | 62 +- src/H5Dchunk.c | 613 ++++----- src/H5Dcompact.c | 64 +- src/H5Dcontig.c | 156 +-- src/H5Ddbg.c | 2 +- src/H5Ddeprec.c | 48 +- src/H5Dearray.c | 94 +- src/H5Defl.c | 46 +- src/H5Dfarray.c | 88 +- src/H5Dfill.c | 63 +- src/H5Dint.c | 563 ++++---- src/H5Dio.c | 190 +-- src/H5Dlayout.c | 62 +- src/H5Dmpio.c | 304 ++--- src/H5Dnone.c | 8 +- src/H5Doh.c | 38 +- src/H5Dpkg.h | 2 +- src/H5Dscatgath.c | 168 +-- src/H5Dselect.c | 72 +- src/H5Dsingle.c | 6 +- src/H5Dtest.c | 14 +- src/H5Dvirtual.c | 365 ++--- src/H5E.c | 172 +-- src/H5EA.c | 74 +- src/H5EAcache.c | 114 +- src/H5EAdbg.c | 26 +- src/H5EAdblkpage.c | 24 +- src/H5EAdblock.c | 31 +- src/H5EAhdr.c | 73 +- src/H5EAiblock.c | 34 +- src/H5EAint.c | 4 +- src/H5EAsblock.c | 28 +- src/H5EAtest.c | 6 +- src/H5ES.c | 70 +- src/H5ESevent.c | 10 +- src/H5ESint.c | 80 +- src/H5Edeprec.c | 40 +- src/H5Eint.c | 16 +- src/H5Eprivate.h | 4 +- src/H5F.c | 379 +++--- src/H5FA.c | 52 +- src/H5FAcache.c | 55 +- src/H5FAdbg.c | 18 +- src/H5FAdblkpage.c | 22 +- src/H5FAdblock.c | 32 +- src/H5FAhdr.c | 45 +- src/H5FAint.c | 4 +- src/H5FAtest.c | 4 +- src/H5FD.c | 328 ++--- src/H5FDcore.c | 102 +- src/H5FDdirect.c | 48 +- src/H5FDfamily.c | 124 +- src/H5FDhdfs.c | 80 +- src/H5FDint.c | 238 ++-- src/H5FDlog.c | 40 +- src/H5FDmpi.c | 12 +- src/H5FDmpio.c | 156 +-- src/H5FDonion.c | 208 +-- src/H5FDonion_header.c | 24 +- src/H5FDonion_history.c | 18 +- src/H5FDonion_index.c | 66 +- src/H5FDperform.c | 2 +- src/H5FDros3.c | 82 +- src/H5FDs3comms.c | 96 +- src/H5FDsec2.c | 36 +- src/H5FDspace.c | 30 +- src/H5FDsplitter.c | 155 +-- src/H5FDwindows.c | 2 +- src/H5FL.c | 80 +- src/H5FO.c | 28 +- src/H5FS.c | 94 +- src/H5FScache.c | 66 +- src/H5FSdbg.c | 10 +- src/H5FSint.c | 4 +- src/H5FSsection.c | 182 +-- src/H5Faccum.c | 54 +- src/H5Fcwfs.c | 7 +- src/H5Fdbg.c | 4 +- src/H5Fdeprec.c | 18 +- src/H5Fefc.c | 53 +- src/H5Ffake.c | 4 +- src/H5Fint.c | 480 +++---- src/H5Fio.c | 40 +- src/H5Fmount.c | 56 +- src/H5Fmpi.c | 22 +- src/H5Fquery.c | 12 +- src/H5Fsfile.c | 4 +- src/H5Fspace.c | 14 +- src/H5Fsuper.c | 219 +-- src/H5Fsuper_cache.c | 98 +- src/H5Ftest.c | 22 +- src/H5G.c | 114 +- src/H5Gbtree2.c | 6 +- src/H5Gcache.c | 14 +- src/H5Gcompact.c | 36 +- src/H5Gdense.c | 150 +-- src/H5Gdeprec.c | 148 +-- src/H5Gent.c | 40 +- src/H5Gint.c | 148 +-- src/H5Glink.c | 20 +- src/H5Gloc.c | 106 +- src/H5Gname.c | 54 +- src/H5Gnode.c | 92 +- src/H5Gobj.c | 170 +-- src/H5Goh.c | 38 +- src/H5Groot.c | 28 +- src/H5Gstab.c | 104 +- src/H5Gtest.c | 116 +- src/H5Gtraverse.c | 98 +- src/H5HF.c | 104 +- src/H5HFbtree2.c | 10 +- src/H5HFcache.c | 179 +-- src/H5HFdbg.c | 36 +- src/H5HFdblock.c | 65 +- src/H5HFdtable.c | 8 +- src/H5HFhdr.c | 159 +-- src/H5HFhuge.c | 103 +- src/H5HFiblock.c | 180 +-- src/H5HFiter.c | 22 +- src/H5HFman.c | 80 +- src/H5HFsection.c | 214 +-- src/H5HFspace.c | 37 +- src/H5HFstat.c | 8 +- src/H5HFtiny.c | 10 +- src/H5HG.c | 56 +- src/H5HGcache.c | 24 +- src/H5HLcache.c | 32 +- src/H5HLdbg.c | 4 +- src/H5HLdblk.c | 6 +- src/H5HLint.c | 2 +- src/H5HLprfx.c | 6 +- src/H5I.c | 78 +- src/H5Iint.c | 82 +- src/H5Itest.c | 10 +- src/H5L.c | 308 ++--- src/H5Ldeprec.c | 110 +- src/H5Lexternal.c | 46 +- src/H5Lint.c | 177 +-- src/H5M.c | 150 +-- src/H5MF.c | 223 ++-- src/H5MFaggr.c | 70 +- src/H5MFdbg.c | 16 +- src/H5MFsection.c | 40 +- src/H5MM.c | 10 +- src/H5O.c | 288 ++-- src/H5Oainfo.c | 14 +- src/H5Oalloc.c | 156 +-- src/H5Oattr.c | 60 +- src/H5Oattribute.c | 233 ++-- src/H5Obogus.c | 4 +- src/H5Obtreek.c | 6 +- src/H5Ocache.c | 105 +- src/H5Ocache_image.c | 12 +- src/H5Ochunk.c | 32 +- src/H5Ocont.c | 2 +- src/H5Ocopy.c | 139 +- src/H5Ocopy_ref.c | 78 +- src/H5Odbg.c | 8 +- src/H5Odeprec.c | 178 +-- src/H5Odrvinfo.c | 10 +- src/H5Odtype.c | 139 +- src/H5Oefl.c | 44 +- src/H5Ofill.c | 60 +- src/H5Oflush.c | 60 +- src/H5Ofsinfo.c | 14 +- src/H5Oginfo.c | 16 +- src/H5Oint.c | 248 ++-- src/H5Olayout.c | 216 +-- src/H5Olinfo.c | 26 +- src/H5Olink.c | 80 +- src/H5Omessage.c | 124 +- src/H5Omtime.c | 6 +- src/H5Oname.c | 8 +- src/H5Opkg.h | 4 +- src/H5Opline.c | 50 +- src/H5Orefcount.c | 10 +- src/H5Osdspace.c | 38 +- src/H5Oshared.c | 40 +- src/H5Oshared.h | 38 +- src/H5Oshmesg.c | 4 +- src/H5Ostab.c | 10 +- src/H5Otest.c | 64 +- src/H5P.c | 72 +- src/H5PB.c | 89 +- src/H5PL.c | 52 +- src/H5PLint.c | 36 +- src/H5PLpath.c | 56 +- src/H5PLplugin_cache.c | 12 +- src/H5Pdapl.c | 74 +- src/H5Pdcpl.c | 396 +++--- src/H5Pdeprec.c | 28 +- src/H5Pdxpl.c | 250 ++-- src/H5Pencdec.c | 28 +- src/H5Pfapl.c | 670 +++++----- src/H5Pfcpl.c | 120 +- src/H5Pfmpl.c | 2 +- src/H5Pgcpl.c | 58 +- src/H5Pint.c | 292 ++-- src/H5Plapl.c | 80 +- src/H5Plcpl.c | 10 +- src/H5Pmapl.c | 4 +- src/H5Pocpl.c | 188 +-- src/H5Pocpypl.c | 60 +- src/H5Pstrcpl.c | 12 +- src/H5Ptest.c | 2 +- src/H5R.c | 236 ++-- src/H5RS.c | 32 +- src/H5Rdeprec.c | 146 +- src/H5Rint.c | 146 +- src/H5S.c | 172 +-- src/H5SL.c | 34 +- src/H5SM.c | 262 ++-- src/H5SMbtree2.c | 2 +- src/H5SMcache.c | 22 +- src/H5SMmessage.c | 8 +- src/H5SMtest.c | 4 +- src/H5Sall.c | 20 +- src/H5Sdeprec.c | 6 +- src/H5Shyper.c | 649 ++++----- src/H5Smpio.c | 99 +- src/H5Snone.c | 18 +- src/H5Spoint.c | 108 +- src/H5Sselect.c | 249 ++-- src/H5Stest.c | 28 +- src/H5T.c | 405 +++--- src/H5Tarray.c | 44 +- src/H5Tbit.c | 4 +- src/H5Tcommit.c | 199 +-- src/H5Tcompound.c | 58 +- src/H5Tconv.c | 1826 ++++++++++---------------- src/H5Tcset.c | 12 +- src/H5Tdeprec.c | 22 +- src/H5Tenum.c | 72 +- src/H5Tfields.c | 20 +- src/H5Tfixed.c | 14 +- src/H5Tfloat.c | 56 +- src/H5Tnative.c | 148 +-- src/H5Toffset.c | 20 +- src/H5Toh.c | 14 +- src/H5Topaque.c | 16 +- src/H5Torder.c | 28 +- src/H5Tpad.c | 14 +- src/H5Tprecis.c | 30 +- src/H5Tref.c | 114 +- src/H5Tstrpad.c | 12 +- src/H5Tvisit.c | 12 +- src/H5Tvlen.c | 54 +- src/H5UC.c | 4 +- src/H5VL.c | 132 +- src/H5VLcallback.c | 990 +++++++------- src/H5VLdyn_ops.c | 20 +- src/H5VLint.c | 291 ++-- src/H5VLnative.c | 44 +- src/H5VLnative_attr.c | 106 +- src/H5VLnative_blob.c | 10 +- src/H5VLnative_dataset.c | 130 +- src/H5VLnative_datatype.c | 34 +- src/H5VLnative_file.c | 108 +- src/H5VLnative_group.c | 50 +- src/H5VLnative_introspect.c | 28 +- src/H5VLnative_link.c | 76 +- src/H5VLnative_object.c | 102 +- src/H5VLnative_token.c | 6 +- src/H5VLtest.c | 2 +- src/H5VM.c | 8 +- src/H5WB.c | 6 +- src/H5Z.c | 139 +- src/H5Zdeflate.c | 18 +- src/H5Zfletcher32.c | 4 +- src/H5Znbit.c | 148 +-- src/H5Zscaleoffset.c | 98 +- src/H5Zshuffle.c | 14 +- src/H5Zszip.c | 40 +- src/H5Ztrans.c | 109 +- src/H5detect.c | 4 +- src/H5mpi.c | 28 +- src/H5private.h | 4 +- src/H5system.c | 38 +- 325 files changed, 14583 insertions(+), 14849 deletions(-) diff --git a/.clang-format b/.clang-format index dfbfc2e..0d59087 100644 --- a/.clang-format +++ b/.clang-format @@ -85,7 +85,6 @@ StatementMacros: - H5_GCC_DIAG_ON - H5_LEAVE - HGOTO_DONE - - HGOTO_ERROR - HMPI_DONE_ERROR - HMPI_ERROR - HMPI_GOTO_ERROR diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 37294bf..5640224 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -13,5 +13,5 @@ jobs: - uses: actions/checkout@v3 - uses: codespell-project/actions-codespell@master with: - skip: ./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5repack/testfiles/*.dat,./test/API/driver - ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum,ake,gord,numer,ro,oce,msdos + skip: ./.github/workflows/codespell.yml,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html + ignore_words_list: ot,isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,ake,gord,numer,ro,oce,msdos diff --git a/bin/make_err b/bin/make_err index 0bb89a1..eb9e909 100755 --- a/bin/make_err +++ b/bin/make_err @@ -243,9 +243,9 @@ sub create_init ($) { foreach $name (keys %major) { print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n"; print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n"; - print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n"; + print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n"; print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n"; - print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n"; + print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n"; } # Iterate over all the minor error sections @@ -259,9 +259,9 @@ sub create_init ($) { for $name ( @{$section_list{$sect_name}}) { print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n"; print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n"; - print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\")\n"; + print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n"; print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n"; - print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\")\n"; + print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n"; } } diff --git a/bin/release b/bin/release index 5e34db7..41f922b 100755 --- a/bin/release +++ b/bin/release @@ -206,7 +206,7 @@ tar2cmakezip() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.zip $cmziptmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_1.zip $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_2.zip $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir @@ -298,7 +298,7 @@ tar2cmaketgz() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_1.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_2.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir @@ -377,7 +377,7 @@ tar2hpccmaketgz() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_1.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_14_2.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir diff --git a/configure.ac b/configure.ac index e7cb8aa..e2e2d33 100644 --- a/configure.ac +++ b/configure.ac @@ -81,14 +81,21 @@ AM_MAINTAINER_MODE([enable]) ## This allows multiple src-dir builds within one host. AC_PREFIX_DEFAULT([`pwd`/hdf5]) -## Run post processing on files created by configure. +## Run post processing on files created by configure +## ## src/H5pubconf.h: ## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all ## macro names. This avoid name conflict between HDF5 macro names and those ## generated by another software package that uses the HDF5 library. +## ## src/libhdf5.settings: -## Remove all lines begun with "#" which are generated by CONDITIONAL's of -## configure. +## Remove all lines beginning with "#" which are generated by CONDITIONAL's +## of configure. +## +## src/H5build_settings.c +## Remove all lines beginning with "#" which are generated by CONDITIONAL's +## of configure. This uses a check for whitespace after the pound sign +## to avoid clobbering include statements. AC_CONFIG_COMMANDS([pubconf], [ echo "creating src/H5pubconf.h" sed 's/#define /#define H5_/' , H5E_, , "tell me about badness") + HGOTO_ERROR(H5E_, H5E_, , "tell me about badness"); ``` `HGOTO_ERROR` is one of a set of macros defined in `H5Eprivate.h`. This macro diff --git a/src/H5.c b/src/H5.c index 56beb8a..10617bc 100644 --- a/src/H5.c +++ b/src/H5.c @@ -115,7 +115,7 @@ H5_default_vfd_init(void) * it has of initializing the default VFD. */ if (H5FD_sec2_init() == H5I_INVALID_HID) { - HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to load default VFD ID") + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to load default VFD ID"); } done: FUNC_LEAVE_NOAPI(ret_value) @@ -267,7 +267,7 @@ H5_init_library(void) for (i = 0; i < NELMTS(initializer); i++) { if (initializer[i].func() < 0) { HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, - "unable to initialize %s interface", initializer[i].descr) + "unable to initialize %s interface", initializer[i].descr); } } /* clang-format on */ @@ -576,7 +576,7 @@ H5garbage_collect(void) /* Call the garbage collection routines in the library */ if (H5FL_garbage_coll() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect objects") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect objects"); done: FUNC_LEAVE_API(ret_value) @@ -622,7 +622,7 @@ H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim, /* Call the free list function to actually set the limits */ if (H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim, blk_global_lim, blk_list_lim) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "can't set garbage collection limits") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "can't set garbage collection limits"); done: FUNC_LEAVE_API(ret_value) @@ -658,7 +658,7 @@ H5get_free_list_sizes(size_t *reg_size /*out*/, size_t *arr_size /*out*/, size_t /* Call the free list function to actually get the sizes */ if (H5FL_get_free_list_sizes(reg_size, arr_size, blk_size, fac_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get garbage collection sizes") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get garbage collection sizes"); done: FUNC_LEAVE_API(ret_value) @@ -1052,11 +1052,11 @@ H5atclose(H5_atclose_func_t func, void *ctx) /* Check arguments */ if (NULL == func) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL func pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL func pointer"); /* Allocate space for the 'atclose' node */ if (NULL == (new_atclose = H5FL_MALLOC(H5_atclose_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate 'atclose' node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate 'atclose' node"); /* Set up 'atclose' node */ new_atclose->func = func; diff --git a/src/H5A.c b/src/H5A.c index 5f394dd..cbb577d 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -126,11 +126,11 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const /* Create the attribute */ if (NULL == (attr = H5VL_attr_create(vol_obj, loc_params, attr_name, type_id, space_id, acpl_id, aapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute"); /* Register the new attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID"); done: /* Cleanup on failure */ @@ -165,15 +165,15 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be NULL"); if (!*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, TRUE, &aapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Get correct property list */ if (H5P_DEFAULT == acpl_id) @@ -182,7 +182,7 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t /* Create the attribute */ if ((ret_value = H5A__create_common(*vol_obj_ptr, &loc_params, attr_name, type_id, space_id, acpl_id, aapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -232,7 +232,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, h /* Create the attribute synchronously */ if ((ret_value = H5A__create_api_common(loc_id, attr_name, type_id, space_id, acpl_id, aapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create attribute"); done: FUNC_LEAVE_API(ret_value) @@ -269,7 +269,7 @@ H5Acreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* Create the attribute asynchronously */ if ((ret_value = H5A__create_api_common(loc_id, attr_name, type_id, space_id, acpl_id, aapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -279,7 +279,7 @@ H5Acreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID"); - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -311,20 +311,20 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be NULL"); if (!*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string"); /* obj_name is verified in H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info"); /* Get correct property list */ if (H5P_DEFAULT == acpl_id) @@ -333,7 +333,7 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a /* Create the attribute */ if ((ret_value = H5A__create_common(*vol_obj_ptr, &loc_params, attr_name, type_id, space_id, acpl_id, aapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -381,7 +381,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid /* Create the attribute synchronously */ if ((ret_value = H5A__create_by_name_api_common(loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create attribute"); done: FUNC_LEAVE_API(ret_value) @@ -418,7 +418,7 @@ H5Acreate_by_name_async(const char *app_file, const char *app_func, unsigned app /* Create the attribute asynchronously */ if ((ret_value = H5A__create_by_name_api_common(loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -428,7 +428,7 @@ H5Acreate_by_name_async(const char *app_file, const char *app_func, unsigned app /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID"); - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -461,11 +461,11 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch /* Open the attribute */ if (NULL == (attr = H5VL_attr_open(vol_obj, loc_params, attr_name, aapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name) + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name); /* Register the attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID"); done: /* Cleanup on failure */ @@ -500,19 +500,19 @@ H5A__open_api_common(hid_t loc_id, const char *attr_name, hid_t aapl_id, void ** /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, FALSE, &aapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open the attribute */ if ((ret_value = H5A__open_common(*vol_obj_ptr, &loc_params, attr_name, aapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name) + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name); done: FUNC_LEAVE_NOAPI(ret_value) @@ -547,7 +547,7 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t aapl_id) /* Open the attribute synchronously */ if ((ret_value = H5A__open_api_common(loc_id, attr_name, aapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open attribute"); done: FUNC_LEAVE_API(ret_value) @@ -581,7 +581,7 @@ H5Aopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the attribute asynchronously */ if ((ret_value = H5A__open_api_common(loc_id, attr_name, aapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -591,7 +591,7 @@ H5Aopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID"); - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -622,23 +622,23 @@ H5A__open_by_name_api_common(hid_t loc_id, const char *obj_name, const char *att /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no attribute name"); /* obj_name is verified in H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info"); /* Open the attribute */ if ((ret_value = H5A__open_common(*vol_obj_ptr, &loc_params, attr_name, aapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name) + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name); done: FUNC_LEAVE_NOAPI(ret_value) @@ -676,7 +676,7 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t /* Open the attribute by name asynchronously */ if ((ret_value = H5A__open_by_name_api_common(loc_id, obj_name, attr_name, aapl_id, lapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open attribute"); done: FUNC_LEAVE_API(ret_value) @@ -712,7 +712,7 @@ H5Aopen_by_name_async(const char *app_file, const char *app_func, unsigned app_l /* Open the attribute by name asynchronously */ if ((ret_value = H5A__open_by_name_api_common(loc_id, obj_name, attr_name, aapl_id, lapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -722,7 +722,7 @@ H5Aopen_by_name_async(const char *app_file, const char *app_func, unsigned app_l /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID"); - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -754,26 +754,26 @@ H5A__open_by_idx_api_common(hid_t loc_id, const char *obj_name, H5_index_t idx_t /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no object name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no object name"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified"); /* Set up object access arguments */ if (H5VL_setup_idx_args(loc_id, obj_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info"); /* Open the attribute */ if ((ret_value = H5A__open_common(*vol_obj_ptr, &loc_params, NULL, aapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -815,7 +815,7 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_ /* Open the attribute by idx synchronously */ if ((ret_value = H5A__open_by_idx_api_common(loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open attribute"); done: FUNC_LEAVE_API(ret_value) @@ -852,7 +852,7 @@ H5Aopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li /* Open the attribute by idx asynchronously */ if ((ret_value = H5A__open_by_idx_api_common(loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -862,7 +862,7 @@ H5Aopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID"); - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -890,17 +890,17 @@ H5A__write_api_common(hid_t attr_id, hid_t type_id, const void *buf, void **toke /* Check arguments */ if (H5I_DATATYPE != H5I_get_type(type_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf parameter can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf parameter can't be NULL"); /* Get attribute pointer */ if (H5VL_setup_args(attr_id, H5I_ATTR, vol_obj_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get VOL object for attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get VOL object for attribute"); /* Write the attribute data */ if (H5VL_attr_write(*vol_obj_ptr, type_id, buf, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -932,7 +932,7 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf) /* Synchronously write the data */ if (H5A__write_api_common(attr_id, dtype_id, buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "can't synchronously write data") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "can't synchronously write data"); done: FUNC_LEAVE_API(ret_value) @@ -964,7 +964,7 @@ H5Awrite_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Asynchronously write the data */ if (H5A__write_api_common(attr_id, dtype_id, buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "can't asynchronously write data") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "can't asynchronously write data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -972,7 +972,7 @@ H5Awrite_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIuii*xi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -998,17 +998,17 @@ H5A__read_api_common(hid_t attr_id, hid_t dtype_id, void *buf, void **token_ptr, /* Check arguments */ if (H5I_DATATYPE != H5I_get_type(dtype_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf parameter can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf parameter can't be NULL"); /* Get attribute object pointer */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); /* Read the attribute data */ if (H5VL_attr_read(*vol_obj_ptr, dtype_id, buf, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute") + HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1040,7 +1040,7 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf /*out*/) /* Synchronously read the data */ if (H5A__read_api_common(attr_id, dtype_id, buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't synchronously read data") + HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't synchronously read data"); done: FUNC_LEAVE_API(ret_value) @@ -1072,7 +1072,7 @@ H5Aread_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Asynchronously read the data */ if (H5A__read_api_common(attr_id, dtype_id, buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't asynchronously read data") + HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "can't asynchronously read data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1080,7 +1080,7 @@ H5Aread_async(const char *app_file, const char *app_func, unsigned app_line, hid if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIuiixi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1114,7 +1114,7 @@ H5Aget_space(hid_t attr_id) /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_SPACE; @@ -1122,7 +1122,7 @@ H5Aget_space(hid_t attr_id) /* Get the dataspace */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace of attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace of attribute"); /* Set the return value */ ret_value = vol_cb_args.args.get_space.space_id; @@ -1159,7 +1159,7 @@ H5Aget_type(hid_t attr_id) /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_TYPE; @@ -1167,7 +1167,7 @@ H5Aget_type(hid_t attr_id) /* Get the datatype */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5I_INVALID_HID, "unable to get datatype of attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5I_INVALID_HID, "unable to get datatype of attribute"); /* Set the return value */ ret_value = vol_cb_args.args.get_type.type_id; @@ -1209,7 +1209,7 @@ H5Aget_create_plist(hid_t attr_id) /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an attribute"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_ACPL; @@ -1218,7 +1218,7 @@ H5Aget_create_plist(hid_t attr_id) /* Get the acpl */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5I_INVALID_HID, - "unable to get creation property list for attribute") + "unable to get creation property list for attribute"); /* Set the return value */ ret_value = vol_cb_args.args.get_acpl.acpl_id; @@ -1261,9 +1261,9 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf /*out*/) /* check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an attribute"); if (!buf && buf_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "buf cannot be NULL if buf_size is non-zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "buf cannot be NULL if buf_size is non-zero"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_NAME; @@ -1275,7 +1275,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf /*out*/) /* Get the attribute name */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute name") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute name"); /* Set the return value */ ret_value = (ssize_t)attr_name_len; @@ -1312,23 +1312,23 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i /* Check args */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); if (!name && size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name cannot be NULL if size is non-zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name cannot be NULL if size is non-zero"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_NAME; @@ -1345,7 +1345,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i /* Get the name */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get name") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get name"); /* Set the return value */ ret_value = (ssize_t)attr_name_len; @@ -1381,7 +1381,7 @@ H5Aget_storage_size(hid_t attr_id) /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not an attribute"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_STORAGE_SIZE; @@ -1389,7 +1389,7 @@ H5Aget_storage_size(hid_t attr_id) /* Get the storage size */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, 0, "unable to get storage size") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, 0, "unable to get storage size"); /* Set the return value */ ret_value = storage_size; @@ -1420,9 +1420,9 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); if (!ainfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "attribute_info parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "attribute_info parameter cannot be NULL"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_INFO; @@ -1433,7 +1433,7 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/) /* Get the attribute information */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info"); done: FUNC_LEAVE_API(ret_value) @@ -1462,21 +1462,21 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H /* Check args */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name"); if (NULL == ainfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_INFO; @@ -1489,7 +1489,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H /* Get the attribute information */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info"); done: FUNC_LEAVE_API(ret_value) @@ -1519,23 +1519,23 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i /* Check args */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (NULL == ainfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_GET_INFO; @@ -1551,7 +1551,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i /* Get the attribute information */ if (H5VL_attr_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info"); done: FUNC_LEAVE_API(ret_value) @@ -1591,7 +1591,7 @@ H5A__rename_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const /* Rename the attribute */ if (H5VL_attr_specific(vol_obj, loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute from '%s' to '%s'", old_name, - new_name) + new_name); } done: @@ -1620,23 +1620,23 @@ H5A__rename_api_common(hid_t loc_id, const char *old_name, const char *new_name, /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!old_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be NULL"); if (!*old_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be an empty string"); if (!new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be NULL"); if (!*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_loc_args(loc_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Rename the attribute */ if (H5A__rename_common(*vol_obj_ptr, &loc_params, old_name, new_name, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1662,7 +1662,7 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name) /* Synchronously rename the attribute */ if (H5A__rename_api_common(loc_id, old_name, new_name, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute"); done: FUNC_LEAVE_API(ret_value) @@ -1694,7 +1694,7 @@ H5Arename_async(const char *app_file, const char *app_func, unsigned app_line, h /* Asynchronously rename the attribute */ if (H5A__rename_api_common(loc_id, old_name, new_name, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't asynchronously rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't asynchronously rename attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1702,7 +1702,7 @@ H5Arename_async(const char *app_file, const char *app_func, unsigned app_line, h if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*s*si", app_file, app_func, app_line, loc_id, old_name, new_name, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1730,25 +1730,25 @@ H5A__rename_by_name_api_common(hid_t loc_id, const char *obj_name, const char *o /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!old_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be NULL"); if (!*old_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "old attribute name cannot be an empty string"); if (!new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be NULL"); if (!*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new attribute name cannot be an empty string"); /* obj_name is verified in H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Rename the attribute */ if (H5A__rename_common(*vol_obj_ptr, &loc_params, old_name, new_name, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1776,7 +1776,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, /* Synchronously rename the attribute */ if (H5A__rename_by_name_api_common(loc_id, obj_name, old_attr_name, new_attr_name, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute"); done: FUNC_LEAVE_API(ret_value) @@ -1811,7 +1811,7 @@ H5Arename_by_name_async(const char *app_file, const char *app_func, unsigned app /* Asynchronously rename the attribute */ if (H5A__rename_by_name_api_common(loc_id, obj_name, old_attr_name, new_attr_name, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't synchronously rename attribute"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1819,7 +1819,7 @@ H5Arename_by_name_async(const char *app_file, const char *app_func, unsigned app if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*s*s*sii", app_file, app_func, app_line, loc_id, obj_name, old_attr_name, new_attr_name, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1880,15 +1880,15 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *i /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Get the loc object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set the location access parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1968,21 +1968,21 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* get the loc object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set the location access parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -2034,19 +2034,19 @@ H5Adelete(hid_t loc_id, const char *name) /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read"); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set the location access parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -2058,7 +2058,7 @@ H5Adelete(hid_t loc_id, const char *name) /* Delete the attribute */ if (H5VL_attr_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); done: FUNC_LEAVE_API(ret_value) @@ -2093,19 +2093,19 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set the location access parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -2119,7 +2119,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid /* Delete the attribute */ if (H5VL_attr_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); done: FUNC_LEAVE_API(ret_value) @@ -2163,21 +2163,21 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_ite /* check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info"); /* get the object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set the location access parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -2193,7 +2193,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_ite /* Delete the attribute */ if (H5VL_attr_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); done: FUNC_LEAVE_API(ret_value) @@ -2220,13 +2220,13 @@ H5Aclose(hid_t attr_id) /* Check arguments */ if (H5I_ATTR != H5I_get_type(attr_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute ID"); /* Decrement the counter on the attribute ID. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(attr_id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "decrementing attribute ID failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "decrementing attribute ID failed"); done: FUNC_LEAVE_API(ret_value) @@ -2255,13 +2255,13 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check arguments */ if (H5I_ATTR != H5I_get_type(attr_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a attribute ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a attribute ID"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { /* Get attribute object's connector */ if (NULL == (vol_obj = H5VL_vol_object(attr_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get VOL object for attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get VOL object for attribute"); /* Increase connector's refcount, so it doesn't get closed if closing * the attribute closes the file */ @@ -2276,7 +2276,7 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * reaches zero. */ if (H5I_dec_app_ref_async(attr_id, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "decrementing attribute ID failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "decrementing attribute ID failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -2284,7 +2284,7 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, attr_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -2316,7 +2316,7 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const /* Check arguments */ if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_ATTR_EXISTS; @@ -2325,7 +2325,7 @@ H5A__exists_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const /* Check if the attribute exists */ if (H5VL_attr_specific(vol_obj, loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2353,19 +2353,19 @@ H5A__exists_api_common(hid_t obj_id, const char *attr_name, hbool_t *attr_exists /* Check arguments */ if (H5I_ATTR == H5I_get_type(obj_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name"); if (NULL == attr_exists) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for attribute existence") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for attribute existence"); /* Set up object access arguments */ if (H5VL_setup_self_args(obj_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Check if the attribute exists */ if (H5A__exists_common(*vol_obj_ptr, &loc_params, attr_name, attr_exists, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2394,7 +2394,7 @@ H5Aexists(hid_t obj_id, const char *attr_name) /* Synchronously check if an attribute exists */ exists = FALSE; if (H5A__exists_api_common(obj_id, attr_name, &exists, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously check if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously check if attribute exists"); /* Set return value */ ret_value = (htri_t)exists; @@ -2429,7 +2429,7 @@ H5Aexists_async(const char *app_file, const char *app_func, unsigned app_line, h /* Asynchronously check if an attribute exists */ if (H5A__exists_api_common(obj_id, attr_name, attr_exists, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't asynchronously check if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't asynchronously check if attribute exists"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -2437,7 +2437,7 @@ H5Aexists_async(const char *app_file, const char *app_func, unsigned app_line, h if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*s*bi", app_file, app_func, app_line, obj_id, attr_name, attr_exists, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -2466,20 +2466,20 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "location is not valid for an attribute"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name"); if (NULL == attr_exists) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for attribute existence") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for attribute existence"); /* obj_name is verified in H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Check if the attribute exists */ if (H5A__exists_common(*vol_obj_ptr, &loc_params, attr_name, attr_exists, token_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2507,7 +2507,7 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid /* Synchronously check if an attribute exists */ exists = FALSE; if (H5A__exists_by_name_api_common(loc_id, obj_name, attr_name, &exists, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously determine if attribute exists by name") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously determine if attribute exists by name"); /* Set return value */ ret_value = (htri_t)exists; @@ -2545,7 +2545,8 @@ H5Aexists_by_name_async(const char *app_file, const char *app_func, unsigned app /* Asynchronously check if an attribute exists */ if (H5A__exists_by_name_api_common(loc_id, obj_name, attr_name, attr_exists, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't asynchronously determine if attribute exists by name") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, + "can't asynchronously determine if attribute exists by name"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -2553,7 +2554,7 @@ H5Aexists_by_name_async(const char *app_file, const char *app_func, unsigned app if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*s*s*bii", app_file, app_func, app_line, loc_id, obj_name, attr_name, attr_exists, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5AC.c b/src/H5AC.c index 09b6835..f698bfe 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -243,9 +243,9 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co /* Validate configurations */ if (H5AC_validate_config(config_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache configuration") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache configuration"); if (H5AC_validate_cache_image_config(image_config_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache image configuration") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache image configuration"); #ifdef H5_HAVE_PARALLEL if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { @@ -254,16 +254,16 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co int mpi_size; if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator"); if ((mpi_rank = H5F_mpi_get_rank(f)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi rank") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi rank"); if ((mpi_size = H5F_mpi_get_size(f)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi size") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi size"); if (NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxiliary structure") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxiliary structure"); aux_ptr->mpi_comm = mpi_comm; aux_ptr->mpi_rank = mpi_rank; @@ -292,10 +292,10 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co if (mpi_rank == 0) { if (NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list"); if (NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list"); } /* end if */ /* construct the candidate skip list for all processes. @@ -303,7 +303,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co * will use it in the case of a flush. */ if (NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list"); if (aux_ptr->mpi_rank == 0) f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, @@ -328,12 +328,12 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co #endif /* H5_HAVE_PARALLEL */ if (NULL == f->shared->cache) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed"); #ifdef H5_HAVE_PARALLEL if (aux_ptr != NULL) if (H5C_set_prefix(f->shared->cache, prefix) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "H5C_set_prefix() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "H5C_set_prefix() failed"); #endif /* H5_HAVE_PARALLEL */ /* Turn on metadata cache logging, if being used @@ -343,11 +343,11 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co if (H5F_USE_MDC_LOGGING(f)) if (H5C_log_set_up(f->shared->cache, H5F_MDC_LOG_LOCATION(f), H5C_LOG_STYLE_JSON, H5F_START_MDC_LOG_ON_ACCESS(f)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging setup failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging setup failed"); /* Set the cache parameters */ if (H5AC_set_cache_auto_resize_config(f->shared->cache, config_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed"); /* Don't need to get the current H5C image config here since the * cache has just been created, and thus f->shared->cache->image_ctl @@ -360,7 +360,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co int_ci_config.save_resize_status = image_config_ptr->save_resize_status; int_ci_config.entry_ageout = image_config_ptr->entry_ageout; if (H5C_set_cache_image_config(f, f->shared->cache, &int_ci_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "auto resize configuration failed"); done: /* If currently logging, generate a message */ @@ -421,22 +421,22 @@ H5AC_dest(H5F_t *f) /* Check if log messages are being emitted */ if (H5C_get_logging_status(f->shared->cache, &log_enabled, &curr_logging) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to get logging status") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to get logging status"); /* Tear down logging */ if (log_enabled) { if (curr_logging) if (H5C_log_write_destroy_cache_msg(f->shared->cache) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); if (H5C_log_tear_down(f->shared->cache) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "metadata cache logging tear-down failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "metadata cache logging tear-down failed"); } /* end if */ #ifdef H5_HAVE_PARALLEL /* destroying the cache, so clear all collective entries */ if (H5C_clear_coll_entries(f->shared->cache, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't clear collective entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't clear collective entries"); aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache); if (aux_ptr) { @@ -460,21 +460,21 @@ H5AC_dest(H5F_t *f) if (H5F_ACC_RDWR & H5F_INTENT(f)) { /* enable and load the skip list */ if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list"); if (H5AC__flush_entries(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush"); /* disable the skip list -- should be empty */ if (H5C_set_slist_enabled(f->shared->cache, FALSE, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list"); } /* end if */ } /* end if */ #endif /* H5_HAVE_PARALLEL */ /* Destroy the cache */ if (H5C_dest(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache"); f->shared->cache = NULL; @@ -527,7 +527,7 @@ H5AC_evict(H5F_t *f) /* Evict all entries in the cache except the pinned superblock entry */ if (H5C_evict(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't evict cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't evict cache"); done: /* If currently logging, generate a message */ @@ -565,7 +565,7 @@ H5AC_expunge_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, unsigned fl assert(H5_addr_defined(addr)); if (H5C_expunge_entry(f, type, addr, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed"); done: /* If currently logging, generate a message */ @@ -607,17 +607,17 @@ H5AC_flush(H5F_t *f) #ifdef H5_HAVE_PARALLEL /* flushing the cache, so clear all collective entries */ if (H5C_clear_coll_entries(f->shared->cache, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed"); /* Attempt to flush all entries from rank 0 & Bcast clean list to other ranks */ if (H5AC__flush_entries(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush"); #endif /* H5_HAVE_PARALLEL */ /* Flush the cache */ /* (Again, in parallel - writes out the superblock) */ if (H5C_flush_cache(f, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache"); done: /* If currently logging, generate a message */ @@ -662,11 +662,11 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status) FUNC_ENTER_NOAPI(FAIL) if ((f == NULL) || (!H5_addr_defined(addr)) || (status == NULL)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry"); if (H5C_get_entry_status(f, addr, NULL, &in_cache, &is_dirty, &is_protected, &is_pinned, &is_corked, &is_flush_dep_parent, &is_flush_dep_child, &image_is_up_to_date) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed"); if (in_cache) { *status |= H5AC_ES__IN_CACHE; @@ -721,16 +721,16 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file"); #if H5AC_DO_TAGGING_SANITY_CHECKS if (!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(type) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Bad tag value") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Bad tag value"); #endif /* H5AC_DO_TAGGING_SANITY_CHECKS */ /* Insert entry into metadata cache */ if (H5C_insert_entry(f, type, addr, thing, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C_insert_entry() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C_insert_entry() failed"); #ifdef H5_HAVE_PARALLEL { @@ -739,12 +739,12 @@ H5AC_insert_entry(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, if (NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) { /* Log the new entry */ if (H5AC__log_inserted_entry((H5AC_info_t *)thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC__log_inserted_entry() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC__log_inserted_entry() failed"); /* Check if we should try to flush */ if (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold) if (H5AC__run_sync_point(f, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point"); } /* end if */ } #endif /* H5_HAVE_PARALLEL */ @@ -783,7 +783,7 @@ H5AC_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "call to H5C_load_cache_image_on_next_protect failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -823,12 +823,12 @@ H5AC_mark_entry_dirty(void *thing) if ((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) && (entry_ptr->is_pinned) && (NULL != aux_ptr)) if (H5AC__log_dirtied_entry(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry"); } #endif /* H5_HAVE_PARALLEL */ if (H5C_mark_entry_dirty(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty"); done: /* If currently logging, generate a message */ @@ -873,12 +873,12 @@ H5AC_mark_entry_clean(void *thing) if ((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) && (entry_ptr->is_pinned) && (NULL != aux_ptr)) if (H5AC__log_cleaned_entry(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "can't log cleaned entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "can't log cleaned entry"); } #endif /* H5_HAVE_PARALLEL */ if (H5C_mark_entry_clean(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "can't mark pinned or protected entry clean") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "can't mark pinned or protected entry clean"); done: /* If currently logging, generate a message */ @@ -917,7 +917,7 @@ H5AC_mark_entry_unserialized(void *thing) cache_ptr = entry_ptr->cache_ptr; if (H5C_mark_entry_unserialized(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKUNSERIALIZED, FAIL, "can't mark entry unserialized") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKUNSERIALIZED, FAIL, "can't mark entry unserialized"); done: /* If currently logging, generate a message */ @@ -955,7 +955,7 @@ H5AC_mark_entry_serialized(void *thing) cache_ptr = entry_ptr->cache_ptr; if (H5C_mark_entry_serialized(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "can't mark entry serialized") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "can't mark entry serialized"); done: /* If currently logging, generate a message */ @@ -999,17 +999,17 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne /* Log moving the entry */ if (NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) if (H5AC__log_moved_entry(f, old_addr, new_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry"); #endif /* H5_HAVE_PARALLEL */ if (H5C_move_entry(f->shared->cache, type, old_addr, new_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "H5C_move_entry() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "H5C_move_entry() failed"); #ifdef H5_HAVE_PARALLEL /* Check if we should try to flush */ if (NULL != aux_ptr && aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold) if (H5AC__run_sync_point(f, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point"); #endif /* H5_HAVE_PARALLEL */ done: @@ -1049,7 +1049,7 @@ H5AC_pin_protected_entry(void *thing) /* Pin entry */ if (H5C_pin_protected_entry(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry"); done: /* If currently logging, generate a message */ @@ -1089,7 +1089,7 @@ H5AC_prep_for_file_close(H5F_t *f) 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache prep for file close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1128,7 +1128,7 @@ H5AC_prep_for_file_flush(H5F_t *f) 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't enable skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1169,7 +1169,7 @@ H5AC_secure_from_file_flush(H5F_t *f) 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't disable skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1205,7 +1205,7 @@ H5AC_create_flush_dependency(void *parent_thing, void *child_thing) /* Create the flush dependency */ if (H5C_create_flush_dependency(parent_thing, child_thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "H5C_create_flush_dependency() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "H5C_create_flush_dependency() failed"); done: /* If currently logging, generate a message */ @@ -1266,15 +1266,15 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi /* Check for invalid access request */ if ((0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) && (0 == (flags & H5C__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "no write intent on file"); #if H5AC_DO_TAGGING_SANITY_CHECKS if (!H5C_get_ignore_tags(f->shared->cache) && H5AC__verify_tag(type) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Bad tag value") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Bad tag value"); #endif /* H5AC_DO_TAGGING_SANITY_CHECKS */ if (NULL == (thing = H5C_protect(f, type, addr, udata, flags))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_protect() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C_protect() failed"); /* Set return value */ ret_value = thing; @@ -1367,14 +1367,14 @@ H5AC_resize_entry(void *thing, size_t new_size) if (NULL != aux_ptr) { if (H5AC__log_dirtied_entry(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry"); } } #endif /* H5_HAVE_PARALLEL */ /* Resize the entry */ if (H5C_resize_entry(thing, new_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry"); done: /* If currently logging, generate a message */ @@ -1414,7 +1414,7 @@ H5AC_unpin_entry(void *thing) /* Unpin the entry */ if (H5C_unpin_entry(thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry"); done: /* If currently logging, generate a message */ @@ -1454,7 +1454,7 @@ H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing) /* Destroy the flush dependency */ if (H5C_destroy_flush_dependency(parent_thing, child_thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "H5C_destroy_flush_dependency() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "H5C_destroy_flush_dependency() failed"); done: /* If currently logging, generate a message */ @@ -1536,17 +1536,17 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un size_t curr_size = 0; if ((type->image_len)(thing, &curr_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "Can't get size of thing"); if (((H5AC_info_t *)thing)->size != curr_size) - HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, FAIL, "size of entry changed") + HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, FAIL, "size of entry changed"); } /* end if */ #ifdef H5_HAVE_PARALLEL if (NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) { if (dirtied && ((H5AC_info_t *)thing)->is_dirty == FALSE) if (H5AC__log_dirtied_entry((H5AC_info_t *)thing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry"); if (deleted && aux_ptr->mpi_rank == 0) { if (H5AC__log_deleted_entry((H5AC_info_t *)thing) < 0) { @@ -1560,13 +1560,13 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un #endif /* H5_HAVE_PARALLEL */ if (H5C_unprotect(f, addr, thing, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5C_unprotect() failed"); #ifdef H5_HAVE_PARALLEL /* Check if we should try to flush */ if ((aux_ptr != NULL) && (aux_ptr->dirty_bytes >= aux_ptr->dirty_bytes_threshold)) if (H5AC__run_sync_point(f, H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point"); #endif /* H5_HAVE_PARALLEL */ done: @@ -1599,13 +1599,13 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr, H5AC_cache_config_t * /* Check args */ if ((cache_ptr == NULL) || (config_ptr == NULL) || (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or config_ptr on entry"); /* Retrieve the configuration */ if (H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr, &internal_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_auto_resize_config() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_auto_resize_config() failed"); if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_resize_enabled() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_resize_enabled() failed"); /* Set the information to return */ if (internal_config.rpt_fcn == NULL) @@ -1678,7 +1678,7 @@ H5AC_get_cache_size(const H5AC_t *cache_ptr, size_t *max_size_ptr, size_t *min_c if (H5C_get_cache_size((const H5C_t *)cache_ptr, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_size() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_size() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1701,7 +1701,7 @@ H5AC_get_cache_flush_in_progress(H5AC_t *cache_ptr, hbool_t *flush_in_progress_p FUNC_ENTER_NOAPI(FAIL) if (H5C_get_cache_flush_in_progress((H5C_t *)cache_ptr, flush_in_progress_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_flush_in_progress() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_flush_in_progress() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1724,7 +1724,7 @@ H5AC_get_cache_hit_rate(const H5AC_t *cache_ptr, double *hit_rate_ptr) FUNC_ENTER_NOAPI(FAIL) if (H5C_get_cache_hit_rate((const H5C_t *)cache_ptr, hit_rate_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_hit_rate() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_cache_hit_rate() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1748,7 +1748,7 @@ H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr) FUNC_ENTER_NOAPI(FAIL) if (H5C_reset_cache_hit_rate_stats((H5C_t *)cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1775,11 +1775,11 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t * assert(cache_ptr); if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry"); /* Validate external configuration */ if (H5AC_validate_config(config_ptr) != SUCCEED) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache configuration") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache configuration"); /* If the cache config struct is being used to control logging, perform * the open/close operations. Note that this is the only place where the @@ -1789,7 +1789,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t * /* close */ if (config_ptr->close_trace_file) if (H5C_log_tear_down((H5C_t *)cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging tear-down failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging tear-down failed"); /* open */ if (config_ptr->open_trace_file) { @@ -1798,18 +1798,18 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, const H5AC_cache_config_t * * output is generated when logging is controlled by the H5P calls. */ if (H5C_log_set_up((H5C_t *)cache_ptr, config_ptr->trace_file_name, H5C_LOG_STYLE_TRACE, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging setup failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "mdc logging setup failed"); } /* Convert external configuration to internal representation */ if (H5AC__ext_config_2_int_config(config_ptr, &internal_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__ext_config_2_int_config() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__ext_config_2_int_config() failed"); /* Set configuration */ if (H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed"); if (H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed"); #ifdef H5_HAVE_PARALLEL { @@ -1862,9 +1862,9 @@ H5AC_validate_config(const H5AC_cache_config_t *config_ptr) /* Check args */ if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "NULL config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "NULL config_ptr on entry"); if (config_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown config version") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown config version"); /* don't bother to test trace_file_name unless open_trace_file is TRUE */ if (config_ptr->open_trace_file) { @@ -1876,30 +1876,30 @@ H5AC_validate_config(const H5AC_cache_config_t *config_ptr) */ name_len = HDstrlen(config_ptr->trace_file_name); if (name_len == 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name is empty") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name is empty"); else if (name_len > H5AC__MAX_TRACE_FILE_NAME_LEN) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name too long") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->trace_file_name too long"); } /* end if */ if ((config_ptr->evictions_enabled == FALSE) && ((config_ptr->incr_mode != H5C_incr__off) || (config_ptr->flash_incr_mode != H5C_flash_incr__off) || (config_ptr->decr_mode != H5C_decr__off))) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Can't disable evictions while auto-resize is enabled") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Can't disable evictions while auto-resize is enabled"); if (config_ptr->dirty_bytes_threshold < H5AC__MIN_DIRTY_BYTES_THRESHOLD) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too small") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too small"); else if (config_ptr->dirty_bytes_threshold > H5AC__MAX_DIRTY_BYTES_THRESHOLD) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too big") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "dirty_bytes_threshold too big"); if ((config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY) && (config_ptr->metadata_write_strategy != H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->metadata_write_strategy out of range") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "config_ptr->metadata_write_strategy out of range"); if (H5AC__ext_config_2_int_config(config_ptr, &internal_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__ext_config_2_int_config() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__ext_config_2_int_config() failed"); if (H5C_validate_resize_config(&internal_config, H5C_RESIZE_CFG__VALIDATE_ALL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "error(s) in new config") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "error(s) in new config"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1935,10 +1935,10 @@ H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr) /* Check args */ if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "NULL config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "NULL config_ptr on entry"); if (config_ptr->version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown image config version") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Unknown image config version"); /* don't need to get the current H5C image config here since the * default values of fields not in the H5AC config will always be @@ -1950,7 +1950,7 @@ H5AC_validate_cache_image_config(H5AC_cache_image_config_t *config_ptr) internal_config.entry_ageout = config_ptr->entry_ageout; if (H5C_validate_cache_image_config(&internal_config) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "error(s) in new cache image config") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "error(s) in new cache image config"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2032,7 +2032,7 @@ H5AC__ext_config_2_int_config(const H5AC_cache_config_t *ext_conf_ptr, H5C_auto_ if ((ext_conf_ptr == NULL) || (ext_conf_ptr->version != H5AC__CURR_CACHE_CONFIG_VERSION) || (int_conf_ptr == NULL)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad ext_conf_ptr or inf_conf_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad ext_conf_ptr or inf_conf_ptr on entry"); int_conf_ptr->version = H5C__CURR_AUTO_SIZE_CTL_VER; if (ext_conf_ptr->rpt_fcn_enabled) @@ -2095,7 +2095,7 @@ H5AC_ignore_tags(const H5F_t *f) /* Set up a new metadata tag */ if (H5C_ignore_tags(f->shared->cache) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "H5C_ignore_tags() failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "H5C_ignore_tags() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2149,7 +2149,7 @@ H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag) /* 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) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "Can't retag metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "Can't retag metadata"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2180,7 +2180,7 @@ H5AC_flush_tagged_metadata(H5F_t *f, haddr_t metadata_tag) /* Call cache level function to flush metadata entries with specified tag */ if (H5C_flush_tagged_entries(f, metadata_tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot flush metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot flush metadata"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2215,7 +2215,7 @@ H5AC_evict_tagged_metadata(H5F_t *f, haddr_t metadata_tag, hbool_t match_global) /* Call cache level function to evict metadata entries with specified tag */ if (H5C_evict_tagged_entries(f, metadata_tag, match_global) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot evict metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot evict metadata"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2246,7 +2246,7 @@ H5AC_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flag /* 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) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot expunge tagged type entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cannot expunge tagged type entries"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2276,7 +2276,7 @@ H5AC_get_tag(const void *thing, haddr_t *tag) /* Call cache level function to get the tag */ if (H5C_get_tag(thing, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot get tag for metadata cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot get tag for metadata cache entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2319,7 +2319,7 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked) } if (H5C_cork(f->shared->cache, obj_addr, action, corked) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Cannot perform the cork action") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Cannot perform the cork action"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2351,7 +2351,7 @@ H5AC__verify_tag(const H5AC_class_t *type) /* Verify legal tag value */ if (H5C_verify_tag(type->id, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "tag verification failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "tag verification failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2384,7 +2384,7 @@ H5AC_get_entry_ring(const H5F_t *f, haddr_t addr, H5AC_ring_t *ring) /* Retrieve the ring value for the entry at address */ if (H5C_get_entry_ring(f, addr, ring) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "Can't retrieve ring for entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "Can't retrieve ring for entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2455,7 +2455,7 @@ H5AC_unsettle_entry_ring(void *_entry) /* Unsettle the entry's ring */ if (H5C_unsettle_entry_ring(entry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2493,7 +2493,7 @@ H5AC_unsettle_ring(H5F_t *f, H5C_ring_t ring) FUNC_ENTER_NOAPI(FAIL) if (FAIL == (ret_value = H5C_unsettle_ring(f, ring))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_unsettle_ring() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_unsettle_ring() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2525,7 +2525,7 @@ H5AC_remove_entry(void *_entry) /* Remove the entry from the cache*/ if (H5C_remove_entry(entry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry"); done: /* If currently logging, generate a message */ @@ -2554,7 +2554,7 @@ H5AC_get_mdc_image_info(const H5AC_t *cache_ptr, haddr_t *image_addr, hsize_t *i FUNC_ENTER_NOAPI(FAIL) if (H5C_get_mdc_image_info((const H5C_t *)cache_ptr, image_addr, image_len) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve cache image info") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve cache image info"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c index e026fa1..914040f 100644 --- a/src/H5ACdbg.c +++ b/src/H5ACdbg.c @@ -111,7 +111,7 @@ H5AC_dump_cache(const H5F_t *f) 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.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_dump_cache() failed."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -170,7 +170,7 @@ H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, void **entry_ptr_ptr) cache_ptr = f->shared->cache; if (H5C_get_entry_ptr_from_addr(cache_ptr, addr, entry_ptr_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_ptr_from_addr() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_ptr_from_addr() failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -261,7 +261,7 @@ H5AC_verify_entry_type(const H5F_t *f, haddr_t addr, const H5AC_class_t *expecte cache_ptr = f->shared->cache; if (H5C_verify_entry_type(cache_ptr, addr, expected_type, in_cache_ptr, type_ok_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_verify_entry_type() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_verify_entry_type() failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 3be2bc6..0a634c0 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -210,11 +210,11 @@ H5AC_add_candidate(H5AC_t *cache_ptr, haddr_t addr) * it into the candidate slist. */ if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate candidate slist entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate candidate slist entry"); slist_entry_ptr->addr = addr; if (H5SL_insert(aux_ptr->candidate_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist"); done: /* Clean up on error */ @@ -485,17 +485,17 @@ H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_NDEBUG_UNUS switch (sync_point_op) { case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: if (H5C_construct_candidate_list__min_clean((H5C_t *)cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_construct_candidate_list__min_clean() failed."); break; case H5AC_SYNC_POINT_OP__FLUSH_CACHE: if (H5C_construct_candidate_list__clean_cache((H5C_t *)cache_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "H5C_construct_candidate_list__clean_cache() failed.") + "H5C_construct_candidate_list__clean_cache() failed."); break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown sync point operation."); break; } /* end switch */ @@ -597,7 +597,7 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, unsigned *num_entri */ buf_size = sizeof(haddr_t) * num_entries; if (NULL == (haddr_buf_ptr = (haddr_t *)H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for haddr buffer"); /* Set up user data for callback */ udata.aux_ptr = aux_ptr; @@ -606,7 +606,7 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, unsigned *num_entri /* Free all the candidate list entries, building the address list in the callback */ if (H5SL_free(aux_ptr->candidate_slist_ptr, H5AC__copy_candidate_list_to_buffer_cb, &udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for candidate entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "Can't build address list for candidate entries"); /* Pass the number of entries and the buffer pointer * back to the caller. @@ -718,11 +718,11 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) * add its size to the dirty_bytes count. */ if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry ."); slist_entry_ptr->addr = addr; if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist."); aux_ptr->dirty_bytes += entry_ptr->size; #ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION @@ -856,11 +856,11 @@ H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty, unsig if (NULL == H5SL_search(aux_ptr->c_slist_ptr, (void *)(&addr))) { /* insert the address of the entry in the clean entry list. */ if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate clean slist entry .") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate clean slist entry ."); slist_entry_ptr->addr = addr; if (H5SL_insert(aux_ptr->c_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into clean entry slist.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into clean entry slist."); } /* end if */ } /* end else-if */ @@ -910,20 +910,20 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr) /* Entry to insert should not be in dirty list currently */ if (NULL != H5SL_search(aux_ptr->d_slist_ptr, (const void *)(&entry_ptr->addr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry already in dirty slist.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry already in dirty slist."); /* insert the address of the entry in the dirty entry list, and * add its size to the dirty_bytes count. */ if (NULL == (slist_entry_ptr = H5FL_MALLOC(H5AC_slist_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry .") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry ."); slist_entry_ptr->addr = entry_ptr->addr; if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist."); /* Entry to insert should not be in clean list either */ if (NULL != H5SL_search(aux_ptr->c_slist_ptr, (const void *)(&entry_ptr->addr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry in clean slist.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Inserted entry in clean slist."); } /* end if */ aux_ptr->dirty_bytes += entry_ptr->size; @@ -1004,9 +1004,9 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) /* 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, NULL, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status."); if (!entry_in_cache) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache."); if (aux_ptr->mpi_rank == 0) { H5AC_slist_entry_t *slist_entry_ptr; @@ -1037,7 +1037,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) */ 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 .") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate dirty slist entry ."); slist_entry_ptr->addr = new_addr; aux_ptr->dirty_bytes += entry_size; @@ -1050,7 +1050,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) /* insert / reinsert the entry in the dirty slist */ if (H5SL_insert(aux_ptr->d_slist_ptr, slist_entry_ptr, &(slist_entry_ptr->addr)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist."); } /* end if */ else if (!entry_dirty) { aux_ptr->dirty_bytes += entry_size; @@ -1185,13 +1185,13 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f) if (aux_ptr->mpi_rank == 0) { 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.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast candidate slist."); 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) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive candidate broadcast.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive candidate broadcast."); } /* end else */ if (num_candidates > 0) { @@ -1214,7 +1214,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f) /* Check for error on the write operation */ if (result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list."); /* this code exists primarily for the test bed -- it allows us to * enforce posix semantics on the server that pretends to be a @@ -1234,7 +1234,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f) */ if (aux_ptr->mpi_rank == 0) if (H5AC__tidy_cache_0_lists(cache_ptr, num_candidates, candidates_list_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists."); } /* end if */ /* if it is defined, call the sync point done callback. Note @@ -1338,11 +1338,11 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f) 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.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't broadcast clean slist."); 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.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't receive and/or process clean slist broadcast."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1456,12 +1456,12 @@ H5AC__receive_and_apply_clean_list(H5F_t *f) /* Retrieve the clean list from process 0 */ if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, &num_entries, &haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list"); if (num_entries > 0) /* Mark the indicated entries as clean */ if (H5C_mark_entries_as_clean(f, num_entries, haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't mark entries clean."); /* if it is defined, call the sync point done callback. Note * that this callback is defined purely for testing purposes, @@ -1516,7 +1516,7 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, unsigned *num_entries_ptr, /* Retrieve the candidate list from process 0 */ if (H5AC__receive_haddr_list(aux_ptr->mpi_comm, num_entries_ptr, haddr_buf_ptr_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't receive clean list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1592,7 +1592,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f) * form of a skip list. We will convert it later. */ if (H5C_construct_candidate_list__clean_cache(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate list."); if (H5SL_count(aux_ptr->candidate_slist_ptr) > 0) { herr_t result; @@ -1601,7 +1601,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f) * are used to receiving from process 0. */ if (H5AC__copy_candidate_list_to_buffer(cache_ptr, &num_entries, &haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't construct candidate buffer."); /* Initial sync point barrier * @@ -1624,7 +1624,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f) /* Check for error on the write operation */ if (result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't apply candidate list."); /* this code exists primarily for the test bed -- it allows us to * enforce posix semantics on the server that pretends to be a @@ -1642,7 +1642,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f) */ if (aux_ptr->mpi_rank == 0) if (H5AC__tidy_cache_0_lists(cache_ptr, num_entries, haddr_buf_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't tidy up process 0 lists."); } /* end if */ /* if it is defined, call the sync point done callback. Note @@ -1730,7 +1730,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f) /* Query if evictions are allowed */ if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed."); if (evictions_enabled) { /* construct candidate list -- process 0 only */ @@ -1745,7 +1745,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f) /* propagate and apply candidate list -- all processes */ if (H5AC__propagate_and_apply_candidate_list(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate and apply candidate list."); } /* evictions enabled */ done: @@ -1847,7 +1847,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f) /* Propagate cleaned entries to other ranks. */ if (H5AC__propagate_flushed_and_still_clean_entries_list(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1912,7 +1912,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f) /* Query if evictions are allowed */ if (H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_get_evictions_enabled() failed."); /* Flush if evictions are allowed -- following call * will cause process 0 to flush to min clean size, @@ -1968,7 +1968,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f) } /* end if */ if (H5AC__propagate_flushed_and_still_clean_entries_list(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list."); } /* end if */ done: @@ -2036,7 +2036,7 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op) * access. */ if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5C_clear_coll_entries() failed."); switch (aux_ptr->metadata_write_strategy) { case H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: @@ -2044,12 +2044,12 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op) case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: if (H5AC__rsp__p0_only__flush_to_min_clean(f) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, - "H5AC__rsp__p0_only__flush_to_min_clean() failed.") + "H5AC__rsp__p0_only__flush_to_min_clean() failed."); break; case H5AC_SYNC_POINT_OP__FLUSH_CACHE: if (H5AC__rsp__p0_only__flush(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__p0_only__flush() failed."); break; default: @@ -2063,12 +2063,13 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op) case H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN: if (H5AC__rsp__dist_md_write__flush_to_min_clean(f) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, - "H5AC__rsp__dist_md_write__flush_to_min_clean() failed.") + "H5AC__rsp__dist_md_write__flush_to_min_clean() failed."); break; case H5AC_SYNC_POINT_OP__FLUSH_CACHE: if (H5AC__rsp__dist_md_write__flush(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "H5AC__rsp__dist_md_write__flush() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, + "H5AC__rsp__dist_md_write__flush() failed."); break; default: @@ -2078,7 +2079,7 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op) break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown metadata write strategy.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown metadata write strategy."); break; } /* end switch */ @@ -2202,7 +2203,7 @@ H5AC__flush_entries(H5F_t *f) /* Check if we have >1 ranks */ if (H5C_get_aux_ptr(f->shared->cache)) if (H5AC__run_sync_point(f, H5AC_SYNC_POINT_OP__FLUSH_CACHE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't run sync point."); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c index eec6402..1a968d6 100644 --- a/src/H5ACproxy_entry.c +++ b/src/H5ACproxy_entry.c @@ -109,7 +109,7 @@ H5AC_proxy_entry_create(void) /* Allocate new proxy entry */ if (NULL == (pentry = H5FL_CALLOC(H5AC_proxy_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "can't allocate proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "can't allocate proxy entry"); /* Set non-zero fields */ pentry->addr = HADDR_UNDEF; @@ -151,11 +151,11 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent) if (NULL == pentry->parents) if (NULL == (pentry->parents = H5SL_create(H5SL_TYPE_HADDR, NULL))) HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, - "unable to create skip list for parents of proxy entry") + "unable to create skip list for parents of proxy entry"); /* Insert parent address into skip list */ if (H5SL_insert(pentry->parents, parent, &parent->addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to insert parent into proxy's skip list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to insert parent into proxy's skip list"); /* Add flush dependency on parent */ if (pentry->nchildren > 0) { @@ -163,7 +163,7 @@ H5AC_proxy_entry_add_parent(H5AC_proxy_entry_t *pentry, void *_parent) assert(H5_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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry"); } /* end if */ done: @@ -195,9 +195,9 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent) /* Remove parent from skip list */ if (NULL == (rem_parent = (H5AC_info_t *)H5SL_remove(pentry->parents, &parent->addr))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry parent from skip list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry parent from skip list"); if (!H5_addr_eq(rem_parent->addr, parent->addr)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "removed proxy entry parent not the same as real parent") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "removed proxy entry parent not the same as real parent"); /* Shut down the skip list, if this is the last parent */ if (0 == H5SL_count(pentry->parents)) { @@ -205,14 +205,15 @@ H5AC_proxy_entry_remove_parent(H5AC_proxy_entry_t *pentry, void *_parent) assert(0 == pentry->nchildren); if (H5SL_close(pentry->parents) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CLOSEERROR, FAIL, "can't close proxy parent skip list") + HGOTO_ERROR(H5E_CACHE, H5E_CLOSEERROR, FAIL, "can't close proxy parent skip list"); pentry->parents = NULL; } /* end if */ /* Remove flush dependency between the proxy entry and a parent */ if (pentry->nchildren > 0) if (H5AC_destroy_flush_dependency(parent, pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, + "unable to remove flush dependency on proxy entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -241,7 +242,7 @@ H5AC__proxy_entry_add_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_ud /* Add flush dependency on parent for proxy entry */ if (H5AC_create_flush_dependency(parent, pentry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, H5_ITER_ERROR, - "unable to set flush dependency for virtual entry") + "unable to set flush dependency for virtual entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -273,30 +274,30 @@ H5AC_proxy_entry_add_child(H5AC_proxy_entry_t *pentry, H5F_t *f, void *child) if (!H5_addr_defined(pentry->addr)) if (HADDR_UNDEF == (pentry->addr = H5MF_alloc_tmp(f, 1))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "temporary file space allocation failed for proxy entry") + "temporary file space allocation failed for proxy entry"); /* Insert the proxy entry into the cache */ if (H5AC_insert_entry(f, H5AC_PROXY_ENTRY, pentry->addr, pentry, H5AC__PIN_ENTRY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to cache proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to cache proxy entry"); /* Proxies start out clean (insertions are automatically marked dirty) */ if (H5AC_mark_entry_clean(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean"); /* Proxies start out serialized (insertions are automatically marked unserialized) */ if (H5AC_mark_entry_serialized(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry clean") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry clean"); /* If there are currently parents, iterate over the list of parents, creating flush dependency on them */ if (pentry->parents) if (H5SL_iterate(pentry->parents, H5AC__proxy_entry_add_child_cb, pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents"); } /* end if */ /* Add flush dependency on proxy entry */ if (H5AC_create_flush_dependency(pentry, child) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "unable to set flush dependency on proxy entry"); /* Increment count of children */ pentry->nchildren++; @@ -328,7 +329,7 @@ H5AC__proxy_entry_remove_child_cb(void *_item, void H5_ATTR_UNUSED *_key, void * /* Remove flush dependency on parent for proxy entry */ if (H5AC_destroy_flush_dependency(parent, pentry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, H5_ITER_ERROR, - "unable to remove flush dependency for proxy entry") + "unable to remove flush dependency for proxy entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -356,7 +357,7 @@ H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child) /* Remove flush dependency on proxy entry */ if (H5AC_destroy_flush_dependency(pentry, child) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on proxy entry"); /* Decrement count of children */ pentry->nchildren--; @@ -367,15 +368,15 @@ H5AC_proxy_entry_remove_child(H5AC_proxy_entry_t *pentry, void *child) if (pentry->parents) /* Iterate over the list of parents, removing flush dependency on them */ if (H5SL_iterate(pentry->parents, H5AC__proxy_entry_remove_child_cb, pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "can't visit parents"); /* Unpin proxy */ if (H5AC_unpin_entry(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin proxy entry"); /* Remove proxy entry from cache */ if (H5AC_remove_entry(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "unable to remove proxy entry"); } /* end if */ done: @@ -485,7 +486,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: #ifdef NDEBUG - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache"); #else /* NDEBUG */ assert(0 && "Invalid action?!?"); #endif /* NDEBUG */ @@ -493,7 +494,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_FLUSH: #ifdef NDEBUG - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache"); #else /* NDEBUG */ assert(0 && "Invalid action?!?"); #endif /* NDEBUG */ @@ -528,7 +529,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) /* Check for first dirty child */ if (1 == pentry->ndirty_children) if (H5AC_mark_entry_dirty(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDIRTY, FAIL, "can't mark proxy entry dirty") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDIRTY, FAIL, "can't mark proxy entry dirty"); break; case H5AC_NOTIFY_ACTION_CHILD_CLEANED: @@ -541,7 +542,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) /* Check for last dirty child */ if (0 == pentry->ndirty_children) if (H5AC_mark_entry_clean(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCLEAN, FAIL, "can't mark proxy entry clean"); break; case H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED: @@ -551,7 +552,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) /* Check for first unserialized child */ if (1 == pentry->nunser_children) if (H5AC_mark_entry_unserialized(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNSERIALIZE, FAIL, "can't mark proxy entry unserialized") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNSERIALIZE, FAIL, "can't mark proxy entry unserialized"); break; case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED: @@ -564,12 +565,12 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) /* Check for last unserialized child */ if (0 == pentry->nunser_children) if (H5AC_mark_entry_serialized(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry serialized") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "can't mark proxy entry serialized"); break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -599,7 +600,7 @@ H5AC__proxy_entry_free_icr(void *_thing) /* Destroy the proxy entry */ if (H5AC_proxy_entry_dest(pentry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to destroy proxy entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to destroy proxy entry"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index 1de8a27..a25cd34 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -151,7 +151,7 @@ H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) /* Decode attribute information */ if (NULL == (attr = (H5A_t *)H5O_msg_decode(udata->f, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't decode attribute") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't decode attribute"); /* Compare the string values */ udata->cmp = HDstrcmp(udata->name, attr->shared->name); @@ -167,7 +167,7 @@ H5A__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) /* Make callback */ if ((udata->found_op)(attr, &took_ownership, udata->found_op_data) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPERATE, FAIL, "attribute found callback failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPERATE, FAIL, "attribute found callback failed"); } /* end if */ done: @@ -261,7 +261,7 @@ H5A__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int /* 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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); /* Callback will set comparison value */ *result = fh_udata.cmp; diff --git a/src/H5Adense.c b/src/H5Adense.c index 0f8924e..d96fd75 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -188,11 +188,11 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo) /* Create fractal heap for storing attributes */ if (NULL == (fheap = H5HF_create(f, &fheap_cparam))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create fractal heap"); /* Retrieve the heap's address in the file */ if (H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address"); #ifndef NDEBUG { @@ -200,7 +200,7 @@ 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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length"); assert(fheap_id_len == H5O_FHEAP_ID_LEN); } #endif /* NDEBUG */ @@ -216,11 +216,11 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo) bt2_cparam.split_percent = H5A_NAME_BT2_SPLIT_PERC; bt2_cparam.merge_percent = H5A_NAME_BT2_MERGE_PERC; if (NULL == (bt2_name = H5B2_create(f, &bt2_cparam, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index"); /* Check if we should create a creation order index v2 B-tree */ if (ainfo->index_corder) { @@ -234,11 +234,11 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo) bt2_cparam.split_percent = H5A_CORDER_BT2_SPLIT_PERC; bt2_cparam.merge_percent = H5A_CORDER_BT2_MERGE_PERC; if (NULL == (bt2_corder = H5B2_create(f, &bt2_cparam, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index"); } /* end if */ done: @@ -296,7 +296,7 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr) /* Free any dynamically allocated items */ if (old_attr->shared) if (H5A__shared_free(old_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info"); old_attr = H5FL_FREE(H5A_t, old_attr); } /* end if */ @@ -338,11 +338,11 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap"); /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -350,19 +350,19 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open v2 B-tree for name index"); /* Create the "udata" information for v2 B-tree record find */ udata.f = f; @@ -378,9 +378,9 @@ H5A__dense_open(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Find & copy the attribute in the 'name' index */ attr_exists = FALSE; if (H5B2_find(bt2_name, &udata, &attr_exists, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't search for attribute in name index") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't search for attribute in name index"); if (attr_exists == FALSE) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute in name index") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute in name index"); done: /* Release resources */ @@ -426,7 +426,7 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -435,14 +435,14 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Check if message is already shared */ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared"); else if (shared_mesg > 0) /* Mark the message as shared */ mesg_flags |= H5O_MSG_FLAG_SHARED; else { /* Should this attribute be written as a SOHM? */ if (H5SM_try_share(f, NULL, 0, H5O_ATTR_ID, attr, &mesg_flags) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared"); /* Attributes can't be "unique be shareable" yet */ assert(!(mesg_flags & H5O_MSG_FLAG_SHAREABLE)); @@ -450,19 +450,19 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Check for inserting shared attribute */ if (mesg_flags & H5O_MSG_FLAG_SHARED) { @@ -478,29 +478,29 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Find out the size of buffer needed for serialized message */ if ((attr_size = H5O_msg_raw_size(f, H5O_ATTR_ID, FALSE, attr)) == 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get message size") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get message size"); /* Wrap the local buffer for serialized attributes */ if (NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf)))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for attribute */ if (NULL == (attr_ptr = H5WB_actual(wb, attr_size))) - HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Create serialized form of attribute or shared message */ if (H5O_msg_encode(f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute"); /* Insert the serialized attribute into the fractal heap */ /* (sets the heap ID in the user data) */ if (H5HF_insert(fheap, attr_size, attr_ptr, &udata.id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert attribute into fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert attribute into fractal heap"); } /* end else */ /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Create the callback information for v2 B-tree record insertion */ udata.common.f = f; @@ -516,18 +516,18 @@ H5A__dense_insert(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Insert attribute into 'name' tracking v2 B-tree */ if (H5B2_insert(bt2_name, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree"); /* 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 */ assert(H5_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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index"); /* Insert the record into the creation order index v2 B-tree */ if (H5B2_insert(bt2_corder, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree"); } /* end if */ done: @@ -606,7 +606,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) if (record->flags & H5O_MSG_FLAG_SHARED) { /* Update the shared attribute in the SOHM info */ if (H5O__attr_update_shared(op_data->f, NULL, op_data->attr, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in shared storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in shared storage"); /* Update record's heap ID */ record->id = op_data->attr->sh_loc.u.heap_id; @@ -618,7 +618,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) /* Open the creation order index v2 B-tree */ if (NULL == (bt2_corder = H5B2_open(op_data->f, op_data->corder_bt2_addr, NULL))) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for creation order index") + "unable to open v2 B-tree for creation order index"); /* Create the "udata" information for v2 B-tree record modify */ udata.f = op_data->f; @@ -634,7 +634,7 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) /* Modify record for creation order index */ if (H5B2_modify(bt2_corder, &udata, H5A__dense_write_bt2_cb2, &op_data->attr->sh_loc.u.heap_id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree"); } /* end if */ /* Note that the record changed */ @@ -646,19 +646,19 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) /* Find out the size of buffer needed for serialized attribute */ if ((attr_size = H5O_msg_raw_size(op_data->f, H5O_ATTR_ID, FALSE, op_data->attr)) == 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get attribute size") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get attribute size"); /* Wrap the local buffer for serialized attributes */ if (NULL == (wb = H5WB_wrap(attr_buf, sizeof(attr_buf)))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for attribute */ if (NULL == (attr_ptr = H5WB_actual(wb, attr_size))) - HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Create serialized form of attribute */ if (H5O_msg_encode(op_data->f, H5O_ATTR_ID, FALSE, (unsigned char *)attr_ptr, op_data->attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute"); /* Sanity check */ #ifndef NDEBUG @@ -666,14 +666,14 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed) size_t obj_len; /* Length of existing encoded attribute */ 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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get object size"); assert(obj_len == attr_size); } #endif /* NDEBUG */ /* Update existing attribute in heap */ /* (might be more efficient as fractal heap 'op' callback, but leave that for later -QAK) */ if (H5HF_write(op_data->fheap, &record->id, changed, attr_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute in heap"); } /* end else */ done: @@ -717,7 +717,7 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -725,23 +725,23 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Create the "udata" information for v2 B-tree record modify */ udata.f = f; @@ -763,7 +763,7 @@ H5A__dense_write(H5F_t *f, const H5O_ainfo_t *ainfo, H5A_t *attr) /* Modify attribute through 'name' tracking v2 B-tree */ if (H5B2_modify(bt2_name, &udata, H5A__dense_write_bt2_cb, &op_data) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree"); done: /* Release resources */ @@ -804,7 +804,7 @@ H5A__dense_copy_fh_cb(const void *obj, size_t obj_len, void *_udata) */ if (NULL == (udata->attr = (H5A_t *)H5O_msg_decode(udata->f, NULL, H5O_ATTR_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, FAIL, "can't decode attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, FAIL, "can't decode attribute"); /* Set the creation order index for the attribute */ udata->attr->shared->crt_idx = udata->record->corder; @@ -850,7 +850,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -858,23 +858,23 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Create the "udata" information for v2 B-tree record modify */ udata.f = f; @@ -890,14 +890,14 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Get copy of attribute through 'name' tracking v2 B-tree */ attr_exists = FALSE; if (H5B2_find(bt2_name, &udata, &attr_exists, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index") + 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") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute in name index"); assert(attr_copy); /* Check if message is already shared */ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared"); else if (shared_mesg > 0) { /* Reset shared status of copy */ /* (so it will get shared again if necessary) */ @@ -910,7 +910,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Recompute the version to encode the attribute with */ if (H5A__set_version(f, attr_copy) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "unable to update attribute version") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "unable to update attribute version"); /* Need to remove the attribute from the creation order index v2 B-tree */ if (ainfo->index_corder) { @@ -919,14 +919,14 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Open the creation order index v2 B-tree */ assert(H5_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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation index"); /* Set up the creation order to search for */ udata.corder = attr_copy->shared->crt_idx; corder_attr_exists = FALSE; if (H5B2_find(bt2_corder, &udata, &corder_attr_exists, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index"); if (corder_attr_exists) { H5A_bt2_ud_rm_t rm_udata; @@ -937,14 +937,14 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Remove the record from the creation order index v2 B-tree */ if (H5B2_remove(bt2_corder, &rm_udata, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, - "unable to remove attribute from creation order index v2 B-tree") + "unable to remove attribute from creation order index v2 B-tree"); } } /* Insert renamed attribute back into dense storage */ /* (Possibly making it shared) */ if (H5A__dense_insert(f, ainfo, attr_copy) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage"); /* Was this attribute shared? */ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, attr_copy)) > 0) { @@ -952,7 +952,7 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons /* Retrieve ref count for shared attribute */ if (H5SM_get_refcount(f, H5O_ATTR_ID, &attr_copy->sh_loc, &attr_rc) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count"); /* If the newly shared attribute needs to share "ownership" of the shared * components (ie. its reference count is 1), increment the reference @@ -964,21 +964,21 @@ H5A__dense_rename(H5F_t *f, const H5O_ainfo_t *ainfo, const char *old_name, cons if (attr_rc == 1) { /* Increment reference count on attribute components */ if (H5O__attr_link(f, NULL, attr_copy) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count"); } /* end if */ } /* end if */ else if (shared_mesg == 0) { /* Increment reference count on attribute components */ /* (so that they aren't deleted when the attribute is removed shortly) */ if (H5O__attr_link(f, NULL, attr_copy) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count"); } /* end if */ else if (shared_mesg < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared"); /* Delete old attribute from dense storage */ if (H5A__dense_remove(f, ainfo, old_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage"); done: /* Release resources */ @@ -1036,7 +1036,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to copy the attribute information */ if (H5HF_op(fheap, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed"); /* Check which type of callback to make */ switch (bt2_udata->attr_op->op_type) { @@ -1045,7 +1045,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) /* Get the attribute information */ if (H5A__get_info(fh_udata.attr, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info"); /* Make the application callback */ ret_value = (bt2_udata->attr_op->u.app_op2)(bt2_udata->loc_id, fh_udata.attr->shared->name, @@ -1069,7 +1069,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) default: assert("unknown attribute op type" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") + HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type"); #endif /* NDEBUG */ } /* end switch */ @@ -1149,11 +1149,11 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -1161,19 +1161,19 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Construct the user data for v2 B-tree iterator callback */ udata.f = f; @@ -1198,7 +1198,7 @@ H5A__dense_iterate(H5F_t *f, hid_t loc_id, const H5O_ainfo_t *ainfo, H5_index_t /* Build the table of attributes for this object */ /* (build table using the name index, but sort according to idx_type) */ if (H5A__dense_build_table(f, ainfo, idx_type, order, &atable) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes"); /* Iterate over attributes in table */ if ((ret_value = H5A__attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0) @@ -1243,7 +1243,7 @@ H5A__dense_remove_bt2_cb(const void *_record, void *_udata) if (H5_addr_defined(udata->corder_bt2_addr)) { /* Open the creation order index v2 B-tree */ if (NULL == (bt2_corder = H5B2_open(udata->common.f, udata->corder_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index") + HGOTO_ERROR(H5E_ATTR, 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 */ udata->common.corder = attr->shared->crt_idx; @@ -1251,24 +1251,24 @@ H5A__dense_remove_bt2_cb(const void *_record, void *_udata) /* Remove the record from the creation order index v2 B-tree */ if (H5B2_remove(bt2_corder, udata, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, - "unable to remove attribute from creation order index v2 B-tree") + "unable to remove attribute from creation order index v2 B-tree"); } /* end if */ /* Check for removing shared attribute */ if (record->flags & H5O_MSG_FLAG_SHARED) { /* Decrement the reference count on the shared attribute message */ if (H5SM_delete(udata->common.f, NULL, &(attr->sh_loc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute"); } /* end if */ else { /* Perform the deletion action on the attribute */ /* (takes care of shared & committed datatype/dataspace components) */ if (H5O__attr_delete(udata->common.f, NULL, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); /* Remove record from fractal heap */ if (H5HF_remove(udata->common.fheap, &record->id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap"); } /* end else */ done: @@ -1308,11 +1308,11 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -1320,19 +1320,19 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Set up the user data for the v2 B-tree 'record remove' callback */ udata.common.f = f; @@ -1346,7 +1346,7 @@ H5A__dense_remove(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name) /* Remove the record from the name index v2 B-tree */ if (H5B2_remove(bt2_name, &udata, H5A__dense_remove_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from name index v2 B-tree"); done: /* Release resources */ @@ -1400,7 +1400,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) if (H5_addr_defined(bt2_udata->other_bt2_addr) || !(record->flags & H5O_MSG_FLAG_SHARED)) { /* 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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "attribute removal callback failed"); assert(fh_udata.attr); /* Use the attribute's shared location */ @@ -1439,14 +1439,14 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->other_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Set the common information for the v2 B-tree remove operation */ /* Remove the record from the "other" index v2 B-tree */ if (H5B2_remove(bt2, &other_bt2_udata, NULL, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, - "unable to remove record from 'other' index v2 B-tree") + "unable to remove record from 'other' index v2 B-tree"); } /* end if */ /* Check for removing shared attribute */ @@ -1461,17 +1461,17 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Decrement the reference count on the shared attribute message */ if (H5SM_delete(bt2_udata->f, NULL, sh_loc_ptr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute"); } /* end if */ else { /* Perform the deletion action on the attribute */ /* (takes care of shared & committed datatype/dataspace components) */ if (H5O__attr_delete(bt2_udata->f, NULL, fh_udata.attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); /* Remove record from fractal heap */ if (H5HF_remove(fheap, &record->id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from fractal heap"); } /* end else */ done: @@ -1541,11 +1541,11 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -1553,19 +1553,19 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Set up the user data for the v2 B-tree 'record remove' callback */ udata.f = f; @@ -1576,21 +1576,21 @@ H5A__dense_remove_by_idx(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type /* Remove the record from the name index v2 B-tree */ if (H5B2_remove_by_idx(bt2, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index"); } /* end if */ else { /* Build the table of attributes for this object */ /* (build table using the name index, but sort according to idx_type) */ if (H5A__dense_build_table(f, ainfo, idx_type, order, &atable) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes"); /* Check for skipping too many attributes */ if (n >= atable.nattrs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); /* Delete appropriate attribute from dense storage */ if (H5A__dense_remove(f, ainfo, ((atable.attrs[n])->shared)->name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage"); } /* end else */ done: @@ -1637,11 +1637,11 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Check if attributes are shared in this file */ if ((attr_sharable = H5SM_type_shared(f, H5O_ATTR_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't determine if attributes are shared"); /* Get handle for shared message heap, if attributes are shareable */ if (attr_sharable) { @@ -1649,19 +1649,19 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t /* Retrieve the address of the shared message's fractal heap */ if (H5SM_get_fheap_addr(f, H5O_ATTR_ID, &shared_fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get shared message heap address"); /* Check if there are any shared messages currently */ if (H5_addr_defined(shared_fheap_addr)) { /* Open the fractal heap for shared header messages */ if (NULL == (shared_fheap = H5HF_open(f, shared_fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); } /* end if */ } /* end if */ /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Create the "udata" information for v2 B-tree record 'find' */ udata.f = f; @@ -1676,7 +1676,7 @@ H5A__dense_exists(H5F_t *f, const H5O_ainfo_t *ainfo, const char *name, hbool_t /* Find the attribute in the 'name' index */ if (H5B2_find(bt2_name, &udata, attr_exists, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't search for attribute in name index"); done: /* Release resources */ @@ -1719,7 +1719,7 @@ H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata) /* Decrement the reference count on the shared attribute message */ if (H5SM_delete(bt2_udata->f, NULL, &sh_mesg) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute"); } /* end if */ else { H5A_fh_ud_cp_t fh_udata; /* User data for fractal heap 'op' callback */ @@ -1733,13 +1733,13 @@ H5A__dense_delete_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to copy the attribute information */ if (H5HF_op(bt2_udata->fheap, &record->id, H5A__dense_copy_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPERATE, FAIL, "heap op callback failed"); attr = fh_udata.attr; /* Perform the deletion action on the attribute */ /* (takes care of shared/committed datatype & dataspace components) */ if (H5O__attr_delete(bt2_udata->f, NULL, fh_udata.attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); } /* end else */ done: @@ -1774,7 +1774,7 @@ H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo) /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, ainfo->fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Create the "udata" information for v2 B-tree 'delete' */ udata.f = f; @@ -1788,25 +1788,26 @@ H5A__dense_delete(H5F_t *f, H5O_ainfo_t *ainfo) /* Delete name index v2 B-tree */ if (H5B2_delete(f, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index"); ainfo->name_bt2_addr = HADDR_UNDEF; /* Release resources */ if (H5HF_close(fheap) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap"); fheap = NULL; /* Check if we should delete the creation order index v2 B-tree */ if (H5_addr_defined(ainfo->corder_bt2_addr)) { /* Delete the creation order index, without adjusting the ref. count on the attributes */ if (H5B2_delete(f, ainfo->corder_bt2_addr, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, + "unable to delete v2 B-tree for creation order index"); ainfo->corder_bt2_addr = HADDR_UNDEF; } /* end if */ /* Delete fractal heap */ if (H5HF_delete(f, ainfo->fheap_addr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete fractal heap"); ainfo->fheap_addr = HADDR_UNDEF; done: diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index f996774..e8fd3ea 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -113,13 +113,13 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read"); /* Get correct property list */ if (H5P_DEFAULT == acpl_id) @@ -131,17 +131,17 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Create the attribute */ if (NULL == (attr = H5VL_attr_create(vol_obj, &loc_params, name, type_id, space_id, acpl_id, H5P_ATTRIBUTE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute"); /* Register the new attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID"); done: /* Clean up on failure */ @@ -187,9 +187,9 @@ H5Aopen_name(hid_t loc_id, const char *name) /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -197,16 +197,16 @@ H5Aopen_name(hid_t loc_id, const char *name) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the attribute */ if (NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, name, H5P_ATTRIBUTE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute"); /* Register the attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle"); done: /* Clean up on failure */ @@ -252,7 +252,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx) /* Check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "location is not valid for an attribute"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -265,16 +265,16 @@ H5Aopen_idx(hid_t loc_id, unsigned idx) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the attribute */ if (NULL == (attr = H5VL_attr_open(vol_obj, &loc_params, NULL, H5P_ATTRIBUTE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute"); /* Register the attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle"); done: /* Clean up on failure */ @@ -320,7 +320,7 @@ H5Aget_num_attrs(hid_t loc_id) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_GET_INFO; @@ -329,7 +329,7 @@ H5Aget_num_attrs(hid_t loc_id) /* Get the number of attributes for the object */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute count for object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute count for object"); H5_CHECKED_ASSIGN(ret_value, int, oinfo.num_attrs, hsize_t); @@ -387,11 +387,11 @@ H5Aiterate1(hid_t loc_id, unsigned *attr_num /*in,out*/, H5A_operator1_t op, voi /* check arguments */ if (H5I_ATTR == H5I_get_type(loc_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "location is not valid for an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "location is not valid for an attribute"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier") + HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier"); /* Set up VOL callback arguments */ attr_opt_args.iterate_old.loc_id = loc_id; diff --git a/src/H5Aint.c b/src/H5Aint.c index 6a78e0c..f62449b 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -154,7 +154,7 @@ H5A_init(void) * Create attribute ID type. */ if (H5I_register_type(H5I_ATTR_CLS) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to initialize interface"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -260,24 +260,24 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons */ exists = FALSE; if (H5O__attr_exists(loc->oloc, attr_name, &exists) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes"); if (exists) - HGOTO_ERROR(H5E_ATTR, H5E_ALREADYEXISTS, NULL, "attribute already exists") + HGOTO_ERROR(H5E_ATTR, H5E_ALREADYEXISTS, NULL, "attribute already exists"); /* Check if the dataspace has an extent set (or is NULL) */ if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, NULL, "dataspace extent has not been set") + HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, NULL, "dataspace extent has not been set"); /* Check if the datatype is "sensible" for use in a dataset */ if (H5T_is_sensible(type) != TRUE) - HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, NULL, "datatype is not sensible") + HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, NULL, "datatype is not sensible"); /* Build the attribute information */ if (NULL == (attr = H5FL_CALLOC(H5A_t))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed for attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed for attribute info"); if (NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "can't allocate shared attr structure") + 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 */ assert(acpl_id != H5P_DEFAULT); @@ -288,10 +288,10 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons /* Get a local copy of the attribute creation property list */ if (NULL == (ac_plist = (H5P_genplist_t *)H5I_object(acpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list"); if (H5P_get(ac_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get character encoding flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get character encoding flag"); } /* end else */ /* Copy the attribute name */ @@ -299,43 +299,43 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons /* Copy datatype */ if (NULL == (attr->shared->dt = H5T_copy(type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info"); /* Convert a datatype (if committed) to a transient type if the committed datatype's file location is different from the file location where the attribute will be created */ if (H5T_convert_committed_datatype(attr->shared->dt, loc->oloc->file) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't get shared datatype info"); /* Mark datatype as being on disk now */ if (H5T_set_loc(attr->shared->dt, H5F_VOL_OBJ(loc->oloc->file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location"); /* Set the version for datatype */ if (H5T_set_version(loc->oloc->file, attr->shared->dt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of datatype"); /* Copy the dataspace for the attribute */ attr->shared->ds = H5S_copy(space, FALSE, TRUE); /* Set the version for dataspace */ if (H5S_set_version(loc->oloc->file, attr->shared->ds) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set version of dataspace"); /* Copy the object header information */ if (H5O_loc_copy_deep(&(attr->oloc), loc->oloc) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to copy entry") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to copy entry"); /* Deep copy of the group hierarchy path */ if (H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path"); /* Check if any of the pieces should be (or are already) shared in the * SOHM table */ if (H5SM_try_share(attr->oloc.file, NULL, 0, H5O_DTYPE_ID, attr->shared->dt, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share datatype failed"); if (H5SM_try_share(attr->oloc.file, NULL, 0, H5O_SDSPACE_ID, attr->shared->ds, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, NULL, "trying to share dataspace failed"); /* Check whether datatype is committed & increment ref count * (to maintain ref. count incr/decr similarity with "shared message" @@ -344,7 +344,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons if (H5T_is_named(attr->shared->dt)) /* Increment the reference count on the shared datatype */ if (H5T_link(attr->shared->dt, 1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, NULL, "unable to adjust shared datatype link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, NULL, "unable to adjust shared datatype link count"); /* Compute the size of pieces on disk. This is either the size of the * datatype and dataspace messages themselves, or the size of the "shared" @@ -355,7 +355,7 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons /* Get # of elements for attribute's dataspace */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid"); H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t); assert(attr->shared->dt_size > 0); @@ -364,16 +364,16 @@ H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, cons /* Hold the symbol table entry (and file) open */ if (H5O_open(&(attr->oloc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open"); attr->obj_opened = TRUE; /* Set the version to encode the attribute with */ if (H5A__set_version(attr->oloc.file, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version"); /* Insert the attribute into the object header */ if (H5O__attr_create(&(attr->oloc), attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, NULL, "unable to create attribute in object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, NULL, "unable to create attribute in object header"); /* Set return value */ ret_value = attr; @@ -420,12 +420,12 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); loc_found = TRUE; /* Go do the real work for attaching the attribute to the object */ if (NULL == (attr = H5A__create(&obj_loc, attr_name, type, space, acpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute"); /* Set return value */ ret_value = attr; @@ -471,24 +471,24 @@ H5A__open_common(const H5G_loc_t *loc, H5A_t *attr) #if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG) /* Clear object location */ if (H5O_loc_reset(&(attr->oloc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to reset location") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to reset location"); #endif /* H5_USING_MEMCHECKER */ /* Free any previous group hier. path */ if (H5G_name_free(&(attr->path)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path"); /* Deep copy of the symbol table entry */ if (H5O_loc_copy_deep(&(attr->oloc), loc->oloc) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to copy entry") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to copy entry"); /* Deep copy of the group hier. path */ if (H5G_name_copy(&(attr->path), loc->path, H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy entry") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy entry"); /* Hold the symbol table entry (and file) open */ if (H5O_open(&(attr->oloc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open"); attr->obj_opened = TRUE; done: @@ -519,11 +519,11 @@ H5A__open(const H5G_loc_t *loc, const char *attr_name) /* Read in attribute from object header */ if (NULL == (attr = H5O__attr_open_by_name(loc->oloc, attr_name))) HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, - "unable to load attribute info from object header for attribute: '%s'", attr_name) + "unable to load attribute info from object header for attribute: '%s'", attr_name); /* Finish initializing attribute */ if (H5A__open_common(loc, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute"); /* Set return value */ ret_value = attr; @@ -570,16 +570,16 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); loc_found = TRUE; /* Read in attribute from object header */ if (NULL == (attr = H5O__attr_open_by_idx(obj_loc.oloc, idx_type, order, n))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to load attribute info from object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to load attribute info from object header"); /* Finish initializing attribute */ if (H5A__open_common(&obj_loc, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute"); /* Set return value */ ret_value = attr; @@ -630,16 +630,16 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "object not found"); loc_found = TRUE; /* Read in attribute from object header */ if (NULL == (attr = H5O__attr_open_by_name(obj_loc.oloc, attr_name))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to load attribute info from object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to load attribute info from object header"); /* Finish initializing attribute */ if (H5A__open_common(loc, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to initialize attribute"); /* Set return value */ ret_value = attr; @@ -695,11 +695,11 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer"); /* Create buffer for data to store on disk */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid"); H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t); if (nelmts > 0) { @@ -715,7 +715,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(attr->shared->dt, mem_type))) HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dst datatypes") + "unable to convert between src and dst datatypes"); /* Check for type conversion required */ if (!H5T_path_noop(tpath)) { @@ -724,12 +724,12 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0 || (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); /* Get the maximum buffer size needed and allocate it */ buf_size = nelmts * MAX(src_type_size, dst_type_size); if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy the attribute data into the buffer for conversion */ H5MM_memcpy(tconv_buf, attr->shared->data, (src_type_size * nelmts)); @@ -740,7 +740,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) if (need_bkg) { /* Allocate background buffer */ if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Copy the application buffer into the background buffer if necessary */ if (need_bkg == H5T_BKG_YES) { @@ -751,7 +751,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) /* Perform datatype conversion. */ if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed"); /* Copy the converted data into the user's buffer */ H5MM_memcpy(buf, tconv_buf, (dst_type_size * nelmts)); @@ -817,11 +817,11 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *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) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't patch VL datatype file pointer") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't patch VL datatype file pointer"); /* Get # of elements for attribute's dataspace */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid"); H5_CHECKED_ASSIGN(nelmts, size_t, snelmts, hssize_t); /* If there's actually data elements for the attribute, make a copy of the data passed in */ @@ -833,7 +833,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) /* Convert memory buffer into disk buffer */ /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(mem_type, attr->shared->dt))) - HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes") + HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dst datatypes"); /* Check for type conversion required */ if (!H5T_path_noop(tpath)) { @@ -841,12 +841,12 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(mem_type, H5T_COPY_ALL), FALSE)) < 0 || (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(attr->shared->dt, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion") + HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); /* Get the maximum buffer size needed and allocate it */ buf_size = nelmts * MAX(src_type_size, dst_type_size); if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Copy the user's data into the buffer for conversion */ H5MM_memcpy(tconv_buf, buf, (src_type_size * nelmts)); @@ -871,12 +871,12 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) 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") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed"); } /* Perform datatype conversion */ if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed"); /* Free the previous attribute data buffer, if there is one */ if (attr->shared->data) @@ -893,7 +893,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) /* Allocate the attribute buffer, if there isn't one */ if (attr->shared->data == NULL) if (NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, dst_type_size * nelmts))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy the attribute data into the attribute data buffer */ H5MM_memcpy(attr->shared->data, buf, (dst_type_size * nelmts)); @@ -901,7 +901,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) /* Modify the attribute in the object header */ if (H5O__attr_write(&(attr->oloc), attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to modify attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to modify attribute"); } /* end if */ done: @@ -988,11 +988,11 @@ H5A_get_space(H5A_t *attr) /* Copy the attribute's dataspace */ if (NULL == (ds = H5S_copy(attr->shared->ds, FALSE, TRUE))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (H5I_INVALID_HID == ret_value && ds && H5S_close(ds) < 0) @@ -1023,22 +1023,22 @@ H5A__get_type(H5A_t *attr) /* Patch the datatype's "top level" file pointer */ if (H5T_patch_file(attr->shared->dt, attr->oloc.file) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to patch datatype's file pointer") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to patch datatype's file pointer"); /* Copy the attribute's datatype. If the type is a named type then * reopen the type before returning it to the user. Make the type * read-only. */ if (NULL == (dt = H5T_copy_reopen(attr->shared->dt))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy datatype") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy datatype"); /* Mark any datatypes as being in memory now */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "invalid datatype location"); /* Lock copied type */ if (H5T_lock(dt, FALSE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to lock transient datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to lock transient datatype"); /* Register */ if (H5T_is_named(dt)) { @@ -1047,11 +1047,11 @@ H5A__get_type(H5A_t *attr) * returned datatype */ if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); } else { if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype"); } done: @@ -1086,17 +1086,17 @@ H5A__get_create_plist(H5A_t *attr) FUNC_ENTER_PACKAGE if (NULL == (plist = (H5P_genplist_t *)H5I_object(H5P_LST_ATTRIBUTE_CREATE_ID_g))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get default ACPL"); /* Create the property list object to return */ if ((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); /* Set the character encoding on the new property list */ if (H5P_set(new_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->shared->encoding)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding"); ret_value = new_plist_id; @@ -1165,7 +1165,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) /* Allocate attribute structure */ if (_new_attr == NULL) { if (NULL == (new_attr = H5FL_CALLOC(H5A_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); allocated_attr = TRUE; } /* end if */ else @@ -1176,7 +1176,7 @@ H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) /* Deep copy of the group hierarchy path */ if (H5G_name_copy(&(new_attr->path), &(old_attr->path), H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy path"); /* Share some attribute information */ new_attr->shared = old_attr->shared; @@ -1267,11 +1267,11 @@ H5A__close_cb(H5VL_object_t *attr_vol_obj, void **request) /* Close the attribute */ if (H5VL_attr_close(attr_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "problem closing attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "problem closing attribute"); /* Free the VOL object */ if (H5VL_free_object(attr_vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1298,14 +1298,14 @@ H5A__close(H5A_t *attr) /* Close the object's symbol-table entry */ if (attr->obj_opened && (H5O_close(&(attr->oloc), NULL) < 0)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release object header info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release object header info"); /* Reference count can be 0. It only happens when H5A__create fails. */ if (attr->shared->nrefs <= 1) { /* Free dynamically allocated items */ if (attr->shared) if (H5A__shared_free(attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info"); } /* end if */ else { /* There are other references to the shared part of the attribute. @@ -1315,7 +1315,7 @@ H5A__close(H5A_t *attr) /* Free group hierarchy path */ if (H5G_name_free(&(attr->path)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release group hier. path"); attr->shared = NULL; attr = H5FL_FREE(H5A_t, attr); @@ -1435,12 +1435,12 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name, /* Find the object's location */ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Check if the attribute exists */ if (H5O__attr_exists(obj_loc.oloc, attr_name, attr_exists) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); done: /* Release resources */ @@ -1479,7 +1479,7 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out* /* Allocate larger table */ new_table_size = MAX(1, 2 * udata->atable->nattrs); if (NULL == (new_table = (H5A_t **)H5FL_SEQ_REALLOC(H5A_t_ptr, udata->atable->attrs, new_table_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "unable to extend attribute table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "unable to extend attribute table"); /* Update table information in user data */ udata->atable->attrs = new_table; @@ -1488,7 +1488,7 @@ H5A__compact_build_table_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg /*in,out* /* Copy attribute into table */ if (NULL == (udata->atable->attrs[udata->curr_attr] = H5A__copy(NULL, (const H5A_t *)mesg->native))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute"); /* Assign [somewhat arbitrary] creation order value, if requested */ if (udata->bogus_crt_idx) @@ -1545,7 +1545,7 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5A__compact_build_table_cb; if (H5O__msg_iterate_real(f, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error building attribute table"); /* Correct # of attributes in table */ atable->nattrs = udata.curr_attr; @@ -1554,7 +1554,7 @@ H5A__compact_build_table(H5F_t *f, H5O_t *oh, H5_index_t idx_type, H5_iter_order if (atable->nattrs > 0) { /* Sort attribute table in correct iteration order */ if (H5A__attr_sort_table(atable, idx_type, order) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table"); } /* end if */ done: @@ -1586,11 +1586,11 @@ H5A__dense_build_table_cb(const H5A_t *attr, void *_udata) /* Allocate attribute for entry in the table */ if (NULL == (udata->atable->attrs[udata->curr_attr] = H5FL_CALLOC(H5A_t))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate attribute"); /* Copy attribute information. Share the attribute object in copying. */ if (NULL == H5A__copy(udata->atable->attrs[udata->curr_attr], attr)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute"); /* Increment number of attributes stored */ udata->curr_attr++; @@ -1632,12 +1632,12 @@ H5A__dense_build_table(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type, /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Retrieve # of records in "name" B-tree */ /* (should be same # of records in all indices) */ if (H5B2_get_nrec(bt2_name, &nrec) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index"); /* Set size of table */ H5_CHECK_OVERFLOW(nrec, /* From: */ hsize_t, /* To: */ size_t); @@ -1650,7 +1650,7 @@ H5A__dense_build_table(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type, /* Allocate the table to store the attributes */ if ((atable->attrs = (H5A_t **)H5FL_SEQ_CALLOC(H5A_t_ptr, atable->nattrs)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Set up user data for iteration */ udata.atable = atable; @@ -1663,11 +1663,11 @@ H5A__dense_build_table(H5F_t *f, const H5O_ainfo_t *ainfo, H5_index_t idx_type, /* Iterate over the links in the group, building a table of the link messages */ if (H5A__dense_iterate(f, (hid_t)0, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table"); /* Sort attribute table in correct iteration order */ if (H5A__attr_sort_table(atable, idx_type, order) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table"); } /* end if */ else atable->attrs = NULL; @@ -1864,7 +1864,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l /* Get the attribute information */ if (H5A__get_info(atable->attrs[u], &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, H5_ITER_ERROR, "unable to get attribute info"); /* Make the application callback */ ret_value = (attr_op->u.app_op2)(loc_id, ((atable->attrs[u])->shared)->name, &ainfo, op_data); @@ -1886,7 +1886,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l default: assert("unknown attribute op type" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") + HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type"); #endif /* NDEBUG */ } /* end switch */ @@ -1929,7 +1929,7 @@ H5A__attr_release_table(H5A_attr_table_t *atable) /* Free attribute message information */ for (u = 0; u < atable->nattrs; u++) if (atable->attrs[u] && H5A__close(atable->attrs[u]) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute"); } /* end if */ else assert(atable->attrs == NULL); @@ -1965,11 +1965,11 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo) /* Check if the "attribute info" message exists */ if ((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header"); if (ret_value > 0) { /* Retrieve the "attribute info" structure */ if (NULL == H5O_msg_read_oh(f, oh, H5O_AINFO_ID, ainfo)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message"); /* Check if we don't know how many attributes there are */ if (ainfo->nattrs == HSIZET_MAX) { @@ -1977,12 +1977,12 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo) if (H5_addr_defined(ainfo->fheap_addr)) { /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Retrieve # of records in "name" B-tree */ /* (should be same # of records in all indices) */ if (H5B2_get_nrec(bt2_name, &ainfo->nattrs) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve # of records in index"); } /* end if */ else /* Retrieve # of attributes from object header */ @@ -2048,7 +2048,7 @@ H5A__set_version(const H5F_t *f, H5A_t *attr) /* Version bounds check */ if (version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_ATTR, H5E_BADRANGE, FAIL, "attribute version out of bounds") + HGOTO_ERROR(H5E_ATTR, H5E_BADRANGE, FAIL, "attribute version out of bounds"); /* Set the message version */ attr->shared->version = version; @@ -2101,13 +2101,13 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Allocate space for the destination message */ if (NULL == (attr_dst = H5FL_CALLOC(H5A_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the top level of the attribute */ *attr_dst = *attr_src; if (NULL == (attr_dst->shared = H5FL_CALLOC(H5A_shared_t))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure"); /* Don't have an opened group location for copy */ H5O_loc_reset(&(attr_dst->oloc)); @@ -2126,11 +2126,11 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* If source is named, we will keep dst as named, but we will not actually * copy the target and update the message until post copy */ if (NULL == (attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "cannot copy datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "cannot copy datatype"); /* Set the location of the destination datatype */ if (H5T_set_loc(attr_dst->shared->dt, H5F_VOL_OBJ(file_dst), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "cannot mark datatype on disk"); if (!H5T_is_named(attr_src->shared->dt)) { /* If the datatype is not named, it may have been shared in the @@ -2138,7 +2138,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s * it in the destination file below. */ if (H5O_msg_reset_share(H5O_DTYPE_ID, attr_dst->shared->dt) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing"); } /* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied. @@ -2150,16 +2150,16 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s * it in the destination. */ if (H5O_msg_reset_share(H5O_SDSPACE_ID, attr_dst->shared->ds) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset dataspace sharing") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset dataspace sharing"); /* Simulate trying to share both the datatype and dataset, to determine the * final size of the messages. This does nothing if the datatype is * committed or sharing is disabled. */ if (H5SM_try_share(file_dst, NULL, H5SM_DEFER, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute datatype"); if (H5SM_try_share(file_dst, NULL, H5SM_DEFER, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "can't share attribute dataspace"); /* Compute the sizes of the datatype and dataspace. This is their raw * size unless they're shared. @@ -2177,12 +2177,12 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Get # of elements for destination attribute's dataspace */ if ((sdst_nelmts = H5S_GET_EXTENT_NPOINTS(attr_dst->shared->ds)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, NULL, "dataspace is invalid"); H5_CHECKED_ASSIGN(dst_nelmts, size_t, sdst_nelmts, hssize_t); /* Get size of destination attribute's datatype */ if (0 == (dst_dt_size = H5T_get_size(attr_dst->shared->dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size"); /* Compute the size of the data */ attr_dst->shared->data_size = dst_nelmts * dst_dt_size; @@ -2190,7 +2190,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Copy (& convert) the data, if necessary */ if (attr_src->shared->data) { if (NULL == (attr_dst->shared->data = H5FL_BLK_MALLOC(attr_buf, attr_dst->shared->data_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Check if we need to convert data */ if (H5T_detect_class(attr_src->shared->dt, H5T_VLEN, FALSE) > 0) { @@ -2206,40 +2206,40 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Create datatype ID for src datatype */ if ((tid_src = H5I_register(H5I_DATATYPE, attr_src->shared->dt, FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register source file datatype"); /* create a memory copy of the variable-length datatype */ if (NULL == (dt_mem = H5T_copy(attr_src->shared->dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register memory datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register memory datatype"); /* create variable-length datatype at the destination file */ if ((tid_dst = H5I_register(H5I_DATATYPE, attr_dst->shared->dt, FALSE)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, - "unable to register destination file datatype") + "unable to register destination file datatype"); /* Set up the conversion functions */ if (NULL == (tpath_src_mem = H5T_path_find(attr_src->shared->dt, dt_mem))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, - "unable to convert between src and mem datatypes") + "unable to convert between src and mem datatypes"); if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, attr_dst->shared->dt))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, - "unable to convert between mem and dst datatypes") + "unable to convert between mem and dst datatypes"); /* Determine largest datatype size */ if (0 == (src_dt_size = H5T_get_size(attr_src->shared->dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size"); if (0 == (tmp_dt_size = H5T_get_size(dt_mem))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size"); max_dt_size = MAX(src_dt_size, tmp_dt_size); if (0 == (tmp_dt_size = H5T_get_size(attr_dst->shared->dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to determine datatype size"); max_dt_size = MAX(max_dt_size, tmp_dt_size); /* Set number of whole elements that fit in buffer */ if (0 == (nelmts = attr_src->shared->data_size / src_dt_size)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "element size too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "element size too large"); /* Set up number of bytes to copy, and initial buffer size */ buf_size = nelmts * max_dt_size; @@ -2249,32 +2249,32 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Create the space and set the initial extent */ if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace"); /* Register */ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) { H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, NULL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, NULL, "unable to register dataspace ID"); } /* end if */ /* Allocate memory for recclaim buf */ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk"); /* Allocate memory for copying the chunk */ if (NULL == (buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk"); H5MM_memcpy(buf, attr_src->shared->data, attr_src->shared->data_size); /* Allocate background memory */ if (H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) if (NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Convert from source file to memory */ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed"); H5MM_memcpy(reclaim_buf, buf, buf_size); @@ -2284,12 +2284,12 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* 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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed"); H5MM_memcpy(attr_dst->shared->data, buf, attr_dst->shared->data_size); if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data"); } /* end if */ else { assert(attr_dst->shared->data_size == attr_src->shared->data_size); @@ -2302,7 +2302,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s /* Recompute the version to encode the destination attribute */ if (H5A__set_version(file_dst, attr_dst) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, NULL, "unable to update attribute version"); /* Recompute the destination attribute's size, if it's a different version */ if (attr_src->shared->version != attr_dst->shared->version) @@ -2390,7 +2390,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l /* Copy the shared object from source to destination */ if (H5O_copy_header_map(src_oloc_dt, dst_oloc_dt, cpy_info, FALSE, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Update shared message info from named datatype info */ H5T_update_shared(attr_dst->shared->dt); @@ -2400,9 +2400,9 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l * datatype is committed or sharing is disabled. */ if (H5SM_try_share(file_dst, NULL, H5SM_WAS_DEFERRED, H5O_DTYPE_ID, attr_dst->shared->dt, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute datatype") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute datatype"); if (H5SM_try_share(file_dst, NULL, H5SM_WAS_DEFERRED, H5O_SDSPACE_ID, attr_dst->shared->ds, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "can't share attribute dataspace"); /* Only need to fix reference attribute with real data being copied to * another file. @@ -2419,7 +2419,7 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src, H5O_l if (H5O_copy_expand_ref(file_src, H5I_INVALID_HID, attr_src->shared->dt, attr_src->shared->data, attr_src->shared->data_size, file_dst, attr_dst->shared->data, cpy_info) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy reference attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy reference attribute"); } /* end if */ else /* Reset value to zero */ @@ -2458,14 +2458,14 @@ H5A__dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata) if (NULL == (attr_dst = H5A__attr_copy_file(attr_src, udata->file, udata->recompute_size, udata->cpy_info))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute"); if (H5A__attr_post_copy_file(udata->oloc_src, attr_src, udata->oloc_dst, attr_dst, udata->cpy_info) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute"); /* Reset shared location information */ if (H5O_msg_reset_share(H5O_ATTR_ID, attr_dst) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing"); /* Set COPIED tag for destination object's metadata */ H5_BEGIN_TAG(H5AC__COPIED_TAG) @@ -2520,7 +2520,7 @@ H5A__dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainf if (H5A__dense_iterate(src_oloc->file, (hid_t)0, ainfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2555,12 +2555,12 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na /* Find the object's location */ if (H5G_loc_find(&loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Call attribute rename routine */ if (H5O__attr_rename(obj_loc.oloc, old_attr_name, new_attr_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute"); } /* end if */ done: @@ -2732,12 +2732,12 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Delete the attribute from the location */ if (H5O__attr_remove(obj_loc.oloc, attr_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); done: /* Release resources */ @@ -2775,12 +2775,12 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Delete the attribute from the location */ if (H5O__attr_remove_by_idx(obj_loc.oloc, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); done: /* Release resources */ diff --git a/src/H5Atest.c b/src/H5Atest.c index fdaf8bd..f66377d 100644 --- a/src/H5Atest.c +++ b/src/H5Atest.c @@ -85,7 +85,7 @@ H5A__is_shared_test(hid_t attr_id) /* Check arguments */ if (NULL == (attr = (H5A_t *)H5VL_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); /* Check if attribute is shared */ ret_value = H5O_msg_is_shared(H5O_ATTR_ID, attr); @@ -114,11 +114,11 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count) /* Check arguments */ if (NULL == (attr = (H5A_t *)H5VL_object_verify(attr_id, H5I_ATTR))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); /* Push API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Sanity check */ @@ -126,7 +126,7 @@ H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count) /* Retrieve ref count for shared or shareable attribute */ if (H5SM_get_refcount(attr->oloc.file, H5O_ATTR_ID, &attr->sh_loc, ref_count) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) diff --git a/src/H5B.c b/src/H5B.c index 4c87f11..ad53043 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -214,28 +214,28 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, haddr_t *addr_p /*out * 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node"); memset(&bt->cache_info, 0, sizeof(H5AC_info_t)); bt->level = 0; bt->left = HADDR_UNDEF; bt->right = HADDR_UNDEF; bt->nchildren = 0; if (NULL == (bt->rc_shared = (type->get_shared)(f, udata))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer") + 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); 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for B-tree root node"); if (HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "file allocation failed for B-tree root node"); /* * Cache the new B-tree node. */ if (H5AC_insert_entry(f, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache"); #ifdef H5B_DEBUG H5B__assert(f, *addr_p, shared->type, udata); #endif @@ -299,7 +299,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void * /* 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") + 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); assert(shared); @@ -311,7 +311,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void * cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); rt = bt->nchildren; while (lt < rt && cmp) { @@ -334,11 +334,11 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, hbool_t *found, void * if (bt->level > 0) { if ((ret_value = H5B_find(f, type, bt->child[idx], found, udata)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in subtree"); } /* end if */ else { if ((ret_value = (type->found)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), found, udata)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't lookup key in leaf node"); } /* end else */ } /* end else */ @@ -397,7 +397,7 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ /* Get B-tree split ratios */ if (H5CX_get_btree_split_ratios(split_ratios) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree split ratios") + HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree split ratios"); #ifdef H5B_DEBUG if (H5DEBUG(B)) { @@ -446,13 +446,13 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ * Create the new B-tree node. */ if (H5B_create(f, shared->type, udata, &split_bt_ud->addr /*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create B-tree"); cache_udata.f = f; cache_udata.type = shared->type; cache_udata.rc_shared = bt_ud->bt->rc_shared; if (NULL == (split_bt_ud->bt = (H5B_t *)H5AC_protect(f, H5AC_BT, split_bt_ud->addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree"); split_bt_ud->bt->level = bt_ud->bt->level; /* @@ -483,12 +483,12 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx, void *udata, H5B_ins_ud_ if (NULL == (tmp_bt = (H5B_t *)H5AC_protect(f, H5AC_BT, bt_ud->bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load right sibling") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load right sibling"); tmp_bt->left = split_bt_ud->addr; if (H5AC_unprotect(f, H5AC_BT, bt_ud->bt->right, tmp_bt, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); } /* end if */ bt_ud->bt->right = split_bt_ud->addr; @@ -549,7 +549,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *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") + 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); assert(shared); @@ -559,12 +559,12 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) cache_udata.rc_shared = rc_shared; bt_ud.addr = addr; if (NULL == (bt_ud.bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to locate root of B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to locate root of B-tree"); /* Insert the object */ if ((int)(my_ins = H5B__insert_helper(f, &bt_ud, type, lt_key, <_key_changed, md_key, udata, rt_key, &rt_key_changed, &split_bt_ud /*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to insert key"); /* Check if the root node split */ if (H5B_INS_NOOP == my_ins) { @@ -592,7 +592,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) */ H5_CHECK_OVERFLOW(shared->sizeof_rnode, size_t, hsize_t); if (HADDR_UNDEF == (old_root_addr = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)shared->sizeof_rnode))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move root"); /* * Move the node to the new location @@ -600,17 +600,17 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) /* Make a copy of the old root information */ if (NULL == (new_root_bt = H5B__copy(bt_ud.bt))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to copy old root") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to copy old root"); /* Unprotect the old root so we can move it. Also force it to be marked * dirty so it is written to the new location. */ if (H5AC_unprotect(f, H5AC_BT, bt_ud.addr, bt_ud.bt, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release old root"); bt_ud.bt = NULL; /* Make certain future references will be caught */ /* Move the location of the old root on the disk */ if (H5AC_move_entry(f, H5AC_BT, bt_ud.addr, old_root_addr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to move B-tree root node"); bt_ud.addr = old_root_addr; /* Update the split b-tree's left pointer to point to the new location */ @@ -634,7 +634,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) /* Insert the modified copy of the old root into the file again */ if (H5AC_insert_entry(f, H5AC_BT, addr, new_root_bt, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to add old B-tree root node to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to add old B-tree root node to cache"); done: if (ret_value < 0) @@ -795,7 +795,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 /* 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") + 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); assert(shared); @@ -827,7 +828,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, H5B_INS_ERROR, "unable to create leaf node"); bt->nchildren = 1; bt_ud->cache_flags |= H5AC__DIRTIED_FLAG; idx = 0; @@ -836,7 +837,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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, "unable to insert first leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "unable to insert first leaf node"); } /* end if */ else my_ins = H5B_INS_NOOP; @@ -850,12 +851,12 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node"); if ((int)(my_ins = H5B__insert_helper( f, &child_bt_ud, type, H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud /*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum subtree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum subtree"); } else if (type->follow_min) { /* @@ -866,7 +867,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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 minimum leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node"); } else { /* @@ -878,7 +879,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 H5MM_memcpy(md_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey); if ((type->new_node)(f, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata, md_key, &new_child_bt_ud.addr /*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node"); *lt_key_changed = TRUE; } /* end else */ @@ -886,7 +887,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 /* Since we are to the left of the leftmost key there must not be a left * sibling */ if (H5_addr_defined(bt->left)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, + "internal error: likely corrupt key values"); #endif /* H5_STRICT_FORMAT_CHECKS */ } else if (cmp > 0 && idx + 1 >= bt->nchildren) { @@ -899,12 +901,12 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node"); if ((int)(my_ins = H5B__insert_helper( f, &child_bt_ud, type, H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud /*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum subtree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum subtree"); } else if (type->follow_max) { /* @@ -916,7 +918,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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 maximum leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node"); } else { /* @@ -929,7 +931,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 H5MM_memcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey); if ((type->new_node)(f, H5B_INS_RIGHT, md_key, udata, H5B_NKEY(bt, shared, idx + 1), &new_child_bt_ud.addr /*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node"); *rt_key_changed = TRUE; } /* end else */ @@ -937,7 +939,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 /* Since we are to the right of the rightmost key there must not be a * right sibling */ if (H5_addr_defined(bt->right)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "internal error: likely corrupt key values") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, + "internal error: likely corrupt key values"); #endif /* H5_STRICT_FORMAT_CHECKS */ } else if (cmp) { @@ -958,12 +961,12 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load node"); if ((int)(my_ins = H5B__insert_helper(f, &child_bt_ud, type, H5B_NKEY(bt, shared, idx), lt_key_changed, md_key, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed, &new_child_bt_ud /*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert subtree"); } else { /* @@ -973,7 +976,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert leaf node"); } assert((int)my_ins >= 0); @@ -1023,7 +1026,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 */ if (bt->nchildren == shared->two_k) { if (H5B__split(f, bt_ud, idx, udata, split_bt_ud /*out*/) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, H5B_INS_ERROR, "unable to split node"); if (idx < bt->nchildren) { tmp_bt = bt; tmp_bt_flags_ptr = &bt_ud->cache_flags; @@ -1041,7 +1044,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 /* Insert the child */ if (H5B__insert_child(tmp_bt, tmp_bt_flags_ptr, idx, new_child_bt_ud.addr, my_ins, md_key) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert child"); } /* end else-if */ /* @@ -1109,7 +1112,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato /* 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") + 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); assert(shared); @@ -1118,7 +1121,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_operato cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load B-tree node"); /* Iterate over node's children */ for (u = 0; u < bt->nchildren && ret_value == H5_ITER_CONT; u++) { @@ -1218,7 +1221,8 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u /* 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") + 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); assert(shared); @@ -1230,7 +1234,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to load B-tree node"); rt = bt->nchildren; while (lt < rt && cmp) { @@ -1241,7 +1245,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u lt = idx + 1; } /* end while */ if (cmp) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "B-tree key not found"); /* * Follow the link to the subtree or to the data node. The return value @@ -1254,7 +1258,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u H5B__remove_helper(f, bt->child[idx], type, level + 1, H5B_NKEY(bt, shared, idx) /*out*/, lt_key_changed /*out*/, udata, H5B_NKEY(bt, shared, idx + 1) /*out*/, rt_key_changed /*out*/)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in subtree"); } else if (type->remove) { /* @@ -1264,7 +1268,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u */ if ((int)(ret_value = (type->remove)(f, bt->child[idx], H5B_NKEY(bt, shared, idx), lt_key_changed, udata, H5B_NKEY(bt, shared, idx + 1), rt_key_changed)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, H5B_INS_ERROR, "key not found in leaf node"); } else { /* @@ -1333,7 +1337,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u if (NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, - "unable to load node from tree") + "unable to load node from tree"); /* Copy right-most key from deleted node to right-most key * in its left neighbor, but only if it is not the critical @@ -1346,14 +1350,14 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u if (H5AC_unprotect(f, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, - "unable to release node from tree") + "unable to release node from tree"); sibling = NULL; /* Make certain future references will be caught */ } /* end if */ if (H5_addr_defined(bt->right)) { if (NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, - "unable to unlink node from tree") + "unable to unlink node from tree"); /* Copy left-most key from deleted node to left-most key in * its right neighbor, but only if it is not the critical @@ -1365,7 +1369,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u if (H5AC_unprotect(f, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, - "unable to release node from tree") + "unable to release node from tree"); sibling = NULL; /* Make certain future references will be caught */ } /* end if */ @@ -1380,7 +1384,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u if (H5AC_unprotect(f, H5AC_BT, addr, bt, bt_flags | H5AC__DELETED_FLAG) < 0) { bt = NULL; bt_flags = H5AC__NO_FLAGS_SET; - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to free B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to free B-tree node"); } /* end if */ bt = NULL; bt_flags = H5AC__NO_FLAGS_SET; @@ -1471,13 +1475,13 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u /* 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))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node"); H5MM_memcpy(H5B_NKEY(sibling, shared, sibling->nchildren), H5B_NKEY(bt, shared, 0), type->sizeof_nkey); if (H5AC_unprotect(f, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree"); sibling = NULL; /* Make certain future references will be caught */ } /* end if */ else if (*rt_key_changed && H5_addr_defined(bt->right)) { @@ -1487,12 +1491,12 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level, u /* Update the lefttmost key in the right sibling */ if (NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->right, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node"); H5MM_memcpy(H5B_NKEY(sibling, shared, 0), H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey); if (H5AC_unprotect(f, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release node from tree"); sibling = NULL; /* Make certain future references will be caught */ } /* end else */ @@ -1538,7 +1542,7 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) /* The actual removal */ if (H5B_INS_ERROR == H5B__remove_helper(f, addr, type, 0, lt_key, <_key_changed, udata, rt_key, &rt_key_changed)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to remove entry from B-tree"); #ifdef H5B_DEBUG H5B__assert(f, addr, type, udata); @@ -1576,7 +1580,7 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *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") + 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); assert(shared); @@ -1585,14 +1589,14 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); /* Iterate over all children in tree, deleting them */ if (bt->level > 0) { /* Iterate over all children in node, deleting them */ for (u = 0; u < bt->nchildren; u++) if (H5B_delete(f, type, bt->child[u], udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to delete B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to delete B-tree node"); } /* end if */ else { @@ -1605,7 +1609,7 @@ H5B_delete(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) /* Call user's callback for each entry */ if ((type->remove)(f, bt->child[u], H5B_NKEY(bt, shared, u), <_key_changed, udata, H5B_NKEY(bt, shared, u + 1), &rt_key_changed) < H5B_INS_NOOP) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't remove B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "can't remove B-tree node"); } /* end for */ } /* end if */ } /* end else */ @@ -1643,7 +1647,7 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey) /* Allocate space for the shared structure */ if (NULL == (shared = H5FL_CALLOC(H5B_shared_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for shared B-tree info"); /* Set up the "global" information for this file's groups */ shared->type = type; @@ -1660,11 +1664,11 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey) /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page"); 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys"); /* Initialize the offsets into the native key buffer */ for (u = 0; u < (shared->two_k + 1); u++) @@ -1743,7 +1747,7 @@ H5B__copy(const H5B_t *old_bt) /* Allocate memory for the new H5B_t object */ if (NULL == (new_node = H5FL_MALLOC(H5B_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node"); /* Copy the main structure */ H5MM_memcpy(new_node, old_bt, sizeof(H5B_t)); @@ -1753,7 +1757,7 @@ H5B__copy(const H5B_t *old_bt) 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))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node"); /* Copy the other structures */ H5MM_memcpy(new_node->native, old_bt->native, shared->sizeof_keys); @@ -1813,7 +1817,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ /* 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") + 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); assert(shared); @@ -1825,7 +1829,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); /* Cache information from this node */ left_child = bt->child[0]; @@ -1838,7 +1842,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ /* Release current node */ if (H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); bt = NULL; /* @@ -1849,7 +1853,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ /* Protect the next node to the right */ addr = next_addr; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "B-tree node"); /* Cache information from this node */ next_addr = bt->right; @@ -1860,7 +1864,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ /* Unprotect node */ if (H5AC_unprotect(f, H5AC_BT, addr, bt, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); bt = NULL; } /* end while */ @@ -1868,7 +1872,7 @@ H5B__get_info_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, const H5B_ if (level > 0) { /* Keep following the left-most child until we reach a leaf node. */ if (H5B__get_info_helper(f, type, left_child, info_udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "unable to list B-tree node"); } /* end if */ done: @@ -1914,7 +1918,7 @@ H5B_get_info(H5F_t *f, const H5B_class_t *type, haddr_t addr, H5B_info_t *bt_inf /* Iterate over the B-tree nodes */ if (H5B__get_info_helper(f, type, addr, &info_udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_BADITER, FAIL, "B-tree iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_BADITER, FAIL, "B-tree iteration failed"); /* Iterate over the B-tree records, making any "leaf" callbacks */ /* (Only if operator defined) */ @@ -1952,11 +1956,11 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr) assert(type); if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "address is undefined") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "address is undefined"); /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object"); assert(H5UC_GET_OBJ(rc_shared) != NULL); /* @@ -1966,7 +1970,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr) cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree node"); done: /* Release the node */ diff --git a/src/H5B2.c b/src/H5B2.c index 63ca28c..152a2d5 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -135,26 +135,26 @@ H5B2_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata) /* Create shared v2 B-tree header */ if (HADDR_UNDEF == (hdr_addr = H5B2__hdr_create(f, cparam, ctx_udata))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't create v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't create v2 B-tree header"); /* Create v2 B-tree wrapper */ if (NULL == (bt2 = H5FL_MALLOC(H5B2_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info"); /* Look up the B-tree header */ if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, ctx_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header"); /* Point v2 B-tree wrapper at header and bump it's ref count */ bt2->hdr = hdr; if (H5B2__hdr_incr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, - "can't increment reference count on shared v2 B-tree header") + "can't increment reference count on shared v2 B-tree header"); /* Increment # of files using this v2 B-tree header */ if (H5B2__hdr_fuse_incr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, - "can't increment file reference count on shared v2 B-tree header") + "can't increment file reference count on shared v2 B-tree header"); /* Set file pointer for this v2 B-tree open context */ bt2->f = f; @@ -197,26 +197,26 @@ H5B2_open(H5F_t *f, haddr_t addr, void *ctx_udata) /* Look up the B-tree header */ if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header"); /* Check for pending heap deletion */ if (hdr->pending_delete) - HGOTO_ERROR(H5E_BTREE, H5E_CANTOPENOBJ, NULL, "can't open v2 B-tree pending deletion") + HGOTO_ERROR(H5E_BTREE, H5E_CANTOPENOBJ, NULL, "can't open v2 B-tree pending deletion"); /* Create v2 B-tree info */ if (NULL == (bt2 = H5FL_MALLOC(H5B2_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info"); /* Point v2 B-tree wrapper at header */ bt2->hdr = hdr; if (H5B2__hdr_incr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, - "can't increment reference count on shared v2 B-tree header") + "can't increment reference count on shared v2 B-tree header"); /* Increment # of files using this v2 B-tree header */ if (H5B2__hdr_fuse_incr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, - "can't increment file reference count on shared v2 B-tree header") + "can't increment file reference count on shared v2 B-tree header"); /* Set file pointer for this v2 B-tree open context */ bt2->f = f; @@ -263,7 +263,7 @@ H5B2_insert(H5B2_t *bt2, void *udata) /* Insert the record */ if (H5B2__insert(hdr, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -304,18 +304,18 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) if (!H5_addr_defined(hdr->root.addr)) { /* Create root node as leaf node in B-tree */ if (H5B2__create_leaf(hdr, hdr, &(hdr->root)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node"); } /* end if */ /* Attempt to insert record into B-tree */ if (hdr->depth > 0) { if (H5B2__update_internal(hdr, hdr->depth, NULL, &hdr->root, &status, H5B2_POS_ROOT, hdr, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree internal node"); } /* end if */ else { if (H5B2__update_leaf(hdr, &hdr->root, &status, H5B2_POS_ROOT, hdr, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree leaf node"); } /* end else */ /* Sanity check */ @@ -324,12 +324,12 @@ H5B2_update(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Use insert algorithm if nodes to leaf full */ if (H5B2_UPDATE_INSERT_CHILD_FULL == status) { if (H5B2__insert(hdr, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree"); } /* end if */ else if (H5B2_UPDATE_SHADOW_DONE == status || H5B2_UPDATE_INSERT_DONE == status) { /* Mark B-tree header as dirty */ if (H5B2__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty"); } /* end else-if */ else { /* Sanity check */ @@ -463,7 +463,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da */ if (hdr->min_native_rec != NULL) { if ((hdr->cls->compare)(udata, hdr->min_native_rec, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp < 0) { *found = FALSE; /* Less than the least record--not found */ HGOTO_DONE(SUCCEED); @@ -471,14 +471,14 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da else if (cmp == 0) { /* Record is found */ if (op && (op)(hdr->min_native_rec, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree find operation") + "'found' callback failed for B-tree find operation"); *found = TRUE; HGOTO_DONE(SUCCEED); } /* end if */ } /* end if */ if (hdr->max_native_rec != NULL) { if ((hdr->cls->compare)(udata, hdr->max_native_rec, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp > 0) { *found = FALSE; /* Greater than the largest record--not found */ HGOTO_DONE(SUCCEED); @@ -486,7 +486,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da else if (cmp == 0) { /* Record is found */ if (op && (op)(hdr->max_native_rec, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree find operation") + "'found' callback failed for B-tree find operation"); *found = TRUE; HGOTO_DONE(SUCCEED); } /* end if */ @@ -509,12 +509,12 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da /* Lock B-tree current node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -523,7 +523,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da &cmp) < 0) { /* Unlock current node before failing */ H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET); - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); } /* end if */ if (cmp > 0) @@ -553,7 +553,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Keep track of parent if necessary */ if (hdr->swmr_write) @@ -568,15 +568,15 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree find operation") + "'found' callback failed for B-tree find operation"); } /* end if */ /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Indicate record found */ *found = TRUE; @@ -592,12 +592,12 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da /* Lock B-tree leaf node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -606,13 +606,13 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da 0) { /* Unlock current node before failing */ H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET); - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); } /* end if */ if (cmp != 0) { /* Unlock leaf node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Record not found */ *found = FALSE; @@ -623,10 +623,10 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da if (op && (op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) { /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree find operation") + "'found' callback failed for B-tree find operation"); } /* end if */ /* Check for record being the min or max for the tree */ @@ -637,7 +637,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da if (hdr->min_native_rec == NULL) if (NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree min record info") + "memory allocation failed for v2 B-tree min record info"); H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -646,7 +646,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da if (hdr->max_native_rec == NULL) if (NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree max record info") + "memory allocation failed for v2 B-tree max record info"); H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -655,7 +655,7 @@ H5B2_find(H5B2_t *bt2, void *udata, hbool_t *found, H5B2_found_t op, void *op_da /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Indicate record found */ *found = TRUE; @@ -711,11 +711,11 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi /* Check for empty tree */ if (curr_node_ptr.node_nrec == 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); /* Check for index greater than the number of records in the tree */ if (idx >= curr_node_ptr.all_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records"); /* Current depth of the tree */ depth = hdr->depth; @@ -737,12 +737,12 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi /* Lock B-tree current node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -757,7 +757,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Keep track of parent if necessary */ if (hdr->swmr_write) @@ -777,16 +777,16 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree find operation") + "'found' callback failed for B-tree find operation"); } /* end if */ /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_DONE(SUCCEED); } /* end if */ @@ -808,7 +808,7 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Keep track of parent if necessary */ if (hdr->swmr_write) @@ -831,12 +831,12 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi /* Lock B-tree leaf node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -847,14 +847,14 @@ H5B2_index(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_found_t op, voi if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) { /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "'found' callback failed for B-tree find operation"); } /* end if */ /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); } /* end block */ done: @@ -895,7 +895,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data) /* Check for empty B-tree */ if (0 == hdr->root.all_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree"); /* Attempt to remove record from B-tree */ if (hdr->depth > 0) { @@ -903,7 +903,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data) if (H5B2__remove_internal(hdr, &depth_decreased, NULL, NULL, hdr->depth, &(hdr->cache_info), NULL, H5B2_POS_ROOT, &hdr->root, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node"); /* Check for decreasing the depth of the B-tree */ if (depth_decreased) { @@ -911,11 +911,11 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data) if (hdr->node_info[hdr->depth].nat_rec_fac) if (H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't destroy node's native record block factory") + "can't destroy node's native record block factory"); if (hdr->node_info[hdr->depth].node_ptr_fac) if (H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't destroy node's node pointer block factory") + "can't destroy node's node pointer block factory"); assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth); hdr->depth = (uint16_t)(hdr->depth - depth_decreased); @@ -923,7 +923,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data) } /* end if */ else { if (H5B2__remove_leaf(hdr, &hdr->root, H5B2_POS_ROOT, hdr, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node"); } /* end else */ /* Decrement # of records in B-tree */ @@ -931,7 +931,7 @@ H5B2_remove(H5B2_t *bt2, void *udata, H5B2_remove_t op, void *op_data) /* Mark B-tree header as dirty */ if (H5B2__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -965,11 +965,11 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_ /* Check for empty B-tree */ if (0 == hdr->root.all_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree"); /* Check for index greater than the number of records in the tree */ if (idx >= hdr->root.all_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree doesn't have that many records"); /* Check for reverse indexing and map requested index to appropriate forward index */ if (H5_ITER_DEC == order) @@ -981,7 +981,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_ if (H5B2__remove_internal_by_idx(hdr, &depth_decreased, NULL, NULL, hdr->depth, &(hdr->cache_info), NULL, &hdr->root, H5B2_POS_ROOT, idx, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node"); /* Check for decreasing the depth of the B-tree */ if (depth_decreased) { @@ -989,11 +989,11 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_ if (hdr->node_info[hdr->depth].nat_rec_fac) if (H5FL_fac_term(hdr->node_info[hdr->depth].nat_rec_fac) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't destroy node's native record block factory") + "can't destroy node's native record block factory"); if (hdr->node_info[hdr->depth].node_ptr_fac) if (H5FL_fac_term(hdr->node_info[hdr->depth].node_ptr_fac) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't destroy node's node pointer block factory") + "can't destroy node's node pointer block factory"); assert((uint16_t)(hdr->depth - depth_decreased) < hdr->depth); hdr->depth = (uint16_t)(hdr->depth - depth_decreased); @@ -1001,7 +1001,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_ } /* end if */ else { if (H5B2__remove_leaf_by_idx(hdr, &hdr->root, H5B2_POS_ROOT, hdr, (unsigned)idx, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node"); } /* end else */ /* Decrement # of records in B-tree */ @@ -1009,7 +1009,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, H5_iter_order_t order, hsize_t idx, H5B2_remove_ /* Mark B-tree header as dirty */ if (H5B2__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1080,17 +1080,17 @@ H5B2_neighbor(H5B2_t *bt2, H5B2_compare_t range, void *udata, H5B2_found_t op, v /* Check for empty tree */ if (!H5_addr_defined(hdr->root.addr)) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); /* Attempt to find neighbor record in B-tree */ if (hdr->depth > 0) { if (H5B2__neighbor_internal(hdr, hdr->depth, &hdr->root, NULL, range, hdr, udata, op, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "unable to find neighbor record in B-tree internal node") + "unable to find neighbor record in B-tree internal node"); } /* end if */ else { if (H5B2__neighbor_leaf(hdr, &hdr->root, NULL, range, hdr, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node"); } /* end else */ done: @@ -1142,7 +1142,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Check for empty tree */ if (0 == curr_node_ptr.node_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); /* Current depth of the tree */ depth = hdr->depth; @@ -1162,12 +1162,12 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Lock B-tree current node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -1176,7 +1176,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) &cmp) < 0) { /* Unlock current node before failing */ H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET); - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); } /* end if */ if (cmp > 0) @@ -1207,7 +1207,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Keep track of parent if necessary */ if (hdr->swmr_write) @@ -1227,10 +1227,10 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, - "'modify' callback failed for B-tree find operation") + "'modify' callback failed for B-tree find operation"); } /* end if */ /* Mark the node as dirty if it changed */ @@ -1238,7 +1238,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, internal_flags) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_DONE(SUCCEED); } /* end else */ @@ -1254,12 +1254,12 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Lock B-tree leaf 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ @@ -1268,13 +1268,13 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) 0) { /* Unlock current node before failing */ H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET); - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); } /* end if */ if (cmp != 0) { /* Unlock leaf node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Note: don't push error on stack, leave that to next higher level, * since many times the B-tree is searched in order to determine @@ -1290,10 +1290,10 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, - "'modify' callback failed for B-tree find operation") + "'modify' callback failed for B-tree find operation"); } /* end if */ /* Check for modified record being the min or max for the tree */ @@ -1304,7 +1304,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) if (hdr->min_native_rec == NULL) if (NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree min record info") + "memory allocation failed for v2 B-tree min record info"); H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -1313,7 +1313,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) if (hdr->max_native_rec == NULL) if (NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree max record info") + "memory allocation failed for v2 B-tree max record info"); H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -1325,7 +1325,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, leaf_flags) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); } /* end block */ done: @@ -1390,7 +1390,7 @@ H5B2_close(H5B2_t *bt2) if (H5AC_get_entry_status(bt2->f, bt2_addr, &hdr_status) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to check metadata cache status for v2 B-tree header, address = %llu", - (unsigned long long)bt2_addr) + (unsigned long long)bt2_addr); /* Sanity checks on header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -1402,7 +1402,7 @@ H5B2_close(H5B2_t *bt2) /* Lock the v2 B-tree header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ if (NULL == (hdr = H5B2__hdr_protect(bt2->f, bt2_addr, NULL, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header"); /* Set the shared v2 B-tree header's file context for this operation */ hdr->f = bt2->f; @@ -1413,11 +1413,11 @@ H5B2_close(H5B2_t *bt2) */ if (H5B2__hdr_decr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared v2 B-tree header") + "can't decrement reference count on shared v2 B-tree header"); /* Delete v2 B-tree, starting with header (unprotects header) */ if (H5B2__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree"); } /* end if */ else { /* Decrement the reference count on the B-tree header */ @@ -1426,7 +1426,7 @@ H5B2_close(H5B2_t *bt2) */ if (H5B2__hdr_decr(bt2->hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared v2 B-tree header") + "can't decrement reference count on shared v2 B-tree header"); } /* end else */ @@ -1469,7 +1469,7 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_ /* Lock the v2 B-tree header into memory */ if (NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header"); /* Remember the callback & context for later */ hdr->remove_op = op; @@ -1484,7 +1484,7 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op, void *op_ /* Delete v2 B-tree now, starting with header (unprotects header) */ if (H5B2__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree"); hdr = NULL; } /* end if */ @@ -1537,7 +1537,7 @@ H5B2_depend(H5B2_t *bt2, H5AC_proxy_entry_t *parent) /* Add the v2 B-tree as a child of the parent (proxy) */ if (H5AC_proxy_entry_add_child(parent, hdr->f, hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree as child of proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree as child of proxy"); hdr->parent = parent; } /* end if */ diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 2c749ff..76aa73f 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -239,21 +239,21 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header"); /* Magic number */ if (memcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5B2_HDR_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version") + HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version"); /* B-tree class */ id = (H5B2_subid_t)*image++; if (id >= H5B2_NUM_BTREE_ID) - HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") + HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type"); /* Node size (in bytes) */ UINT32DECODE(image, cparam.node_size); @@ -284,7 +284,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* Initialize B-tree header info */ cparam.cls = H5B2_client_class_g[id]; if (H5B2__hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info"); /* Set the B-tree header's address */ hdr->addr = udata->addr; @@ -452,7 +452,7 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent, (void *)hdr->top_proxy) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between v2 B-tree and proxy") + "unable to destroy flush dependency between v2 B-tree and proxy"); hdr->parent = NULL; } /* end if */ @@ -461,14 +461,14 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(hdr->top_proxy, hdr) < 0) HGOTO_ERROR( H5E_BTREE, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between header and v2 B-tree 'top' proxy") + "unable to destroy flush dependency between header and v2 B-tree 'top' proxy"); /* Don't reset hdr->top_proxy here, it's destroyed when the header is freed -QAK */ } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -503,7 +503,7 @@ H5B2__cache_hdr_free_icr(void *thing) /* Destroy v2 B-tree header */ if (H5B2__hdr_free((H5B2_hdr_t *)thing) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free v2 B-tree header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -608,11 +608,11 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* Allocate new internal node and reset cache info */ if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Increment ref. count on B-tree header */ if (H5B2__hdr_incr(udata->hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header"); /* Share B-tree information */ internal->hdr = udata->hdr; @@ -621,28 +621,28 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* Magic number */ 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") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5B2_INT_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node version") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node version"); /* B-tree type */ if (*image++ != (uint8_t)udata->hdr->cls->id) - HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") + HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type"); /* Allocate space for the native keys in memory */ if (NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].nat_rec_fac))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for B-tree internal native keys") + "memory allocation failed for B-tree internal native keys"); /* Allocate space for the node pointers in memory */ if (NULL == (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[udata->depth].node_ptr_fac))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for B-tree internal node pointers") + "memory allocation failed for B-tree internal node pointers"); /* Set the number of records in the leaf & it's depth */ internal->nrec = udata->nrec; @@ -653,7 +653,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void for (u = 0; u < internal->nrec; u++) { /* Decode record */ if ((udata->hdr->cls->decode)(image, native, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode B-tree record") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode B-tree record"); /* Move to next record */ image += udata->hdr->rrec_size; @@ -769,7 +769,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le for (u = 0; u < internal->nrec; u++) { /* Encode record */ if ((internal->hdr->cls->encode)(image, native, internal->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record"); /* Move to next record */ image += internal->hdr->rrec_size; @@ -836,7 +836,7 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on parent */ if (H5B2__create_flush_depend((H5AC_info_t *)internal->parent, (H5AC_info_t *)internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -852,21 +852,21 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if (H5B2__destroy_flush_depend((H5AC_info_t *)internal->parent, (H5AC_info_t *)internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); /* Detach from 'top' proxy for v2 B-tree */ if (internal->top_proxy) { if (H5AC_proxy_entry_remove_child(internal->top_proxy, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between internal node and v2 B-tree " - "'top' proxy") + "'top' proxy"); internal->top_proxy = NULL; } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -902,7 +902,7 @@ H5B2__cache_int_free_icr(void *_thing) /* Release v2 B-tree internal node */ if (H5B2__internal_free(internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree internal node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1004,11 +1004,11 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* Allocate new leaf node and reset cache info */ if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Increment ref. count on B-tree header */ if (H5B2__hdr_incr(udata->hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, NULL, "can't increment ref. count on B-tree header"); /* Share B-tree header information */ leaf->hdr = udata->hdr; @@ -1017,20 +1017,20 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void /* Magic number */ 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") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5B2_LEAF_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree leaf node version") + HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree leaf node version"); /* B-tree type */ if (*image++ != (uint8_t)udata->hdr->cls->id) - HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type") + HGOTO_ERROR(H5E_BTREE, H5E_BADTYPE, NULL, "incorrect B-tree type"); /* Allocate space for the native keys in memory */ if (NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(udata->hdr->node_info[0].nat_rec_fac))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree leaf native keys") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree leaf native keys"); /* Set the number of records in the leaf */ leaf->nrec = udata->nrec; @@ -1040,7 +1040,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void for (u = 0; u < leaf->nrec; u++) { /* Decode record */ if ((udata->hdr->cls->decode)(image, native, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, NULL, "unable to decode B-tree record") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, NULL, "unable to decode B-tree record"); /* Move to next record */ image += udata->hdr->rrec_size; @@ -1141,7 +1141,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H for (u = 0; u < leaf->nrec; u++) { /* Encode record */ if ((leaf->hdr->cls->encode)(image, native, leaf->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree record"); /* Move to next record */ image += leaf->hdr->rrec_size; @@ -1195,7 +1195,7 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: /* Create flush dependency on parent */ if (H5B2__create_flush_depend((H5AC_info_t *)leaf->parent, (H5AC_info_t *)leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -1211,21 +1211,21 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if (H5B2__destroy_flush_depend((H5AC_info_t *)leaf->parent, (H5AC_info_t *)leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); /* Detach from 'top' proxy for v2 B-tree */ if (leaf->top_proxy) { if (H5AC_proxy_entry_remove_child(leaf->top_proxy, leaf) < 0) HGOTO_ERROR( H5E_BTREE, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between leaf node and v2 B-tree 'top' proxy") + "unable to destroy flush dependency between leaf node and v2 B-tree 'top' proxy"); leaf->top_proxy = NULL; } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -1261,7 +1261,7 @@ H5B2__cache_leaf_free_icr(void *_thing) /* Destroy v2 B-tree leaf node */ if (H5B2__leaf_free(leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree leaf node"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index f246e97..af558f2 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -94,7 +94,7 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Load the B-tree header */ if (NULL == (hdr = H5B2__hdr_protect(f, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header"); /* Set file pointer for this B-tree operation */ hdr->f = f; @@ -173,7 +173,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co /* Load the B-tree header */ if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load v2 B-tree header"); /* Set file pointer for this B-tree operation */ hdr->f = f; @@ -186,7 +186,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned); if (NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node"); /* Print opening message */ fprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, ""); @@ -271,7 +271,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c /* Load the B-tree header */ if (NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header"); /* Set file pointer for this B-tree operation */ hdr->f = f; @@ -283,7 +283,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c node_ptr.addr = addr; H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned); if (NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Print opening message */ fprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, ""); diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 49d5593..c4ffea2 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -128,12 +128,12 @@ 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") + HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed"); 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)))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize leaf node info */ sz_max_nrec = H5B2_NUM_LEAF_REC(hdr->node_size, hdr->rrec_size); @@ -144,13 +144,13 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui hdr->node_info[0].cum_max_nrec_size = 0; if (NULL == (hdr->node_info[0].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[0].max_nrec))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory"); hdr->node_info[0].node_ptr_fac = NULL; /* Allocate array of pointers to internal node native keys */ /* (uses leaf # of records because its the largest) */ if (NULL == (hdr->nat_off = H5FL_SEQ_MALLOC(size_t, (size_t)hdr->node_info[0].max_nrec))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize offsets in native key block */ /* (uses leaf # of records because its the largest) */ @@ -181,11 +181,11 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui if (NULL == (hdr->node_info[u].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[u].max_nrec))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't create node native key block factory"); if (NULL == (hdr->node_info[u].node_ptr_fac = H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[u].max_nrec + 1)))) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, - "can't create internal 'branch' node node pointer block factory") + "can't create internal 'branch' node node pointer block factory"); } /* end for */ } /* end if */ @@ -199,7 +199,8 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui /* Create the callback context, if the callback exists */ if (hdr->cls->crt_context) if (NULL == (hdr->cb_ctx = (*hdr->cls->crt_context)(ctx_udata))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, FAIL, "unable to create v2 B-tree client callback context") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, FAIL, + "unable to create v2 B-tree client callback context"); done: if (ret_value < 0) @@ -233,7 +234,7 @@ H5B2__hdr_alloc(H5F_t *f) /* Allocate space for the shared information */ if (NULL == (hdr = H5FL_CALLOC(H5B2_hdr_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree header"); /* Assign non-zero information */ hdr->f = f; @@ -276,31 +277,31 @@ H5B2__hdr_create(H5F_t *f, const H5B2_create_t *cparam, void *ctx_udata) /* Allocate v2 B-tree header */ if (NULL == (hdr = H5B2__hdr_alloc(f))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed for B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed for B-tree header"); /* Initialize shared B-tree info */ if (H5B2__hdr_init(hdr, cparam, ctx_udata, (uint16_t)0) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, HADDR_UNDEF, "can't create shared B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, HADDR_UNDEF, "can't create shared B-tree info"); /* Allocate space for the header on disk */ if (HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)hdr->hdr_size))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header"); /* Create 'top' proxy for extensible array entries */ if (hdr->swmr_write) if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, HADDR_UNDEF, "can't create v2 B-tree proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, HADDR_UNDEF, "can't create v2 B-tree proxy"); /* Cache the new B-tree node */ if (H5AC_insert_entry(f, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache"); inserted = TRUE; /* Add header as child of 'top' proxy */ if (hdr->top_proxy) if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, HADDR_UNDEF, - "unable to add v2 B-tree header as child of array proxy") + "unable to add v2 B-tree header as child of array proxy"); /* Set address of v2 B-tree header to return */ ret_value = hdr->addr; @@ -349,7 +350,7 @@ H5B2__hdr_incr(H5B2_hdr_t *hdr) /* Mark header as un-evictable when a B-tree node is depending on it */ if (hdr->rc == 0) if (H5AC_pin_protected_entry(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPIN, FAIL, "unable to pin v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPIN, FAIL, "unable to pin v2 B-tree header"); /* Increment reference count on B-tree header */ hdr->rc++; @@ -384,7 +385,7 @@ H5B2__hdr_decr(H5B2_hdr_t *hdr) /* Mark header as evictable again when no nodes depend on it */ if (hdr->rc == 0) if (H5AC_unpin_entry(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin v2 B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin v2 B-tree header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -458,7 +459,7 @@ H5B2__hdr_dirty(H5B2_hdr_t *hdr) /* Mark B-tree header as dirty in cache */ if (H5AC_mark_entry_dirty(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark v2 B-tree header as dirty") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark v2 B-tree header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -497,18 +498,18 @@ H5B2__hdr_protect(H5F_t *f, haddr_t hdr_addr, void *ctx_udata, unsigned flags) /* Protect the header */ if (NULL == (hdr = (H5B2_hdr_t *)H5AC_protect(f, H5AC_BT2_HDR, hdr_addr, &udata, flags))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to load v2 B-tree header, address = %llu", - (unsigned long long)hdr_addr) + (unsigned long long)hdr_addr); hdr->f = f; /* (Must be set again here, in case the header was already in the cache -QAK) */ /* Create top proxy, if it doesn't exist */ if (hdr->swmr_write && NULL == hdr->top_proxy) { /* Create 'top' proxy for v2 B-tree entries */ if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, NULL, "can't create v2 B-tree proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCREATE, NULL, "can't create v2 B-tree proxy"); /* Add header as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, NULL, "unable to add v2 B-tree header as child of proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, NULL, "unable to add v2 B-tree header as child of proxy"); } /* end if */ /* Set return value */ @@ -548,7 +549,7 @@ H5B2__hdr_unprotect(H5B2_hdr_t *hdr, unsigned cache_flags) /* Unprotect the header */ if (H5AC_unprotect(hdr->f, H5AC_BT2_HDR, hdr->addr, hdr, cache_flags) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect v2 B-tree header, address = %llu", (unsigned long long)hdr->addr) + "unable to unprotect v2 B-tree header, address = %llu", (unsigned long long)hdr->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -576,7 +577,7 @@ H5B2__hdr_free(H5B2_hdr_t *hdr) /* Destroy the callback context */ if (hdr->cb_ctx) { if ((*hdr->cls->dst_context)(hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "can't destroy v2 B-tree client callback context") + HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "can't destroy v2 B-tree client callback context"); hdr->cb_ctx = NULL; } /* end if */ @@ -597,11 +598,11 @@ H5B2__hdr_free(H5B2_hdr_t *hdr) if (hdr->node_info[u].nat_rec_fac) if (H5FL_fac_term(hdr->node_info[u].nat_rec_fac) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, - "can't destroy node's native record block factory") + "can't destroy node's native record block factory"); if (hdr->node_info[u].node_ptr_fac) if (H5FL_fac_term(hdr->node_info[u].node_ptr_fac) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, - "can't destroy node's node pointer block factory") + "can't destroy node's node pointer block factory"); } /* end for */ /* Free the array of node info structs */ @@ -617,7 +618,7 @@ H5B2__hdr_free(H5B2_hdr_t *hdr) /* Destroy the 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_dest(hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to destroy v2 B-tree 'top' proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to destroy v2 B-tree 'top' proxy"); hdr->top_proxy = NULL; } /* end if */ @@ -655,7 +656,7 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr) /* Check the v2 B-tree header's status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, hdr->addr, &hdr_status) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, - "unable to check metadata cache status for v2 B-tree header") + "unable to check metadata cache status for v2 B-tree header"); /* Sanity checks on v2 B-tree header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -666,7 +667,7 @@ H5B2__hdr_delete(H5B2_hdr_t *hdr) /* Delete all nodes in B-tree */ if (H5_addr_defined(hdr->root.addr)) if (H5B2__delete_node(hdr, hdr->depth, &hdr->root, hdr, hdr->remove_op, hdr->remove_op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete B-tree nodes") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete B-tree nodes"); /* Indicate that the heap header should be deleted & file space freed */ cache_flags |= H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; diff --git a/src/H5B2int.c b/src/H5B2int.c index a514078..269d7f7 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -101,7 +101,7 @@ H5B2__locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off, co while (lo < hi && *cmp) { my_idx = (lo + hi) / 2; if ((type->compare)(udata, native + rec_off[my_idx], cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (*cmp < 0) hi = my_idx; else @@ -164,7 +164,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, /* Create new internal node */ internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec = 0; if (H5B2__create_internal(hdr, internal, &(internal->node_ptrs[idx + 1]), (uint16_t)(depth - 1)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node"); /* Setup information for unlocking child nodes */ child_class = H5AC_BT2_INT; @@ -174,11 +174,11 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (NULL == (left_int = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_int = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1], (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -197,7 +197,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, /* Create new leaf node */ internal->node_ptrs[idx + 1].all_nrec = internal->node_ptrs[idx + 1].node_nrec = 0; if (H5B2__create_leaf(hdr, internal, &(internal->node_ptrs[idx + 1])) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new leaf node"); /* Setup information for unlocking child nodes */ child_class = H5AC_BT2_LEAF; @@ -206,11 +206,11 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, /* (Shadow the left node if doing SWMR writes) */ if (NULL == (left_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -290,7 +290,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (hdr->swmr_write && depth > 1) if (H5B2__update_child_flush_depends(hdr, depth, right_node_ptrs, 0, (unsigned)(*right_nrec + 1), left_child, right_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); #ifdef H5B2_DEBUG H5B2__assert_internal((hsize_t)0, hdr, internal); @@ -347,7 +347,7 @@ H5B2__split_root(H5B2_hdr_t *hdr) /* Re-allocate array of node info structs */ if (NULL == (hdr->node_info = H5FL_SEQ_REALLOC(H5B2_node_info_t, hdr->node_info, (size_t)(hdr->depth + 1)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Update node info for new depth of tree */ sz_max_nrec = H5B2_NUM_INT_REC(hdr, hdr->depth); @@ -361,11 +361,11 @@ H5B2__split_root(H5B2_hdr_t *hdr) H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned); if (NULL == (hdr->node_info[hdr->depth].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[hdr->depth].max_nrec))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory"); if (NULL == (hdr->node_info[hdr->depth].node_ptr_fac = H5FL_fac_init(sizeof(H5B2_node_ptr_t) * (hdr->node_info[hdr->depth].max_nrec + 1)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, - "can't create internal 'branch' node node pointer block factory") + "can't create internal 'branch' node node pointer block factory"); /* Keep old root node pointer info */ old_root_ptr = hdr->root; @@ -373,19 +373,19 @@ H5B2__split_root(H5B2_hdr_t *hdr) /* Create new internal node to use as root */ hdr->root.node_nrec = 0; if (H5B2__create_internal(hdr, hdr, &(hdr->root), hdr->depth) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node"); /* Protect new root node */ if (NULL == (new_root = H5B2__protect_internal(hdr, hdr, &hdr->root, hdr->depth, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Set first node pointer in root node to old root node pointer info */ new_root->node_ptrs[0] = old_root_ptr; /* Split original root node */ if (H5B2__split1(hdr, hdr->depth, &(hdr->root), NULL, new_root, &new_root_flags, 0) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split old root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split old root node"); done: /* Release new root node (marked as dirty) */ @@ -439,12 +439,12 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (NULL == (left_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -468,11 +468,11 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, /* (Shadow both nodes if doing SWMR writes) */ if (NULL == (left_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -549,7 +549,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (H5B2__update_child_flush_depends(hdr, depth, left_node_ptrs, (unsigned)(*left_nrec + 1), (unsigned)(*left_nrec + move_nrec + 1), right_child, left_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); /* Update number of records in child nodes */ *left_nrec = (uint16_t)(*left_nrec + move_nrec); @@ -612,7 +612,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (hdr->swmr_write && depth > 1) if (H5B2__update_child_flush_depends(hdr, depth, right_node_ptrs, 0, (unsigned)move_nrec, left_child, right_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); /* Update number of records in child nodes */ *left_nrec = new_left_nrec; @@ -717,17 +717,17 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (NULL == (left_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx - 1], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); left_addr = internal->node_ptrs[idx - 1].addr; if (NULL == (middle_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); middle_addr = internal->node_ptrs[idx].addr; if (NULL == (right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -756,15 +756,15 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, /* (Shadow all nodes if doing SWMR writes) */ if (NULL == (left_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx - 1], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx - 1].addr; if (NULL == (middle_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); middle_addr = internal->node_ptrs[idx].addr; if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for child nodes */ @@ -844,7 +844,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (H5B2__update_child_flush_depends(hdr, depth, left_node_ptrs, (unsigned)(*left_nrec + 1), (unsigned)(*left_nrec + moved_middle_nrec + 1), middle_child, left_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, + "unable to update child nodes to new parent"); /* Update the current number of records in middle node */ curr_middle_nrec = (uint16_t)(curr_middle_nrec - moved_middle_nrec); @@ -904,7 +905,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (H5B2__update_child_flush_depends(hdr, depth, right_node_ptrs, 0, (unsigned)right_nrec_move, middle_child, right_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, + "unable to update child nodes to new parent"); /* Update the current number of records in middle node */ curr_middle_nrec = (uint16_t)(curr_middle_nrec - right_nrec_move); @@ -961,7 +963,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (hdr->swmr_write && depth > 1) if (H5B2__update_child_flush_depends(hdr, depth, middle_node_ptrs, 0, (unsigned)left_nrec_move, left_child, middle_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, + "unable to update child nodes to new parent"); /* Update the current number of records in middle node */ curr_middle_nrec = (uint16_t)(curr_middle_nrec + left_nrec_move); @@ -1017,7 +1020,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, if (H5B2__update_child_flush_depends( hdr, depth, middle_node_ptrs, (unsigned)(curr_middle_nrec + 1), (unsigned)(curr_middle_nrec + right_nrec_move + 1), right_child, middle_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, + "unable to update child nodes to new parent"); /* Mark nodes as dirty */ middle_child_flags |= H5AC__DIRTIED_FLAG; @@ -1133,12 +1137,12 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (NULL == (left_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1], (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for accessing child node information */ @@ -1162,11 +1166,11 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, /* (Shadow the left node if doing SWMR writes) */ if (NULL == (left_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx].addr; if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for accessing child node information */ @@ -1198,7 +1202,7 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (H5B2__update_child_flush_depends(hdr, depth, left_node_ptrs, (unsigned)(*left_nrec + 1), (unsigned)(*left_nrec + *right_nrec + 2), right_child, left_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); /* Update # of records in left node */ *left_nrec = (uint16_t)(*left_nrec + *right_nrec + 1); @@ -1313,17 +1317,17 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (NULL == (left_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx - 1], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); left_addr = internal->node_ptrs[idx - 1].addr; if (NULL == (middle_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); middle_addr = internal->node_ptrs[idx].addr; if (NULL == (right_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx + 1], (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for accessing child node information */ @@ -1352,15 +1356,15 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, /* (Shadow left and middle nodes if doing SWMR writes) */ if (NULL == (left_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx - 1], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); left_addr = internal->node_ptrs[idx - 1].addr; if (NULL == (middle_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], hdr->swmr_write, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); middle_addr = internal->node_ptrs[idx].addr; if (NULL == (right_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx + 1], FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); right_addr = internal->node_ptrs[idx + 1].addr; /* More setup for accessing child node information */ @@ -1421,7 +1425,7 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (H5B2__update_child_flush_depends(hdr, depth, left_node_ptrs, (unsigned)(*left_nrec + 1), (unsigned)(*left_nrec + middle_nrec_move + 1), middle_child, left_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); /* Update # of records in left & middle nodes */ *left_nrec = (uint16_t)(*left_nrec + middle_nrec_move); @@ -1453,7 +1457,7 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, if (H5B2__update_child_flush_depends(hdr, depth, middle_node_ptrs, (unsigned)(*middle_nrec + 1), (unsigned)(*middle_nrec + *right_nrec + 2), right_child, middle_child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child nodes to new parent"); /* Update # of records in middle node */ *middle_nrec = (uint16_t)(*middle_nrec + (*right_nrec + 1)); @@ -1546,28 +1550,28 @@ H5B2__insert(H5B2_hdr_t *hdr, void *udata) if (!H5_addr_defined(hdr->root.addr)) { /* Create root node as leaf node in B-tree */ if (H5B2__create_leaf(hdr, hdr, &(hdr->root)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node"); } /* end if */ /* Check if we need to split the root node (equiv. to a 1->2 node split) */ else if (hdr->root.node_nrec == hdr->node_info[hdr->depth].split_nrec) { /* Split root node */ if (H5B2__split_root(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split root node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split root node"); } /* end if */ /* Attempt to insert record into B-tree */ if (hdr->depth > 0) { if (H5B2__insert_internal(hdr, hdr->depth, NULL, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node"); } /* end if */ else { if (H5B2__insert_leaf(hdr, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node"); } /* end else */ /* Mark B-tree header as dirty */ if (H5B2__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1613,7 +1617,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, /* Lock the current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Set up information about current node */ curr_node_class = H5AC_BT2_INT; @@ -1623,7 +1627,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, /* Allocate space for the node pointers in memory */ if (NULL == (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") + "memory allocation failed for B-tree internal node pointers"); /* Copy the node pointers */ H5MM_memcpy(node_ptrs, internal->node_ptrs, @@ -1635,7 +1639,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, /* Lock the current B-tree node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Set up information about current node */ curr_node_class = H5AC_BT2_LEAF; @@ -1646,7 +1650,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, /* Allocate space for the native keys in memory */ if (NULL == (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") + "memory allocation failed for B-tree internal native keys"); /* Copy the native keys */ H5MM_memcpy(native, node_native, (hdr->cls->nrec_size * curr_node->node_nrec)); @@ -1654,7 +1658,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, /* Unlock the node */ if (H5AC_unprotect(hdr->f, curr_node_class, curr_node->addr, node, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); if (hdr->swmr_write) node_pinned = TRUE; else @@ -1726,7 +1730,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v /* Lock the current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Set up information about current node */ curr_node_class = H5AC_BT2_INT; @@ -1737,7 +1741,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v for (u = 0; u < internal->nrec + (unsigned)1; u++) if (H5B2__delete_node(hdr, (uint16_t)(depth - 1), &(internal->node_ptrs[u]), internal, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node descent failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node descent failed"); } /* end if */ else { H5B2_leaf_t *leaf; /* Pointer to leaf node */ @@ -1745,7 +1749,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v /* Lock the current B-tree node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, (H5B2_node_ptr_t *)curr_node, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Set up information about current node */ curr_node_class = H5AC_BT2_LEAF; @@ -1761,7 +1765,7 @@ H5B2__delete_node(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, v for (u = 0; u < curr_node->node_nrec; u++) { /* Make callback for each record */ if ((op)(H5B2_NAT_NREC(native, hdr, u), op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "iterator function failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "iterator function failed"); } /* end for */ } /* end if */ @@ -1803,7 +1807,7 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, voi /* Lock the current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Recursively descend into child nodes, if we are above the "twig" level in the B-tree */ if (depth > 1) { @@ -1813,7 +1817,7 @@ H5B2__node_size(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node, voi for (u = 0; u < internal->nrec + (unsigned)1; u++) if (H5B2__node_size(hdr, (uint16_t)(depth - 1), &(internal->node_ptrs[u]), internal, btree_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed"); } /* end if */ else /* depth is 1: count all the leaf nodes from this node */ *btree_size += (hsize_t)(internal->nrec + 1) * hdr->node_size; @@ -1850,7 +1854,7 @@ H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Create a flush dependency between parent and child entry */ if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1885,7 +1889,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node /* Check the node's entry status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, node_ptr->addr, &node_status) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to check status of B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to check status of B-tree node"); /* If the node is in the cache, check for retargeting its parent */ if (node_status & H5AC_ES__IN_CACHE) { @@ -1899,7 +1903,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node /* Protect child */ if (NULL == (child_int = H5B2__protect_internal(hdr, new_parent, node_ptr, (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); child_class = H5AC_BT2_INT; child = child_int; @@ -1916,7 +1920,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node /* Protect child */ if (NULL == (child_leaf = H5B2__protect_leaf(hdr, new_parent, (H5B2_node_ptr_t *)node_ptr, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); child_class = H5AC_BT2_LEAF; child = child_leaf; @@ -1935,10 +1939,10 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_t *node /* Switch the flush dependency for the node */ if (H5B2__destroy_flush_depend((H5AC_info_t *)old_parent, (H5AC_info_t *)child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); *parent_ptr = new_parent; if (H5B2__create_flush_depend((H5AC_info_t *)new_parent, (H5AC_info_t *)child) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); } /* end if */ } /* end if */ @@ -1981,7 +1985,7 @@ H5B2__update_child_flush_depends(H5B2_hdr_t *hdr, unsigned depth, H5B2_node_ptr_ for (u = start_idx; u < end_idx; u++) /* Update parent for children */ if (H5B2__update_flush_depend(hdr, depth - 1, &node_ptrs[u], old_parent, new_parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2009,7 +2013,7 @@ H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Destroy a flush dependency between parent and child entry */ if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5B2internal.c b/src/H5B2internal.c index e8405de..399bcd2 100644 --- a/src/H5B2internal.c +++ b/src/H5B2internal.c @@ -91,11 +91,11 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, /* Allocate memory for internal node information */ if (NULL == (internal = H5FL_CALLOC(H5B2_internal_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal info"); /* Increment ref. count on B-tree header */ if (H5B2__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header"); /* Share B-tree header information */ internal->hdr = hdr; @@ -103,14 +103,14 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, /* Allocate space for the native keys in memory */ 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") + "memory allocation failed for B-tree internal native keys"); 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") + "memory allocation failed for B-tree internal node pointers"); memset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1)); /* Set depth of the node */ @@ -124,17 +124,17 @@ H5B2__create_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, /* Allocate space on disk for the internal node */ if (HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, (hsize_t)hdr->node_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node"); /* Cache the new B-tree node */ if (H5AC_insert_entry(hdr->f, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache"); inserted = TRUE; /* Add internal node as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, internal) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree node as child of proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree node as child of proxy"); internal->top_proxy = hdr->top_proxy; } /* end if */ @@ -200,21 +200,21 @@ H5B2__protect_internal(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, /* Protect the internal node */ if (NULL == (internal = (H5B2_internal_t *)H5AC_protect(hdr->f, H5AC_BT2_INT, node_ptr->addr, &udata, flags))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree internal node"); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == internal->top_proxy) { /* Add internal node as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, internal) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, NULL, - "unable to add v2 B-tree internal node as child of proxy") + "unable to add v2 B-tree internal node as child of proxy"); internal->top_proxy = hdr->top_proxy; } /* end if */ /* Shadow the node, if requested */ if (shadow) if (H5B2__shadow_internal(internal, node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, NULL, "unable to shadow internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, NULL, "unable to shadow internal node"); /* Set return value */ ret_value = internal; @@ -287,12 +287,12 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n /* Lock current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Locate node pointer for child */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp > 0) idx++; @@ -313,12 +313,12 @@ H5B2__neighbor_internal(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_n if (H5B2__neighbor_internal(hdr, (uint16_t)(depth - 1), &internal->node_ptrs[idx], neighbor_loc, comp, internal, udata, op, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "unable to find neighbor record in B-tree internal node") + "unable to find neighbor record in B-tree internal node"); } /* end if */ else { if (H5B2__neighbor_leaf(hdr, &internal->node_ptrs[idx], neighbor_loc, comp, internal, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree leaf node"); } /* end else */ done: @@ -360,7 +360,7 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in /* Lock current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Sanity check number of records */ assert(internal->nrec == curr_node_ptr->node_nrec); @@ -374,9 +374,9 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in /* Locate node pointer for child */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp == 0) - HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree"); if (cmp > 0) idx++; @@ -398,24 +398,24 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec < split_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__split1(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node"); } /* end else */ } /* end if */ else if (idx == internal->nrec) { /* Right-most child */ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec < split_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, (idx - 1)) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__split1(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node"); } /* end else */ } /* end if */ else { /* Middle child */ @@ -423,12 +423,12 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in (internal->node_ptrs[idx - 1].node_nrec < split_nrec))) { if (H5B2__redistribute3(hdr, depth, internal, &internal_flags, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__split1(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split child node"); } /* end else */ } /* end else */ @@ -437,9 +437,9 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp == 0) - HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree"); if (cmp > 0) idx++; @@ -464,11 +464,11 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in if (depth > 1) { if (H5B2__insert_internal(hdr, (uint16_t)(depth - 1), &internal_flags, &internal->node_ptrs[idx], next_pos, internal, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node"); } /* end if */ else { if (H5B2__insert_leaf(hdr, &internal->node_ptrs[idx], next_pos, internal, udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node"); } /* end else */ /* Update record count for node pointer to current node */ @@ -528,7 +528,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in /* Lock current B-tree node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, curr_node_ptr, depth, FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); /* Sanity check number of records */ assert(internal->nrec == curr_node_ptr->node_nrec); @@ -536,7 +536,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in /* Locate node pointer for child */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); /* Check for modifying existing record */ if (0 == cmp) { @@ -548,7 +548,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in assert(changed == FALSE); HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, - "'modify' callback failed for B-tree update operation") + "'modify' callback failed for B-tree update operation"); } /* end if */ /* Mark the node as dirty if it changed */ @@ -579,12 +579,12 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in if (H5B2__update_internal(hdr, (uint16_t)(depth - 1), &internal_flags, &internal->node_ptrs[idx], status, next_pos, internal, udata, op, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, - "unable to update record in internal B-tree node") + "unable to update record in internal B-tree node"); } /* end if */ else { if (H5B2__update_leaf(hdr, &internal->node_ptrs[idx], status, next_pos, internal, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in leaf B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in leaf B-tree node"); } /* end else */ /* Take actions based on child's status report */ @@ -649,7 +649,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, - "unable to release internal B-tree node") + "unable to release internal B-tree node"); internal = NULL; /* Punt back to caller */ @@ -659,7 +659,7 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in /* Release the internal B-tree node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node"); internal = NULL; /* Indicate that the record was inserted */ @@ -669,13 +669,13 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in if (H5B2__insert_internal(hdr, depth, parent_cache_info_flags_ptr, curr_node_ptr, curr_pos, parent, udata) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, - "unable to insert record into internal B-tree node") + "unable to insert record into internal B-tree node"); break; case H5B2_UPDATE_UNKNOWN: default: assert(0 && "Invalid update status"); - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "invalid update status") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "invalid update status"); } /* end switch */ } /* end else */ @@ -748,11 +748,11 @@ H5B2__shadow_internal(H5B2_internal_t *internal, H5B2_node_ptr_t *curr_node_ptr) */ /* Allocate space for the cloned node */ if (HADDR_UNDEF == (new_node_addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, (hsize_t)hdr->node_size))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move B-tree node"); /* Move the location of the node on the disk */ if (H5AC_move_entry(hdr->f, H5AC_BT2_INT, curr_node_ptr->addr, new_node_addr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMOVE, FAIL, "unable to move B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMOVE, FAIL, "unable to move B-tree node"); curr_node_ptr->addr = new_node_addr; /* Should free the space in the file, but this is not supported by @@ -805,7 +805,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); internal_addr = curr_node_ptr->addr; /* Determine the correct number of records to merge at */ @@ -819,7 +819,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, /* Merge children of root node */ if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, 0) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); /* Let the cache know that the object is deleted */ internal_flags |= H5AC__DELETED_FLAG; @@ -833,7 +833,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, /* Update flush dependency for child, if using SWMR */ if (hdr->swmr_write) if (H5B2__update_flush_depend(hdr, depth, curr_node_ptr, internal, hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent"); /* Indicate that the level of the B-tree decreased */ *depth_decreased = TRUE; @@ -858,7 +858,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, /* Shadow the node if doing SWMR writes */ if (hdr->swmr_write) { if (H5B2__shadow_internal(internal, curr_node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node"); internal_addr = curr_node_ptr->addr; } /* end if */ @@ -868,7 +868,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, else { if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp >= 0) idx++; } /* end else */ @@ -894,24 +894,24 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end if */ else if (idx == internal->nrec) { /* Right-most child */ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, (idx - 1)) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, (idx - 1)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end if */ else { /* Middle child */ @@ -919,12 +919,12 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) { if (H5B2__redistribute3(hdr, depth, internal, &internal_flags, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge3(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end else */ @@ -936,7 +936,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, * re-searching */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp >= 0) idx++; } /* end else */ @@ -954,7 +954,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, /* Swap record to delete with record from leaf, if we are the last internal node */ if (swap_loc && depth == 1) if (H5B2__swap_leaf(hdr, depth, internal, &internal_flags, idx, swap_loc) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "Can't swap records in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "Can't swap records in B-tree"); /* Set pointers for advancing to child node */ new_cache_info_flags_ptr = &internal_flags; @@ -979,11 +979,11 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *swap_loc, if (H5B2__remove_internal(hdr, depth_decreased, swap_loc, swap_parent, (uint16_t)(depth - 1), new_cache_info, new_cache_info_flags_ptr, next_pos, new_node_ptr, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node"); } /* end if */ else { if (H5B2__remove_leaf(hdr, new_node_ptr, next_pos, new_cache_info, udata, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node"); } /* end else */ /* Update record count for node pointer to current node */ @@ -1046,7 +1046,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); internal_addr = curr_node_ptr->addr; assert(internal->nrec == curr_node_ptr->node_nrec); assert(depth == hdr->depth || internal->nrec > 1); @@ -1063,7 +1063,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw /* Merge children of root node */ if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, 0) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); /* Let the cache know that the object is deleted */ internal_flags |= H5AC__DELETED_FLAG; @@ -1077,7 +1077,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw /* Update flush dependency for child, if using SWMR */ if (hdr->swmr_write) if (H5B2__update_flush_depend(hdr, depth, curr_node_ptr, internal, hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update child node to new parent"); /* Indicate that the level of the B-tree decreased */ *depth_decreased = TRUE; @@ -1103,7 +1103,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw /* Shadow the node if doing SWMR writes */ if (hdr->swmr_write) { if (H5B2__shadow_internal(internal, curr_node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node"); internal_addr = curr_node_ptr->addr; } /* end if */ @@ -1159,24 +1159,24 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw if (retries > 0 && (internal->node_ptrs[idx + 1].node_nrec > merge_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end if */ else if (idx == internal->nrec) { /* Right-most child */ if (retries > 0 && (internal->node_ptrs[idx - 1].node_nrec > merge_nrec)) { if (H5B2__redistribute2(hdr, depth, internal, (idx - 1)) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge2(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, (idx - 1)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end if */ else { /* Middle child */ @@ -1184,12 +1184,12 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw (internal->node_ptrs[idx - 1].node_nrec > merge_nrec))) { if (H5B2__redistribute3(hdr, depth, internal, &internal_flags, idx) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTREDISTRIBUTE, FAIL, - "unable to redistribute child node records") + "unable to redistribute child node records"); } /* end if */ else { if (H5B2__merge3(hdr, depth, curr_node_ptr, parent_cache_info_flags_ptr, internal, &internal_flags, idx) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to merge child node"); } /* end else */ } /* end else */ @@ -1245,7 +1245,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw /* Swap record to delete with record from leaf, if we are the last internal node */ if (swap_loc && depth == 1) if (H5B2__swap_leaf(hdr, depth, internal, &internal_flags, idx, swap_loc) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "can't swap records in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSWAP, FAIL, "can't swap records in B-tree"); /* Set pointers for advancing to child node */ new_cache_info_flags_ptr = &internal_flags; @@ -1270,12 +1270,12 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hbool_t *depth_decreased, void *sw if (H5B2__remove_internal_by_idx(hdr, depth_decreased, swap_loc, swap_parent, (uint16_t)(depth - 1), new_cache_info, new_cache_info_flags_ptr, new_node_ptr, next_pos, n, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node"); } /* end if */ else { if (H5B2__remove_leaf_by_idx(hdr, new_node_ptr, next_pos, new_cache_info, (unsigned)n, op, op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree leaf node"); } /* end else */ /* Update record count for node pointer to child node */ @@ -1332,7 +1332,7 @@ H5B2__internal_free(H5B2_internal_t *internal) /* Decrement ref. count on B-tree header */ if (H5B2__hdr_decr(internal->hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header"); /* Sanity check */ assert(NULL == internal->top_proxy); diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index 062528b..23a7c4d 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -91,18 +91,18 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr) /* Allocate memory for leaf information */ if (NULL == (leaf = H5FL_CALLOC(H5B2_leaf_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf info"); /* Increment ref. count on B-tree header */ if (H5B2__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header"); /* Share B-tree header information */ leaf->hdr = hdr; /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys"); memset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec); /* Set parent */ @@ -113,17 +113,17 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr) /* Allocate space on disk for the leaf */ if (HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, (hsize_t)hdr->node_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node"); /* Cache the new B-tree node */ if (H5AC_insert_entry(hdr->f, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache"); inserted = TRUE; /* Add leaf node as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree node as child of proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, FAIL, "unable to add v2 B-tree node as child of proxy"); leaf->top_proxy = hdr->top_proxy; } /* end if */ @@ -185,20 +185,20 @@ H5B2__protect_leaf(H5B2_hdr_t *hdr, void *parent, H5B2_node_ptr_t *node_ptr, hbo /* Protect the leaf node */ if (NULL == (leaf = (H5B2_leaf_t *)H5AC_protect(hdr->f, H5AC_BT2_LEAF, node_ptr->addr, &udata, flags))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect B-tree leaf node"); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == leaf->top_proxy) { /* Add leaf node as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, leaf) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, NULL, "unable to add v2 B-tree leaf node as child of proxy") + HGOTO_ERROR(H5E_BTREE, H5E_CANTSET, NULL, "unable to add v2 B-tree leaf node as child of proxy"); leaf->top_proxy = hdr->top_proxy; } /* end if */ /* Shadow the node, if requested */ if (shadow) if (H5B2__shadow_leaf(leaf, node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, NULL, "unable to shadow leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, NULL, "unable to shadow leaf node"); /* Set return value */ ret_value = leaf; @@ -269,11 +269,11 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh /* Lock current B-tree node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Locate node pointer for child */ if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp > 0) idx++; else if (cmp == 0 && comp == H5B2_COMPARE_GREATER) @@ -296,10 +296,10 @@ H5B2__neighbor_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, void *neigh /* Make callback for current record */ if ((op)(neighbor_loc, op_data) < 0) HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, - "'found' callback failed for B-tree neighbor operation") + "'found' callback failed for B-tree neighbor operation"); } /* end if */ else - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to find neighbor record in B-tree"); done: /* Release the B-tree leaf node */ @@ -337,7 +337,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* 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") + 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 */ assert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec); @@ -352,9 +352,9 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ else { /* Find correct location to insert this record */ if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp == 0) - HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_EXISTS, FAIL, "record is already in B-tree"); if (cmp > 0) idx++; @@ -366,7 +366,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* Make callback to store record in native form */ if ((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node"); /* Mark the node as dirty */ leaf_flags |= H5AC__DIRTIED_FLAG; @@ -386,7 +386,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ if (hdr->min_native_rec == NULL) if (NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree min record info") + "memory allocation failed for v2 B-tree min record info"); H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -395,7 +395,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ if (hdr->max_native_rec == NULL) if (NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree max record info") + "memory allocation failed for v2 B-tree max record info"); H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -448,7 +448,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Sanity check number of records */ assert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec); @@ -460,7 +460,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s else { /* Find correct location to insert this record */ if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); /* Check for inserting a record */ if (0 != cmp) { @@ -494,7 +494,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s assert(changed == FALSE); HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, - "'modify' callback failed for B-tree update operation") + "'modify' callback failed for B-tree update operation"); } /* end if */ /* Mark the node as dirty if it changed */ @@ -509,7 +509,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s /* Make callback to store record in native form */ if ((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node"); /* Mark the node as dirty */ leaf_flags |= H5AC__DIRTIED_FLAG; @@ -533,7 +533,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s if (hdr->min_native_rec == NULL) if (NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree min record info") + "memory allocation failed for v2 B-tree min record info"); H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -542,7 +542,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_update_s if (hdr->max_native_rec == NULL) if (NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size))) HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, - "memory allocation failed for v2 B-tree max record info") + "memory allocation failed for v2 B-tree max record info"); H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size); } /* end if */ } /* end if */ @@ -611,7 +611,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi if (NULL == (child_internal = H5B2__protect_internal(hdr, internal, &internal->node_ptrs[idx], (uint16_t)(depth - 1), FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node"); child_addr = internal->node_ptrs[idx].addr; /* More setup for accessing child node information */ @@ -627,7 +627,7 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsi /* Lock B-tree child node */ if (NULL == (child_leaf = H5B2__protect_leaf(hdr, internal, &internal->node_ptrs[idx], FALSE, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); child_addr = internal->node_ptrs[idx].addr; /* More setup for accessing child node information */ @@ -705,11 +705,11 @@ H5B2__shadow_leaf(H5B2_leaf_t *leaf, H5B2_node_ptr_t *curr_node_ptr) */ /* Allocate space for the cloned node */ if (HADDR_UNDEF == (new_node_addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, (hsize_t)hdr->node_size))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "unable to allocate file space to move B-tree node"); /* Move the location of the old child on the disk */ if (H5AC_move_entry(hdr->f, H5AC_BT2_LEAF, curr_node_ptr->addr, new_node_addr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTMOVE, FAIL, "unable to move B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTMOVE, FAIL, "unable to move B-tree node"); curr_node_ptr->addr = new_node_addr; /* Should free the space in the file, but this is not supported by @@ -753,7 +753,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); leaf_addr = curr_node_ptr->addr; /* Sanity check number of records */ @@ -762,9 +762,9 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* 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) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp != 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record is not in B-tree"); /* Check for invalidating the min/max record for the tree */ if (H5B2_POS_MIDDLE != curr_pos) { @@ -786,7 +786,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* Make 'remove' callback if there is one */ if (op) if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node"); /* Update number of records in node */ leaf->nrec--; @@ -795,7 +795,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_ /* Shadow the node if doing SWMR writes */ if (hdr->swmr_write) { if (H5B2__shadow_leaf(leaf, curr_node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node"); leaf_addr = curr_node_ptr->addr; } /* end if */ @@ -856,7 +856,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n /* Lock B-tree leaf 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); leaf_addr = curr_node_ptr->addr; /* Sanity check number of records */ @@ -884,7 +884,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n /* Make 'remove' callback if there is one */ if (op) if ((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record into leaf node"); /* Update number of records in node */ leaf->nrec--; @@ -893,7 +893,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr, H5B2_n /* Shadow the node if doing SWMR writes */ if (hdr->swmr_write) { if (H5B2__shadow_leaf(leaf, curr_node_ptr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node"); leaf_addr = curr_node_ptr->addr; } /* end if */ @@ -953,7 +953,7 @@ H5B2__leaf_free(H5B2_leaf_t *leaf) /* Decrement ref. count on B-tree header */ if (H5B2__hdr_decr(leaf->hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDEC, FAIL, "can't decrement ref. count on B-tree header"); /* Sanity check */ assert(NULL == leaf->top_proxy); diff --git a/src/H5B2stat.c b/src/H5B2stat.c index c84b6e9..52af554 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -119,7 +119,7 @@ H5B2_size(H5B2_t *bt2, hsize_t *btree_size) else /* Iterate through nodes */ if (H5B2__node_size(hdr, hdr->depth, &hdr->root, hdr, btree_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed"); } /* end if */ done: diff --git a/src/H5B2test.c b/src/H5B2test.c index face2e0..3285d30 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -138,7 +138,7 @@ H5B2__test_crt_context(void *_f) /* Allocate callback context */ if (NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context"); /* Determine the size of lengths in the file */ ctx->sizeof_size = H5F_SIZEOF_SIZE(f); @@ -472,7 +472,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo) /* Check for empty tree */ if (0 == curr_node_ptr.node_nrec) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "B-tree has no records"); /* Walk down B-tree to find record or leaf node where record is located */ cmp = -1; @@ -483,19 +483,19 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo) /* Lock B-tree current node */ if (NULL == (internal = H5B2__protect_internal(hdr, parent, &curr_node_ptr, depth, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree internal node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ /* Locate node pointer for child */ if (H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); if (cmp > 0) idx++; @@ -507,7 +507,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo) /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Keep track of parent if necessary */ if (hdr->swmr_write) @@ -519,7 +519,7 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo) else { /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Fill in information about the node */ ninfo->depth = depth; @@ -538,26 +538,26 @@ H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo) /* Lock B-tree leaf node */ if (NULL == (leaf = H5B2__protect_leaf(hdr, parent, &curr_node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node"); /* Unpin parent if necessary */ if (parent) { if (parent != hdr && H5AC_unpin_entry(parent) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPIN, FAIL, "unable to unpin parent entry"); parent = NULL; } /* end if */ /* Locate record */ if (H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx, &cmp) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); /* Unlock current node */ if (H5AC_unprotect(hdr->f, H5AC_BT2_LEAF, curr_node_ptr.addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node"); /* Indicate the depth that the record was found */ if (cmp != 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record not in B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "record not in B-tree"); } /* end block */ /* Fill in information about the leaf node */ @@ -601,7 +601,7 @@ H5B2__get_node_depth_test(H5B2_t *bt2, void *udata) /* Get information abou the node */ if (H5B2__get_node_info_test(bt2, udata, &ninfo) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, (-1), "error looking up node info") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, (-1), "error looking up node info"); /* Set return value */ ret_value = (int)ninfo.depth; diff --git a/src/H5Bcache.c b/src/H5Bcache.c index 8f0e1c8..3426426 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -137,7 +137,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ /* 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") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate B-tree struct"); memset(&bt->cache_info, 0, sizeof(H5AC_info_t)); /* Set & increment the ref-counted "shared" B-tree information for the node */ @@ -147,26 +147,26 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ /* Get a pointer to the shared info, for convenience */ shared = (H5B_shared_t *)H5UC_GET_OBJ(bt->rc_shared); if (NULL == shared) - HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, NULL, "can't get a pointer to shared data") + HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, NULL, "can't get a pointer to shared data"); /* Allocate space for the native keys and child addresses */ if (NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for native keys") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for native keys"); if (NULL == (bt->child = H5FL_SEQ_MALLOC(haddr_t, (size_t)shared->two_k))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for child addresses") + HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate buffer for child addresses"); /* 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 (memcmp(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree signature"); image += H5_SIZEOF_MAGIC; /* Node type and level */ if (H5_IS_BUFFER_OVERFLOW(image, 2, p_end)) HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*image++ != (uint8_t)udata->type->id) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "incorrect B-tree node type"); bt->level = *image++; /* Entries used */ @@ -176,7 +176,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ /* Check if bt->nchildren is greater than two_k */ if (bt->nchildren > shared->two_k) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum"); /* Sibling pointers */ if (H5_IS_BUFFER_OVERFLOW(image, H5F_sizeof_addr(udata->f), p_end)) @@ -194,7 +194,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ if (H5_IS_BUFFER_OVERFLOW(image, shared->sizeof_rkey, p_end)) HGOTO_ERROR(H5E_BTREE, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if ((udata->type->decode)(shared, image, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key"); image += shared->sizeof_rkey; native += udata->type->sizeof_nkey; @@ -208,7 +208,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, hbool_t H5_ if (bt->nchildren > 0) { /* Decode native key value */ if ((udata->type->decode)(shared, image, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key") + HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, NULL, "unable to decode key"); } /* Set return value */ @@ -290,7 +290,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo /* 2^8 limit: only 1 byte is used to store node level */ if (bt->level >= HDpow(2, LEVEL_BITS)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode node level") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode node level"); H5_CHECK_OVERFLOW(bt->level, unsigned, uint8_t); *image++ = (uint8_t)bt->level; @@ -307,7 +307,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo for (u = 0; u < bt->nchildren; ++u) { /* encode the key */ if (shared->type->encode(shared, image, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key"); image += shared->sizeof_rkey; native += shared->type->sizeof_nkey; @@ -317,7 +317,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, vo if (bt->nchildren > 0) { /* Encode the final key */ if (shared->type->encode(shared, image, native) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key") + HGOTO_ERROR(H5E_BTREE, H5E_CANTENCODE, FAIL, "unable to encode B-tree key"); image += shared->sizeof_rkey; } /* end if */ @@ -351,7 +351,7 @@ H5B__cache_free_icr(void *thing) /* Destroy B-tree node */ if (H5B__node_dest((H5B_t *)thing) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to destroy B-tree node"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index 93d44d0..73eccec 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -69,7 +69,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5 /* 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") + 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); assert(shared); @@ -80,7 +80,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5 cache_udata.type = type; cache_udata.rc_shared = rc_shared; if (NULL == (bt = (H5B_t *)H5AC_protect(f, H5AC_BT, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node") + HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node"); /* * Print the values. @@ -169,7 +169,7 @@ H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *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") + 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); assert(shared); diff --git a/src/H5C.c b/src/H5C.c index 8cff6fe..545154c 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -142,10 +142,10 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id, } /* end for */ if (NULL == (cache_ptr = H5FL_CALLOC(H5C_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list"); cache_ptr->tag_list = NULL; @@ -156,7 +156,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id, cache_ptr->flush_in_progress = FALSE; if (NULL == (cache_ptr->log_info = (H5C_log_info_t *)H5MM_calloc(sizeof(H5C_log_info_t)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed"); cache_ptr->aux_ptr = aux_ptr; @@ -343,7 +343,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id, if (H5C_reset_cache_hit_rate_stats(cache_ptr) < 0) /* this should be impossible... */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "H5C_reset_cache_hit_rate_stats failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "H5C_reset_cache_hit_rate_stats failed"); H5C_stats__reset(cache_ptr); @@ -412,7 +412,7 @@ H5C_prep_for_file_close(H5F_t *f) /* Prepare cache image */ if (H5C__prep_image_for_file_close(f, &image_generated) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cache image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cache image"); #ifdef H5_HAVE_PARALLEL if ((H5F_INTENT(f) & H5F_ACC_RDWR) && !image_generated && cache_ptr->aux_ptr != NULL && @@ -451,7 +451,7 @@ H5C_prep_for_file_close(H5F_t *f) * deletions, insertion, or moves during the flush. */ if (H5C__serialize_cache(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialization of the cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialization of the cache failed"); } /* end if */ #endif /* H5_HAVE_PARALLEL */ @@ -489,21 +489,21 @@ H5C_dest(H5F_t *f) #if H5AC_DUMP_IMAGE_STATS_ON_CLOSE if (H5C__image_stats(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't display cache image stats") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't display cache image stats"); #endif /* H5AC_DUMP_IMAGE_STATS_ON_CLOSE */ /* Enable the slist, as it is needed in the flush */ if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); /* Flush and invalidate all cache entries */ if (H5C__flush_invalidate_cache(f, H5C__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache"); /* Generate & write cache image if requested */ if (cache_ptr->image_ctl.generate_image) if (H5C__generate_cache_image(f, cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "Can't generate metadata cache image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "Can't generate metadata cache image"); /* Question: Is it possible for cache_ptr->slist be non-null at this * point? If no, shouldn't this if statement be an assert? @@ -568,15 +568,15 @@ H5C_evict(H5F_t *f) /* Enable the slist, as it is needed in the flush */ if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); /* Flush and invalidate all cache entries except the pinned entries */ if (H5C__flush_invalidate_cache(f, H5C__EVICT_ALLOW_LAST_PINS_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache"); /* Disable the slist */ if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist disabled failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist disabled failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -652,7 +652,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ destroy = ((flags & H5C__FLUSH_INVALIDATE_FLAG) != 0); @@ -663,7 +663,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags) if (destroy) { if (H5C__flush_invalidate_cache(f, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed"); } /* end if */ else { /* flush each ring, starting from the outermost ring and @@ -683,14 +683,14 @@ H5C_flush_cache(H5F_t *f, unsigned flags) /* Settle raw data FSM */ if (!cache_ptr->rdfsm_settled) if (H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed"); break; case H5C_RING_MDFSM: /* Settle metadata FSM */ if (!cache_ptr->mdfsm_settled) if (H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed"); break; case H5C_RING_SBE: @@ -698,13 +698,13 @@ H5C_flush_cache(H5F_t *f, unsigned flags) break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!"); break; } /* end switch */ } /* end if */ if (H5C__flush_ring(f, ring, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush ring failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush ring failed"); ring++; } /* end while */ } /* end else */ @@ -752,16 +752,16 @@ H5C_flush_to_min_clean(H5F_t *f) if (cache_ptr->check_write_permitted != NULL) { if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't get write_permitted") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't get write_permitted"); } /* end if */ else write_permitted = cache_ptr->write_permitted; if (!write_permitted) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache write is not permitted!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cache write is not permitted!?!"); if (H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C__make_space_in_cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C__make_space_in_cache failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -784,7 +784,7 @@ H5C_reset_cache_hit_rate_stats(H5C_t *cache_ptr) FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry"); cache_ptr->cache_hits = 0; cache_ptr->cache_accesses = 0; @@ -819,27 +819,27 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry"); if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry"); if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown config version") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown config version"); /* check general configuration section of the config: */ if (H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_GENERAL) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in general configuration fields of new config") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in general configuration fields of new config"); /* check size increase control fields of the config: */ if (H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INCREMENT) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size increase control fields of new config") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size increase control fields of new config"); /* check size decrease control fields of the config: */ if (H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_DECREMENT) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size decrease control fields of new config") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "error in the size decrease control fields of new config"); /* check for conflicts between size increase and size decrease controls: */ if (H5C_validate_resize_config(config_ptr, H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "conflicting threshold fields in new config") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "conflicting threshold fields in new config"); /* will set the increase possible fields to FALSE later if needed */ cache_ptr->size_increase_possible = TRUE; @@ -858,7 +858,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown incr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown incr_mode?!?!?"); } /* end switch */ /* logically, this is where configuration for flash cache size increases @@ -891,7 +891,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown decr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown decr_mode?!?!?"); } /* end switch */ if (config_ptr->max_size == config_ptr->min_size) { @@ -943,18 +943,18 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p if (H5C_reset_cache_hit_rate_stats(cache_ptr) < 0) /* this should be impossible... */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed"); /* remove excess epoch markers if any */ if ((config_ptr->decr_mode == H5C_decr__age_out_with_threshold) || (config_ptr->decr_mode == H5C_decr__age_out)) { if (cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction) if (H5C__autoadjust__ageout__remove_excess_markers(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers"); } /* end if */ else if (cache_ptr->epoch_markers_active > 0) { if (H5C__autoadjust__ageout__remove_all_markers(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers"); } /* configure flash size increase facility. We wait until the @@ -977,7 +977,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?"); break; } /* end switch */ } /* end if */ @@ -1004,7 +1004,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled) FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry"); /* There is no fundamental reason why we should not permit * evictions to be disabled while automatic resize is enabled. @@ -1013,7 +1013,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled) */ if ((evictions_enabled != TRUE) && ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) || (cache_ptr->resize_ctl.decr_mode != H5C_decr__off))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled"); cache_ptr->evictions_enabled = evictions_enabled; @@ -1084,13 +1084,13 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry"); if (slist_enabled) { if (cache_ptr->slist_enabled) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist already enabled?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist already enabled?"); if ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?"); /* set cache_ptr->slist_enabled to TRUE so that the slist * maintenance macros will be enabled. @@ -1115,7 +1115,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli } else { /* take down the skip list */ if (!cache_ptr->slist_enabled) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist already disabled?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist already disabled?"); if ((cache_ptr->slist_len != 0) || (cache_ptr->slist_size != 0)) { if (clear_slist) { @@ -1129,7 +1129,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli } } else - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "slist not empty?"); } cache_ptr->slist_enabled = FALSE; @@ -1182,7 +1182,7 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring) case H5C_RING_RDFSM: if (cache_ptr->rdfsm_settled) { if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle"); cache_ptr->rdfsm_settled = FALSE; } /* end if */ break; @@ -1190,7 +1190,7 @@ H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring) case H5C_RING_MDFSM: if (cache_ptr->mdfsm_settled) { if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle"); cache_ptr->mdfsm_settled = FALSE; } /* end if */ break; @@ -1225,40 +1225,41 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) FUNC_ENTER_NOAPI(FAIL) if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry"); if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version"); if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) { if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big"); if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small"); if (config_ptr->min_size > config_ptr->max_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size"); if (config_ptr->set_initial_size && ((config_ptr->initial_size < config_ptr->min_size) || (config_ptr->initial_size > config_ptr->max_size))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "initial_size must be in the interval [min_size, max_size]") + "initial_size must be in the interval [min_size, max_size]"); if ((config_ptr->min_clean_fraction < 0.0) || (config_ptr->min_clean_fraction > 1.0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_clean_fraction must be in the interval [0.0, 1.0]") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "min_clean_fraction must be in the interval [0.0, 1.0]"); if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small"); if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big"); } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */ if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) { if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode"); if (config_ptr->incr_mode == H5C_incr__threshold) { if ((config_ptr->lower_hr_threshold < 0.0) || (config_ptr->lower_hr_threshold > 1.0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "lower_hr_threshold must be in the range [0.0, 1.0]") + "lower_hr_threshold must be in the range [0.0, 1.0]"); if (config_ptr->increment < 1.0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0"); /* no need to check max_increment, as it is a size_t, * and thus must be non-negative. @@ -1273,14 +1274,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) case H5C_flash_incr__add_space: if ((config_ptr->flash_multiple < 0.1) || (config_ptr->flash_multiple > 10.0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_multiple must be in the range [0.1, 10.0]") + "flash_multiple must be in the range [0.1, 10.0]"); if ((config_ptr->flash_threshold < 0.1) || (config_ptr->flash_threshold > 1.0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_threshold must be in the range [0.1, 1.0]") + "flash_threshold must be in the range [0.1, 1.0]"); break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode"); break; } /* end switch */ } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */ @@ -1289,13 +1290,13 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) && (config_ptr->decr_mode != H5C_decr__age_out) && (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode"); if (config_ptr->decr_mode == H5C_decr__threshold) { if (config_ptr->upper_hr_threshold > 1.0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0"); if ((config_ptr->decrement > 1.0) || (config_ptr->decrement < 0.0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]"); /* no need to check max_decrement as it is a size_t * and thus must be non-negative. @@ -1305,12 +1306,12 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) if ((config_ptr->decr_mode == H5C_decr__age_out) || (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) { if (config_ptr->epochs_before_eviction < 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive"); if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big"); if (config_ptr->apply_empty_reserve && (config_ptr->empty_reserve > 1.0 || config_ptr->empty_reserve < 0.0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]"); /* no need to check max_decrement as it is a size_t * and thus must be non-negative. @@ -1320,7 +1321,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) if ((config_ptr->upper_hr_threshold > 1.0) || (config_ptr->upper_hr_threshold < 0.0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "upper_hr_threshold must be in the interval [0.0, 1.0]") + "upper_hr_threshold must be in the interval [0.0, 1.0]"); } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */ if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) { @@ -1328,7 +1329,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) ((config_ptr->decr_mode == H5C_decr__threshold) || (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) && (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config"); } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */ done: @@ -1387,7 +1388,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked) if (NULL == tag_info) { /* Allocate new tag info struct */ if (NULL == (tag_info = H5FL_CALLOC(H5C_tag_info_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "can't allocate tag info for cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "can't allocate tag info for cache entry"); /* Set the tag for all entries */ tag_info->tag = obj_addr; @@ -1398,7 +1399,7 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked) else { /* Check for object already corked */ if (tag_info->corked) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCORK, FAIL, "object already corked") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCORK, FAIL, "object already corked"); assert(tag_info->entry_cnt > 0 && tag_info->head); } @@ -1409,11 +1410,11 @@ H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked) else { /* Sanity check */ if (NULL == tag_info) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNCORK, FAIL, "tag info pointer is NULL") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNCORK, FAIL, "tag info pointer is NULL"); /* Check for already uncorked */ if (!tag_info->corked) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNCORK, FAIL, "object already uncorked") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNCORK, FAIL, "object already uncorked"); /* Set the corked status for the entire object */ tag_info->corked = FALSE; diff --git a/src/H5CS.c b/src/H5CS.c index 66ac0d7..d8ee8d7 100644 --- a/src/H5CS.c +++ b/src/H5CS.c @@ -242,9 +242,9 @@ H5CS_copy_stack(void) /* Allocate a new stack */ /* (Don't use library allocate code, since this code stack supports it) */ if (NULL == (new_stack = calloc(1, sizeof(H5CS_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate function stack"); 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") + 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) */ diff --git a/src/H5CX.c b/src/H5CX.c index d2bd1ba..49f2274 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -64,7 +64,7 @@ if (NULL == (*head)->ctx.PL) \ /* Get the property list pointer */ \ if (NULL == ((*head)->ctx.PL = (H5P_genplist_t *)H5I_object((*head)->ctx.H5_GLUE(PL, _id)))) \ - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, (FAILVAL), "can't get property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, (FAILVAL), "can't get property list"); /* Common macro for the duplicated code to retrieve properties from a property list */ #define H5CX_RETRIEVE_PROP_COMMON(PL, DEF_PL, PROP_NAME, PROP_FIELD) \ @@ -78,7 +78,7 @@ \ /* Get the property */ \ if (H5P_get((*head)->ctx.PL, (PROP_NAME), &(*head)->ctx.PROP_FIELD) < 0) \ - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't retrieve value from API context") \ + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't retrieve value from API context"); \ } /* end else */ \ \ /* Mark the field as valid */ \ @@ -110,7 +110,7 @@ H5CX_RETRIEVE_PLIST(dxpl, FAIL) \ \ if ((check_prop = H5P_exist_plist((*head)->ctx.dxpl, PROP_NAME)) < 0) \ - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "error checking for property") \ + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "error checking for property"); \ } /* end if */ \ \ /* If property was already set or exists (for first set), update it */ \ @@ -130,7 +130,7 @@ \ /* Set the property */ \ if (H5P_set((*head)->ctx.dxpl, PROP_NAME, &(*head)->ctx.PROP_FIELD) < 0) \ - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTSET, NULL, "error setting data xfer property") \ + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTSET, NULL, "error setting data xfer property"); \ } /* end if */ /******************/ @@ -494,95 +494,96 @@ H5CX_init(void) /* Get the default dataset transfer property list */ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset transfer property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Get B-tree split ratios */ if (H5P_get(dx_plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &H5CX_def_dxpl_cache.btree_split_ratio) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve B-tree split ratios") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve B-tree split ratios"); /* Get maximum temporary buffer size value */ if (H5P_get(dx_plist, H5D_XFER_MAX_TEMP_BUF_NAME, &H5CX_def_dxpl_cache.max_temp_buf) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve maximum temporary buffer size") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve maximum temporary buffer size"); /* Get temporary buffer pointer */ if (H5P_get(dx_plist, H5D_XFER_TCONV_BUF_NAME, &H5CX_def_dxpl_cache.tconv_buf) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve temporary buffer pointer") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve temporary buffer pointer"); /* Get background buffer pointer */ if (H5P_get(dx_plist, H5D_XFER_BKGR_BUF_NAME, &H5CX_def_dxpl_cache.bkgr_buf) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve background buffer pointer") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve background buffer pointer"); /* Get background buffer type */ if (H5P_get(dx_plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &H5CX_def_dxpl_cache.bkgr_buf_type) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve background buffer type") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve background buffer type"); /* Get I/O vector size */ if (H5P_get(dx_plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &H5CX_def_dxpl_cache.vec_size) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve I/O vector size") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve I/O vector size"); #ifdef H5_HAVE_PARALLEL /* Collect Parallel I/O information for possible later use */ if (H5P_get(dx_plist, H5D_XFER_IO_XFER_MODE_NAME, &H5CX_def_dxpl_cache.io_xfer_mode) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve parallel transfer method") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve parallel transfer method"); if (H5P_get(dx_plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &H5CX_def_dxpl_cache.mpio_coll_opt) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve collective transfer option") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve collective transfer option"); if (H5P_get(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, &H5CX_def_dxpl_cache.mpio_chunk_opt_mode) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization option") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization option"); if (H5P_get(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, &H5CX_def_dxpl_cache.mpio_chunk_opt_num) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization threshold") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization threshold"); if (H5P_get(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, &H5CX_def_dxpl_cache.mpio_chunk_opt_ratio) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization ratio") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve chunk optimization ratio"); /* Get the local & global reasons for breaking collective I/O values */ if (H5P_get(dx_plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, &H5CX_def_dxpl_cache.mpio_local_no_coll_cause) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve local cause for breaking collective I/O") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve local cause for breaking collective I/O"); if (H5P_get(dx_plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, &H5CX_def_dxpl_cache.mpio_global_no_coll_cause) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve global cause for breaking collective I/O") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, + "Can't retrieve global cause for breaking collective I/O"); #endif /* H5_HAVE_PARALLEL */ /* Get error detection properties */ if (H5P_get(dx_plist, H5D_XFER_EDC_NAME, &H5CX_def_dxpl_cache.err_detect) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve error detection info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve error detection info"); /* Get filter callback function */ if (H5P_get(dx_plist, H5D_XFER_FILTER_CB_NAME, &H5CX_def_dxpl_cache.filter_cb) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve filter callback function") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve filter callback function"); /* Look at the data transform property */ /* (Note: 'peek', not 'get' - if this turns out to be a problem, we may need * to copy it and free this in the H5CX terminate routine. -QAK) */ if (H5P_peek(dx_plist, H5D_XFER_XFORM_NAME, &H5CX_def_dxpl_cache.data_transform) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve data transform info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve data transform info"); /* Get VL datatype alloc info */ if (H5P_get(dx_plist, H5D_XFER_VLEN_ALLOC_NAME, &H5CX_def_dxpl_cache.vl_alloc_info.alloc_func) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get(dx_plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, &H5CX_def_dxpl_cache.vl_alloc_info.alloc_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get(dx_plist, H5D_XFER_VLEN_FREE_NAME, &H5CX_def_dxpl_cache.vl_alloc_info.free_func) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get(dx_plist, H5D_XFER_VLEN_FREE_INFO_NAME, &H5CX_def_dxpl_cache.vl_alloc_info.free_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); /* Get datatype conversion struct */ if (H5P_get(dx_plist, H5D_XFER_CONV_CB_NAME, &H5CX_def_dxpl_cache.dt_conv_cb) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve datatype conversion exception callback") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve datatype conversion exception callback"); /* Get the selection I/O mode */ if (H5P_get(dx_plist, H5D_XFER_SELECTION_IO_MODE_NAME, &H5CX_def_dxpl_cache.selection_io_mode) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve parallel transfer method") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve parallel transfer method"); /* Get the local & global reasons for breaking selection I/O values */ if (H5P_get(dx_plist, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME, &H5CX_def_dxpl_cache.no_selection_io_cause) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve cause for no selection I/O") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve cause for no selection I/O"); /* Get the modify write buffer property */ if (H5P_get(dx_plist, H5D_XFER_MODIFY_WRITE_BUF_NAME, &H5CX_def_dxpl_cache.modify_write_buf) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve modify write buffer property") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve modify write buffer property"); /* Reset the "default LCPL cache" information */ memset(&H5CX_def_lcpl_cache, 0, sizeof(H5CX_lcpl_cache_t)); @@ -591,15 +592,15 @@ H5CX_init(void) /* Get the default link creation property list */ if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(H5P_LINK_CREATE_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a link creation property list"); /* Get link name character encoding */ if (H5P_get(lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &H5CX_def_lcpl_cache.encoding) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve link name encoding") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve link name encoding"); /* Get flag whether to create intermediate groups */ if (H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &H5CX_def_lcpl_cache.intermediate_group) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve intermediate group creation flag") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve intermediate group creation flag"); /* Reset the "default LAPL cache" information */ memset(&H5CX_def_lapl_cache, 0, sizeof(H5CX_lapl_cache_t)); @@ -608,11 +609,11 @@ H5CX_init(void) /* Get the default link access property list */ if (NULL == (la_plist = (H5P_genplist_t *)H5I_object(H5P_LINK_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a link access property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a link access property list"); /* Get number of soft / UD links to traverse */ if (H5P_get(la_plist, H5L_ACS_NLINKS_NAME, &H5CX_def_lapl_cache.nlinks) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve number of soft / UD links to traverse"); /* Reset the "default DCPL cache" information */ memset(&H5CX_def_dcpl_cache, 0, sizeof(H5CX_dcpl_cache_t)); @@ -621,15 +622,15 @@ H5CX_init(void) /* Get the default dataset creation property list */ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(H5P_DATASET_CREATE_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list"); /* Get flag to indicate whether to minimize dataset object header */ if (H5P_get(dc_plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &H5CX_def_dcpl_cache.do_min_dset_ohdr) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag"); /* Get object header flags */ if (H5P_get(dc_plist, H5O_CRT_OHDR_FLAGS_NAME, &H5CX_def_dcpl_cache.ohdr_flags) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve object header flags") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve object header flags"); /* Reset the "default DAPL cache" information */ memset(&H5CX_def_dapl_cache, 0, sizeof(H5CX_dapl_cache_t)); @@ -638,15 +639,15 @@ H5CX_init(void) /* Get the default dataset access property list */ if (NULL == (da_plist = (H5P_genplist_t *)H5I_object(H5P_DATASET_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list"); /* Get the prefix for the external file */ if (H5P_peek(da_plist, H5D_ACS_EFILE_PREFIX_NAME, &H5CX_def_dapl_cache.extfile_prefix) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for external file") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for external file"); /* Get the prefix for the VDS file */ if (H5P_peek(da_plist, H5D_ACS_VDS_PREFIX_NAME, &H5CX_def_dapl_cache.vds_prefix) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for VDS") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve prefix for VDS"); /* Reset the "default FAPL cache" information */ memset(&H5CX_def_fapl_cache, 0, sizeof(H5CX_fapl_cache_t)); @@ -655,14 +656,14 @@ H5CX_init(void) /* Get the default file access property list */ if (NULL == (fa_plist = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a dataset create property list"); /* Get low_bound */ if (H5P_get(fa_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &H5CX_def_fapl_cache.low_bound) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag"); if (H5P_get(fa_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &H5CX_def_fapl_cache.high_bound) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve dataset minimize flag"); done: FUNC_LEAVE_NOAPI(ret_value) } @@ -806,7 +807,7 @@ H5CX_push(void) /* Allocate & clear API context node */ if (NULL == (cnode = H5FL_CALLOC(H5CX_node_t))) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTALLOC, FAIL, "unable to allocate new struct") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTALLOC, FAIL, "unable to allocate new struct"); /* Set context info */ H5CX__push_common(cnode); @@ -872,7 +873,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Allocate & clear API context state */ if (NULL == (*api_state = H5FL_CALLOC(H5CX_state_t))) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTALLOC, FAIL, "unable to allocate new API context state") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTALLOC, FAIL, "unable to allocate new API context state"); /* Check for non-default DCPL */ if (H5P_DATASET_CREATE_DEFAULT != (*head)->ctx.dcpl_id) { @@ -881,7 +882,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Copy the DCPL ID */ if (((*api_state)->dcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dcpl, FALSE)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list"); } /* end if */ else (*api_state)->dcpl_id = H5P_DATASET_CREATE_DEFAULT; @@ -893,7 +894,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Copy the DXPL ID */ if (((*api_state)->dxpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.dxpl, FALSE)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list"); } /* end if */ else (*api_state)->dxpl_id = H5P_DATASET_XFER_DEFAULT; @@ -905,7 +906,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Copy the LAPL ID */ if (((*api_state)->lapl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lapl, FALSE)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list"); } /* end if */ else (*api_state)->lapl_id = H5P_LINK_ACCESS_DEFAULT; @@ -917,7 +918,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Copy the LCPL ID */ if (((*api_state)->lcpl_id = H5P_copy_plist((H5P_genplist_t *)(*head)->ctx.lcpl, FALSE)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "can't copy property list"); } /* end if */ else (*api_state)->lcpl_id = H5P_LINK_CREATE_DEFAULT; @@ -927,7 +928,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state) if (NULL != (*api_state)->vol_wrap_ctx) { 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") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "can't increment refcount on VOL wrapping context"); } /* end if */ /* Keep a copy of the VOL connector property, if there is one */ @@ -946,18 +947,18 @@ H5CX_retrieve_state(H5CX_state_t **api_state) /* Retrieve the connector for the ID */ if (NULL == (connector = (H5VL_class_t *)H5I_object((*api_state)->vol_connector_prop.connector_id))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allocate and copy connector info */ if (H5VL_copy_connector_info(connector, &new_connector_info, (*api_state)->vol_connector_prop.connector_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "connector info copy failed") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTCOPY, FAIL, "connector info copy failed"); (*api_state)->vol_connector_prop.connector_info = new_connector_info; } /* end if */ /* Increment the refcount on the connector ID */ if (H5I_inc_ref((*api_state)->vol_connector_prop.connector_id, FALSE) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed"); } /* end if */ } /* end if */ @@ -1064,27 +1065,27 @@ H5CX_free_state(H5CX_state_t *api_state) /* Release the DCPL */ if (0 != api_state->dcpl_id && H5P_DATASET_CREATE_DEFAULT != api_state->dcpl_id) if (H5I_dec_ref(api_state->dcpl_id) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DCPL") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DCPL"); /* Release the DXPL */ if (0 != api_state->dxpl_id && H5P_DATASET_XFER_DEFAULT != api_state->dxpl_id) if (H5I_dec_ref(api_state->dxpl_id) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DXPL") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on DXPL"); /* Release the LAPL */ if (0 != api_state->lapl_id && H5P_LINK_ACCESS_DEFAULT != api_state->lapl_id) if (H5I_dec_ref(api_state->lapl_id) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LAPL") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LAPL"); /* Release the LCPL */ if (0 != api_state->lcpl_id && H5P_LINK_CREATE_DEFAULT != api_state->lcpl_id) if (H5I_dec_ref(api_state->lcpl_id) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LCPL") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on LCPL"); /* Release the VOL wrapper context */ if (api_state->vol_wrap_ctx) if (H5VL_dec_vol_wrapper(api_state->vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on VOL wrapping context") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't decrement refcount on VOL wrapping context"); /* Release the VOL connector property, if it was set */ if (api_state->vol_connector_prop.connector_id) { @@ -1092,7 +1093,8 @@ H5CX_free_state(H5CX_state_t *api_state) if (api_state->vol_connector_prop.connector_info) if (H5VL_free_connector_info(api_state->vol_connector_prop.connector_id, api_state->vol_connector_prop.connector_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTRELEASE, FAIL, + "unable to release VOL connector info object"); /* Decrement connector ID */ if (H5I_dec_ref(api_state->vol_connector_prop.connector_id) < 0) HDONE_ERROR(H5E_CONTEXT, H5E_CANTDEC, FAIL, "can't close VOL connector ID"); @@ -1317,24 +1319,24 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, #ifdef H5CX_DEBUG /* Sanity check the access property list class */ if (TRUE != H5P_isa_class(*acspl_id, *libclass->class_id)) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not the required access property list") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not the required access property list"); #endif /* H5CX_DEBUG*/ /* Check for link access property and set API context if so */ if ((is_lapl = H5P_class_isa(*libclass->pclass, *H5P_CLS_LACC->pclass)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for link access class") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for link access class"); else if (is_lapl) (*head)->ctx.lapl_id = *acspl_id; /* Check for dataset access property and set API context if so */ if ((is_dapl = H5P_class_isa(*libclass->pclass, *H5P_CLS_DACC->pclass)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for dataset access class") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for dataset access class"); else if (is_dapl) (*head)->ctx.dapl_id = *acspl_id; /* Check for file access property and set API context if so */ if ((is_fapl = H5P_class_isa(*libclass->pclass, *H5P_CLS_FACC->pclass)) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for file access class") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't check for file access class"); else if (is_fapl) (*head)->ctx.fapl_id = *acspl_id; @@ -1349,11 +1351,11 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, /* Get the plist structure for the access property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(*acspl_id))) - HGOTO_ERROR(H5E_CONTEXT, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_CONTEXT, H5E_BADID, FAIL, "can't find object for ID"); /* Get the collective metadata read flag */ if (H5P_peek(plist, H5_COLL_MD_READ_FLAG_NAME, &md_coll_read) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't get core collective metadata read flag") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "can't get core collective metadata read flag"); /* If collective metadata read requested, set collective metadata read flag */ if (H5P_USER_TRUE == md_coll_read) @@ -1377,7 +1379,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, /* Retrieve the MPI communicator from the loc_id or the fapl_id */ if (H5F_mpi_retrieve_comm(loc_id, *acspl_id, &mpi_comm) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator"); /* issue the barrier */ if (mpi_comm != MPI_COMM_NULL) @@ -1431,7 +1433,7 @@ H5CX_set_loc(hid_t /* Retrieve the MPI communicator from the loc_id or the fapl_id */ if (H5F_mpi_retrieve_comm(loc_id, H5P_DEFAULT, &mpi_comm) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator"); /* issue the barrier */ if (mpi_comm != MPI_COMM_NULL) @@ -1586,10 +1588,10 @@ H5CX_get_vol_wrap_ctx(void **vol_wrap_ctx) * which doesn't reset the API context and there is no context, returns a relevant error here */ if (!head) - HGOTO_ERROR(H5E_CONTEXT, H5E_UNINITIALIZED, FAIL, "the API context isn't available") + HGOTO_ERROR(H5E_CONTEXT, H5E_UNINITIALIZED, FAIL, "the API context isn't available"); if (!(*head)) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get the current API context") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get the current API context"); /* Check for value that was set */ if ((*head)->ctx.vol_wrap_ctx_valid) @@ -2328,14 +2330,14 @@ H5CX_get_data_transform(H5Z_data_xform_t **data_transform) /* Get the dataset transfer property list pointer */ if (NULL == ((*head)->ctx.dxpl = (H5P_genplist_t *)H5I_object((*head)->ctx.dxpl_id))) HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, - "can't get default dataset transfer property list") + "can't get default dataset transfer property list"); /* Get data transform info value */ /* (Note: 'peek', not 'get' - if this turns out to be a problem, we may need * to copy it and free this in the H5CX pop routine. -QAK) */ if (H5P_peek((*head)->ctx.dxpl, H5D_XFER_XFORM_NAME, &(*head)->ctx.data_transform) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve data transform info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve data transform info"); } /* end else */ /* Mark the value as valid */ @@ -2383,21 +2385,21 @@ H5CX_get_vlen_alloc_info(H5T_vlen_alloc_info_t *vl_alloc_info) /* Get the dataset transfer property list pointer */ if (NULL == ((*head)->ctx.dxpl = (H5P_genplist_t *)H5I_object((*head)->ctx.dxpl_id))) HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, - "can't get default dataset transfer property list") + "can't get default dataset transfer property list"); /* Get VL datatype alloc info values */ if (H5P_get((*head)->ctx.dxpl, H5D_XFER_VLEN_ALLOC_NAME, &(*head)->ctx.vl_alloc_info.alloc_func) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get((*head)->ctx.dxpl, H5D_XFER_VLEN_ALLOC_INFO_NAME, &(*head)->ctx.vl_alloc_info.alloc_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get((*head)->ctx.dxpl, H5D_XFER_VLEN_FREE_NAME, &(*head)->ctx.vl_alloc_info.free_func) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); if (H5P_get((*head)->ctx.dxpl, H5D_XFER_VLEN_FREE_INFO_NAME, &(*head)->ctx.vl_alloc_info.free_info) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VL datatype alloc info"); } /* end else */ /* Mark the value as valid */ @@ -2742,14 +2744,14 @@ H5CX_get_ext_file_prefix(const char **extfile_prefix) /* Get the dataset access property list pointer */ if (NULL == ((*head)->ctx.dapl = (H5P_genplist_t *)H5I_object((*head)->ctx.dapl_id))) HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, - "can't get default dataset access property list") + "can't get default dataset access property list"); /* Get the prefix for the external file */ /* (Note: 'peek', not 'get' - if this turns out to be a problem, we may need * to copy it and free this in the H5CX pop routine. -QAK) */ if (H5P_peek((*head)->ctx.dapl, H5D_ACS_EFILE_PREFIX_NAME, &(*head)->ctx.extfile_prefix) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve external file prefix") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve external file prefix"); } /* end else */ /* Mark the value as valid */ @@ -2797,14 +2799,14 @@ H5CX_get_vds_prefix(const char **vds_prefix) /* Get the dataset access property list pointer */ if (NULL == ((*head)->ctx.dapl = (H5P_genplist_t *)H5I_object((*head)->ctx.dapl_id))) HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, - "can't get default dataset access property list") + "can't get default dataset access property list"); /* Get the prefix for the VDS */ /* (Note: 'peek', not 'get' - if this turns out to be a problem, we may need * to copy it and free this in the H5CX pop routine. -QAK) */ if (H5P_peek((*head)->ctx.dapl, H5D_ACS_VDS_PREFIX_NAME, &(*head)->ctx.vds_prefix) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VDS prefix") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "Can't retrieve VDS prefix"); } /* end else */ /* Mark the value as valid */ @@ -3570,7 +3572,7 @@ H5CX_pop(hbool_t update_dxpl_props) /* Perform common operations and get top context from stack */ if (NULL == (cnode = H5CX__pop_common(update_dxpl_props))) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "error getting API context node") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "error getting API context node"); /* Free the context node */ cnode = H5FL_FREE(H5CX_node_t, cnode); diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 19d31f1..c65d942 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -85,7 +85,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) /* First, create a skip list */ if (NULL == (slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list"); /* Next, scan the index, and insert all entries in the skip list. * Do this, as we want to display cache entries in increasing address @@ -96,7 +96,7 @@ H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name) while (entry_ptr != NULL) { 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") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "can't insert entry in skip list"); entry_ptr = entry_ptr->ht_next; } /* end while */ @@ -318,7 +318,7 @@ H5C_set_prefix(H5C_t *cache_ptr, char *prefix) FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL || prefix == NULL || HDstrlen(prefix) >= H5C__PREFIX_LEN) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry"); HDstrncpy(&(cache_ptr->prefix[0]), prefix, (size_t)(H5C__PREFIX_LEN)); @@ -389,7 +389,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, FUNC_ENTER_NOAPI(FAIL) if (NULL == cache_ptr || NULL == cache_name) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or cache_name") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr or cache_name"); #if H5C_COLLECT_CACHE_STATS for (i = 0; i <= cache_ptr->max_type_id; i++) { @@ -879,27 +879,27 @@ H5C_validate_index_list(H5C_t *cache_ptr) if (((cache_ptr->il_head == NULL) || (cache_ptr->il_tail == NULL)) && (cache_ptr->il_head != cache_ptr->il_tail)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointer validation failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointer validation failed"); if ((cache_ptr->index_len == 1) && ((cache_ptr->il_head != cache_ptr->il_tail) || (cache_ptr->il_head == NULL) || (cache_ptr->il_head->size != cache_ptr->index_size))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointer sanity checks failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointer sanity checks failed"); if ((cache_ptr->index_len >= 1) && ((cache_ptr->il_head == NULL) || (cache_ptr->il_head->il_prev != NULL) || (cache_ptr->il_tail == NULL) || (cache_ptr->il_tail->il_next != NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list length sanity checks failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list length sanity checks failed"); entry_ptr = cache_ptr->il_head; while (entry_ptr != NULL) { if ((entry_ptr != cache_ptr->il_head) && ((entry_ptr->il_prev == NULL) || (entry_ptr->il_prev->il_next != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointers for entry are invalid") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointers for entry are invalid"); if ((entry_ptr != cache_ptr->il_tail) && ((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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index list pointers for entry are invalid"); assert(entry_ptr->ring > 0); assert(entry_ptr->ring < H5C_RING_NTYPES); @@ -925,7 +925,7 @@ H5C_validate_index_list(H5C_t *cache_ptr) if ((cache_ptr->index_len != len) || (cache_ptr->il_len != len) || (cache_ptr->index_size != size) || (cache_ptr->il_size != size) || (cache_ptr->clean_index_size != clean_size) || (cache_ptr->dirty_index_size != dirty_size) || (clean_size + dirty_size != size)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index, clean and dirty sizes for cache are invalid") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index, clean and dirty sizes for cache are invalid"); size = 0; clean_size = 0; @@ -938,7 +938,7 @@ H5C_validate_index_list(H5C_t *cache_ptr) if ((cache_ptr->index_size != size) || (cache_ptr->clean_index_size != clean_size) || (cache_ptr->dirty_index_size != dirty_size)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index, clean and dirty sizes for cache are invalid") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Index, clean and dirty sizes for cache are invalid"); done: if (ret_value != SUCCEED) @@ -1291,30 +1291,30 @@ H5C__validate_lru_list(H5C_t *cache_ptr) if (((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_tail_ptr == NULL)) && (cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list head/tail check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list head/tail check failed"); if ((cache_ptr->LRU_list_len == 1) && ((cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr) || (cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_head_ptr->size != cache_ptr->LRU_list_size))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list sanity check failed"); if ((cache_ptr->LRU_list_len >= 1) && ((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_head_ptr->prev != NULL) || (cache_ptr->LRU_tail_ptr == NULL) || (cache_ptr->LRU_tail_ptr->next != NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list sanity check failed"); entry_ptr = cache_ptr->LRU_head_ptr; while (entry_ptr != NULL) { if ((entry_ptr != cache_ptr->LRU_head_ptr) && ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if ((entry_ptr != cache_ptr->LRU_tail_ptr) && ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if (entry_ptr->is_pinned || entry_ptr->pinned_from_client || entry_ptr->pinned_from_cache) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "invalid entry 'pin origin' fields") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "invalid entry 'pin origin' fields"); len++; size += entry_ptr->size; @@ -1322,7 +1322,7 @@ H5C__validate_lru_list(H5C_t *cache_ptr) } if ((cache_ptr->LRU_list_len != (uint32_t)len) || (cache_ptr->LRU_list_size != size)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list length/size check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU list length/size check failed"); done: if (ret_value != SUCCEED) @@ -1361,33 +1361,33 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr) if (((cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_tail_ptr == NULL)) && (cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list head/tail check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list head/tail check failed"); if ((cache_ptr->pel_len == 1) && ((cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr) || (cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_head_ptr->size != cache_ptr->pel_size))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list sanity check failed"); if ((cache_ptr->pel_len >= 1) && ((cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_head_ptr->prev != NULL) || (cache_ptr->pel_tail_ptr == NULL) || (cache_ptr->pel_tail_ptr->next != NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list sanity check failed"); entry_ptr = cache_ptr->pel_head_ptr; while (entry_ptr != NULL) { if ((entry_ptr != cache_ptr->pel_head_ptr) && ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if ((entry_ptr != cache_ptr->pel_tail_ptr) && ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if (!entry_ptr->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list contains unpinned entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list contains unpinned entry"); if (!(entry_ptr->pinned_from_client || entry_ptr->pinned_from_cache)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "invalid entry 'pin origin' fields") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "invalid entry 'pin origin' fields"); len++; size += entry_ptr->size; @@ -1395,7 +1395,7 @@ H5C__validate_pinned_entry_list(H5C_t *cache_ptr) } if ((cache_ptr->pel_len != (uint32_t)len) || (cache_ptr->pel_size != size)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list length/size check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "pinned list length/size check failed"); done: if (ret_value != SUCCEED) @@ -1434,33 +1434,33 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr) if (((cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_tail_ptr == NULL)) && (cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list head/tail check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list head/tail check failed"); if ((cache_ptr->pl_len == 1) && ((cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr) || (cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_head_ptr->size != cache_ptr->pl_size))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list sanity check failed"); if ((cache_ptr->pl_len >= 1) && ((cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_head_ptr->prev != NULL) || (cache_ptr->pl_tail_ptr == NULL) || (cache_ptr->pl_tail_ptr->next != NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list sanity check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list sanity check failed"); entry_ptr = cache_ptr->pl_head_ptr; while (entry_ptr != NULL) { if ((entry_ptr != cache_ptr->pl_head_ptr) && ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if ((entry_ptr != cache_ptr->pl_tail_ptr) && ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry has bad prev/next pointers"); if (!entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list contains unprotected entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list contains unprotected entry"); if (entry_ptr->is_read_only && (entry_ptr->ro_ref_count <= 0)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "read-only entry has non-positive ref count") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "read-only entry has non-positive ref count"); len++; size += entry_ptr->size; @@ -1468,7 +1468,7 @@ H5C__validate_protected_entry_list(H5C_t *cache_ptr) } if ((cache_ptr->pl_len != (uint32_t)len) || (cache_ptr->pl_size != size)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list length/size check failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "protected list length/size check failed"); done: if (ret_value != SUCCEED) @@ -1557,7 +1557,7 @@ H5C__image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) FUNC_ENTER_NOAPI(FAIL) if (NULL == cache_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr"); #if H5C_COLLECT_CACHE_STATS for (i = 0; i <= cache_ptr->max_type_id; i++) { diff --git a/src/H5Centry.c b/src/H5Centry.c index 18f9689..41fbe0c 100644 --- a/src/H5Centry.c +++ b/src/H5Centry.c @@ -126,7 +126,7 @@ H5C__pin_entry_from_client(H5C_t if (entry_ptr->is_pinned) { /* Check if the entry was pinned through an explicit pin from a client */ if (entry_ptr->pinned_from_client) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "entry is already pinned") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "entry is already pinned"); } /* end if */ else { entry_ptr->is_pinned = TRUE; @@ -204,14 +204,14 @@ H5C__unpin_entry_from_client(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbo /* Error checking (should be sanity checks?) */ if (!entry_ptr->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "entry isn't pinned") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "entry isn't pinned"); if (!entry_ptr->pinned_from_client) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "entry wasn't pinned by cache client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "entry wasn't pinned by cache client"); /* Check if the entry is not pinned from a flush dependency */ if (!entry_ptr->pinned_from_cache) if (H5C__unpin_entry_real(cache_ptr, entry_ptr, update_rp) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry"); /* Mark the entry as explicitly unpinned by the client */ entry_ptr->pinned_from_client = FALSE; @@ -265,13 +265,13 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) if ((entry_ptr->type->pre_serialize) && ((entry_ptr->type->pre_serialize)(f, (void *)entry_ptr, entry_ptr->addr, entry_ptr->size, &new_addr, &new_len, &serialize_flags) < 0)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to pre-serialize entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to pre-serialize entry"); /* Check for any flags set in the pre-serialize callback */ if (serialize_flags != H5C__SERIALIZE_NO_FLAGS_SET) { /* Check for unexpected flags from serialize callback */ if (serialize_flags & ~(H5C__SERIALIZE_RESIZED_FLAG | H5C__SERIALIZE_MOVED_FLAG)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unknown serialize flag(s)") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unknown serialize flag(s)"); #ifdef H5_HAVE_PARALLEL /* In the parallel case, resizes and moves in @@ -294,7 +294,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) * other entries during its flush. */ if (cache_ptr->aux_ptr != NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "resize/move in serialize occurred in parallel case") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "resize/move in serialize occurred in parallel case"); #endif /* If required, resize the buffer and update the entry and the cache @@ -308,7 +308,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) if (NULL == (entry_ptr->image_ptr = H5MM_realloc(entry_ptr->image_ptr, new_len + H5C_IMAGE_EXTRA_SPACE))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "memory allocation failed for on disk image buffer") + "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len, H5C_IMAGE_SANITY_VALUE, @@ -371,7 +371,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) /* Serialize object into buffer */ if (entry_ptr->type->serialize(f, entry_ptr->image_ptr, entry_ptr->size, (void *)entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to serialize entry"); #if H5C_DO_MEMORY_SANITY_CHECKS assert(0 == memcmp(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, @@ -390,7 +390,8 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr) if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_serialized(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "Can't propagate serialization status to fd parents") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, + "Can't propagate serialization status to fd parents"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -504,26 +505,26 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if (entry_ptr->in_slist) { 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry in slist failed sanity checks"); } /* end if */ else { 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry failed sanity checks"); } /* end else */ } else { /* slist is disabled */ 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?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush marked clean entry?"); } #endif /* H5C_DO_SANITY_CHECKS */ if (entry_ptr->is_protected) /* Attempt to flush a protected entry -- scream and die. */ - HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry") + HGOTO_ERROR(H5E_CACHE, H5E_PROTECT, FAIL, "Attempt to flush a protected entry"); /* Set entry_ptr->flush_in_progress = TRUE and set * entry_ptr->flush_marker = FALSE @@ -546,7 +547,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) 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, - "memory allocation failed for on disk image buffer") + "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, @@ -561,7 +562,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) /* Generate the entry's image */ if (H5C__generate_image(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't generate entry's image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't generate entry's image"); } /* end if ( ! (entry_ptr->image_up_to_date) ) */ } /* end if */ @@ -576,7 +577,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) #ifdef H5C_DO_SANITY_CHECKS if (cache_ptr->check_write_permitted && !cache_ptr->write_permitted) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Write when writes are always forbidden!?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Write when writes are always forbidden!?!?!"); #endif /* H5C_DO_SANITY_CHECKS */ /* Write the image to disk unless the write is suppressed. @@ -593,7 +594,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) #ifdef H5_HAVE_PARALLEL if (cache_ptr->coll_write_list) { if (H5SL_insert(cache_ptr->coll_write_list, entry_ptr, &entry_ptr->addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to insert skip list item") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "unable to insert skip list item"); } /* end if */ else { #endif /* H5_HAVE_PARALLEL */ @@ -605,7 +606,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) mem_type = entry_ptr->type->mem_type; if (H5F_block_write(f, mem_type, entry_ptr->addr, entry_ptr->size, entry_ptr->image_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't write image to file") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't write image to file"); #ifdef H5_HAVE_PARALLEL } #endif /* H5_HAVE_PARALLEL */ @@ -616,7 +617,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_FLUSH, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client of entry flush") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client of entry flush"); } /* if ( write_entry ) */ /* At this point, all pre-serialize and serialize calls have been @@ -664,7 +665,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict"); /* Update the cache internal data structures as appropriate * for a destroy. Specifically: @@ -699,7 +700,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) /* Remove entry from tag list */ if (H5C__untag_entry(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry from tag list") + 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 */ assert(entry_ptr->flush_dep_nparents == 0); @@ -736,7 +737,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify client about entry dirty flag cleared") + "can't notify client about entry dirty flag cleared"); /* Propagate the clean flag up the flush dependency chain * if appropriate @@ -745,7 +746,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Can't propagate flush dep clean flag"); } /* end if */ } /* end else */ @@ -814,14 +815,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) */ if (entry_ptr->type->fsf_size) { if ((entry_ptr->type->fsf_size)((void *)entry_ptr, &fsf_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to get file space free size") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to get file space free size"); } /* end if */ else /* no file space free size callback -- use entry size */ fsf_size = entry_ptr->size; /* Release the space on disk */ if (H5MF_xfree(f, entry_ptr->type->mem_type, entry_ptr->addr, fsf_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to free file space for cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "unable to free file space for cache entry"); } /* end if ( free_file_space ) */ /* Reset the pointer to the cache the entry is within. -QAK */ @@ -862,14 +863,14 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify client about entry dirty flag cleared") + "can't notify client about entry dirty flag cleared"); } /* end if */ /* verify that the image has been freed */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "free_icr callback failed"); } /* end if */ else { assert(take_ownership); @@ -887,12 +888,12 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags) 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, entry_ptr->image_ptr) > 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Failed to update PB with metadata cache") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Failed to update PB with metadata cache"); } /* end if */ if (cache_ptr->log_flush) if ((cache_ptr->log_flush)(cache_ptr, entry_addr, was_dirty, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed"); done: assert((ret_value != SUCCEED) || (destroy_entry) || (!entry_ptr->flush_in_progress)); @@ -937,23 +938,23 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr, size_t *len /* Get the file's end-of-allocation value */ eoa = H5F_get_eoa(f, cooked_type); if (!H5_addr_defined(eoa)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file"); /* Check for bad address in general */ if (H5_addr_gt(addr, eoa)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation"); /* Check if the amount of data to read will be past the EOA */ if (H5_addr_gt((addr + *len), eoa)) { if (actual) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA"); else /* Trim down the length of the metadata */ *len = (size_t)(eoa - addr); } /* end if */ if (*len <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1015,17 +1016,17 @@ H5C__load_entry(H5F_t *f, /* 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "can't retrieve image size"); assert(len > 0); /* Check for possible speculative read off the end of the file */ if (type->flags & H5C__CLASS_SPECULATIVE_LOAD_FLAG) if (H5C__verify_len_eoa(f, type, addr, &len, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid len with respect to EOA") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid len with respect to EOA"); /* Allocate the buffer for reading the on-disk entry image */ if (NULL == (image = (uint8_t *)H5MM_malloc(len + H5C_IMAGE_EXTRA_SPACE))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ @@ -1033,9 +1034,9 @@ H5C__load_entry(H5F_t *f, #ifdef H5_HAVE_PARALLEL if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { if ((mpi_rank = H5F_mpi_get_rank(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "Can't get MPI rank") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "Can't get MPI rank"); if ((comm = H5F_mpi_get_comm(f)) == MPI_COMM_NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed"); } /* end if */ #endif /* H5_HAVE_PARALLEL */ @@ -1062,7 +1063,7 @@ H5C__load_entry(H5F_t *f, do { if (actual_len != len) { if (NULL == (new_image = H5MM_realloc(image, len + H5C_IMAGE_EXTRA_SPACE))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()"); image = (uint8_t *)new_image; #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); @@ -1081,7 +1082,7 @@ H5C__load_entry(H5F_t *f, } else #endif - HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*") + HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "Can't read image*"); } #ifdef H5_HAVE_PARALLEL @@ -1112,11 +1113,11 @@ H5C__load_entry(H5F_t *f, if (actual_len != len) { /* Verify that the length isn't past the EOA for the file */ if (H5C__verify_len_eoa(f, type, addr, &actual_len, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "actual_len exceeds EOA") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "actual_len exceeds EOA"); /* Expand buffer to new size */ if (NULL == (new_image = H5MM_realloc(image, actual_len + H5C_IMAGE_EXTRA_SPACE))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()"); image = (uint8_t *)new_image; #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + actual_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); @@ -1139,7 +1140,7 @@ H5C__load_entry(H5F_t *f, } else #endif - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't read image"); } #ifdef H5_HAVE_PARALLEL @@ -1175,7 +1176,7 @@ H5C__load_entry(H5F_t *f, /* Verify the checksum for the metadata image */ if ((chk_ret = type->verify_chksum(image, actual_len, udata)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "failure from verify_chksum callback") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "failure from verify_chksum callback"); if (chk_ret == TRUE) break; @@ -1186,13 +1187,14 @@ H5C__load_entry(H5F_t *f, /* Check for too many tries */ if (tries == 0) - HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, "incorrect metadata checksum after all read attempts") + HGOTO_ERROR(H5E_CACHE, H5E_READERROR, NULL, + "incorrect metadata checksum after all read attempts"); /* Calculate and track the # of retries */ retries = max_tries - tries; if (retries) /* Does not track 0 retry */ if (H5F_track_metadata_read_retries(f, (unsigned)type->mem_type, retries) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "cannot track read tries = %u ", retries) + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "cannot track read tries = %u ", retries); /* Set the final length (in case it wasn't set earlier) */ len = actual_len; @@ -1200,7 +1202,7 @@ H5C__load_entry(H5F_t *f, /* Deserialize the on-disk image into the native memory form */ if (NULL == (thing = type->deserialize(image, len, udata, &dirty))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't deserialize image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't deserialize image"); entry = (H5C_cache_entry_t *)thing; @@ -1351,7 +1353,7 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t *entry) (entry->flush_dep_parent[u]->type->notify)(H5C_NOTIFY_ACTION_CHILD_DIRTIED, entry->flush_dep_parent[u]) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry dirty flag set") + "can't notify parent about child entry dirty flag set"); } /* end for */ done: @@ -1397,7 +1399,7 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t *entry) (entry->flush_dep_parent[i]->type->notify)(H5C_NOTIFY_ACTION_CHILD_CLEANED, entry->flush_dep_parent[i]) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry dirty flag reset") + "can't notify parent about child entry dirty flag reset"); } /* end for */ done: @@ -1443,7 +1445,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t *entry_ptr) (entry_ptr->flush_dep_parent[i]->type->notify)(H5C_NOTIFY_ACTION_CHILD_SERIALIZED, entry_ptr->flush_dep_parent[i]) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry serialized flag set") + "can't notify parent about child entry serialized flag set"); } /* end for */ done: @@ -1487,7 +1489,7 @@ H5C__mark_flush_dep_unserialized(H5C_cache_entry_t *entry_ptr) (entry_ptr->flush_dep_parent[u]->type->notify)(H5C_NOTIFY_ACTION_CHILD_UNSERIALIZED, entry_ptr->flush_dep_parent[u]) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry serialized flag reset") + "can't notify parent about child entry serialized flag reset"); } /* end for */ done: @@ -1567,7 +1569,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry if (NULL == entry_ptr->image_ptr) { 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); @@ -1576,7 +1578,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry /* Generate image for entry */ if (H5C__generate_image(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "Can't generate image for cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "Can't generate image for cache entry"); /* Reset the flush_in progress flag */ entry_ptr->flush_in_progress = FALSE; @@ -1674,7 +1676,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e fd_children_found++; if (H5C_destroy_flush_dependency(pf_entry_ptr, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "can't destroy pf entry child flush dependency") + "can't destroy pf entry child flush dependency"); #ifndef NDEBUG /* Sanity check -- verify that the address of the parent @@ -1813,7 +1815,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t 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") + 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 */ @@ -1832,11 +1834,11 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t if (pf_entry_ptr->fd_child_count > 0) { if (NULL == (fd_children = (H5C_cache_entry_t **)H5MM_calloc( sizeof(H5C_cache_entry_t **) * (size_t)(pf_entry_ptr->fd_child_count + 1)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for fd child ptr array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for fd child ptr array"); if (H5C__destroy_pf_entry_child_flush_deps(cache_ptr, pf_entry_ptr, fd_children) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "can't destroy pf entry child flush dependency(s).") + "can't destroy pf entry child flush dependency(s)."); } /* end if */ /* Since the size of the on disk image is known exactly, there is @@ -1851,7 +1853,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t * native memory form */ if (NULL == (thing = type->deserialize(pf_entry_ptr->image_ptr, len, udata, &dirty))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "Can't deserialize image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "Can't deserialize image"); ds_entry_ptr = (H5C_cache_entry_t *)thing; /* In general, an entry should be clean just after it is loaded. @@ -1954,7 +1956,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t /* Apply to to the newly deserialized entry */ if (H5C__tag_entry(cache_ptr, ds_entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry"); /* We have successfully deserialized the prefetched entry. * @@ -1986,7 +1988,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t } /* end if */ if (H5C__flush_single_entry(f, pf_entry_ptr, flush_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't expunge prefetched entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't expunge prefetched entry"); #ifndef NDEGUG /* verify deletion */ H5C__SEARCH_INDEX(cache_ptr, addr, pf_entry_ptr, FAIL); @@ -2010,7 +2012,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t */ if (ds_entry_ptr->type->notify && (ds_entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_LOAD, ds_entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry loaded into cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry loaded into cache"); /* Restore flush dependencies with the flush dependency children of * of the prefetched entry. Note that we must protect *ds_entry_ptr @@ -2045,7 +2047,7 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t #endif if (H5C_create_flush_dependency(ds_entry_ptr, fd_children[i]) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Can't restore child flush dependency") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Can't restore child flush dependency"); i++; } /* end while */ @@ -2121,7 +2123,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u /* we already make that check below. */ if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ set_flush_marker = ((flags & H5C__SET_FLUSH_MARKER_FLAG) != 0); @@ -2141,9 +2143,9 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u if (test_entry_ptr != NULL) { if (test_entry_ptr == entry_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "entry already in cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "entry already in cache"); else - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "duplicate entry in cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "duplicate entry in cache"); } /* end if */ entry_ptr->cache_ptr = cache_ptr; @@ -2170,7 +2172,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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGETSIZE, FAIL, "can't get size of thing"); assert(entry_ptr->size > 0 && entry_ptr->size < H5C_MAX_ENTRY_SIZE); entry_ptr->in_slist = FALSE; @@ -2235,7 +2237,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u /* Apply tag to newly inserted entry */ if (H5C__tag_entry(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot tag metadata entry"); entry_tagged = TRUE; H5C__RESET_CACHE_ENTRY_STATS(entry_ptr); @@ -2243,7 +2245,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u if (cache_ptr->flash_size_increase_possible && (entry_ptr->size > cache_ptr->flash_size_increase_threshold)) if (H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__flash_increase_cache_size failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__flash_increase_cache_size failed"); if (cache_ptr->index_size >= cache_ptr->max_cache_size) empty_space = 0; @@ -2260,7 +2262,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u if (cache_ptr->check_write_permitted != NULL) { if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "Can't get write_permitted") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "Can't get write_permitted"); } /* end if */ else write_permitted = cache_ptr->write_permitted; @@ -2293,7 +2295,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u */ if (H5C__make_space_in_cache(f, space_needed, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__make_space_in_cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__make_space_in_cache failed"); } /* end if */ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL); @@ -2307,14 +2309,14 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed just before done") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed just before done"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* If the entry's type has a 'notify' callback send a 'after insertion' * notice now that the entry is fully integrated into the cache. */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_INSERT, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry inserted into cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry inserted into cache"); H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr); @@ -2330,13 +2332,13 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u if (H5P_USER_TRUE == H5F_COLL_MD_READ(f)) { if (cache_ptr->max_cache_size * 80 < cache_ptr->coll_list_size * 100) { if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries"); } /* end if */ } /* end if */ else { if (cache_ptr->max_cache_size * 40 < cache_ptr->coll_list_size * 100) { if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear collective metadata entries"); } /* end if */ } /* end else */ } /* end if */ @@ -2402,7 +2404,7 @@ H5C_mark_entry_dirty(void *thing) if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ } /* end if */ else if (entry_ptr->is_pinned) { @@ -2435,21 +2437,22 @@ H5C_mark_entry_dirty(void *thing) */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, + "can't notify client about entry dirty flag set"); /* Propagate the dirty flag up the flush dependency chain if appropriate */ if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_dirty(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag"); } /* end if */ if (image_was_up_to_date) if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ else - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is neither pinned nor protected??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is neither pinned nor protected??"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2485,7 +2488,7 @@ H5C_mark_entry_clean(void *_thing) /* Operate on pinned entry */ if (entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected"); else if (entry_ptr->is_pinned) { hbool_t was_dirty; /* Whether the entry was previously dirty */ @@ -2515,16 +2518,16 @@ H5C_mark_entry_clean(void *_thing) if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify client about entry dirty flag cleared") + "can't notify client about entry dirty flag cleared"); /* Propagate the clean up the flush dependency chain, if appropriate */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Can't propagate flush dep clean"); } /* end if */ } /* end if */ else - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Entry is not pinned??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "Entry is not pinned??"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2562,12 +2565,12 @@ H5C_mark_entry_unserialized(void *thing) if (entry->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ } /* end if */ else HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKUNSERIALIZED, FAIL, - "Entry to unserialize is neither pinned nor protected??") + "Entry to unserialize is neither pinned nor protected??"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2597,7 +2600,7 @@ H5C_mark_entry_serialized(void *_thing) /* Operate on pinned entry */ if (entry->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "entry is protected") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "entry is protected"); else if (entry->is_pinned) { /* Check for entry changing status and do notifications, etc. */ if (!entry->image_up_to_date) { @@ -2608,11 +2611,11 @@ H5C_mark_entry_serialized(void *_thing) if (entry->flush_dep_nparents > 0) if (H5C__mark_flush_dep_serialized(entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, - "Can't propagate flush dep serialize") + "Can't propagate flush dep serialize"); } /* end if */ } /* end if */ else - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "Entry is not pinned??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKSERIALIZED, FAIL, "Entry is not pinned??"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2646,7 +2649,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ H5C__SEARCH_INDEX(cache_ptr, old_addr, entry_ptr, FAIL); @@ -2663,15 +2666,15 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd * happen. QAK - 2016/12/02) */ if (entry_ptr->is_read_only) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "can't move R/O entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "can't move R/O entry"); H5C__SEARCH_INDEX(cache_ptr, new_addr, test_entry_ptr, FAIL); if (test_entry_ptr != NULL) { /* we are hosed */ if (test_entry_ptr->type == type) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "target already moved & reinserted???") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "target already moved & reinserted???"); else - HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "new address already in use?") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, "new address already in use?"); } /* end if */ /* If we get this far we have work to do. Remove *entry_ptr from @@ -2715,7 +2718,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ /* Modify cache data structures */ @@ -2735,13 +2738,13 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify client about entry dirty flag set") + "can't notify client about entry dirty flag set"); /* Propagate the dirty flag up the flush dependency chain if appropriate */ if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_dirty(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, - "Can't propagate flush dep dirty flag") + "Can't propagate flush dep dirty flag"); } /* end if */ } /* end if */ } /* end if */ @@ -2788,13 +2791,13 @@ H5C_resize_entry(void *thing, size_t new_size) /* Check for usage errors */ if (new_size <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "New size is non-positive") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "New size is non-positive"); if (!(entry_ptr->is_pinned || entry_ptr->is_protected)) - HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??") + HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??"); #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* update for change in entry size if necessary */ @@ -2813,7 +2816,7 @@ H5C_resize_entry(void *thing, size_t new_size) if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ /* Release the current image */ @@ -2828,7 +2831,7 @@ H5C_resize_entry(void *thing, size_t new_size) size_increase = new_size - entry_ptr->size; if (size_increase >= cache_ptr->flash_size_increase_threshold) if (H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "flash cache increase failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "flash cache increase failed"); } } @@ -2872,12 +2875,13 @@ H5C_resize_entry(void *thing, size_t new_size) */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, + "can't notify client about entry dirty flag set"); /* Propagate the dirty flag up the flush dependency chain if appropriate */ if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_dirty(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag"); } /* end if */ } /* end if */ @@ -2918,16 +2922,16 @@ H5C_pin_protected_entry(void *thing) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* Only protected entries can be pinned */ if (!entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry isn't protected") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry isn't protected"); /* Pin the entry from a client */ if (H5C__pin_entry_from_client(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client"); done: #ifdef H5C_DO_EXTREME_SANITY_CHECKS @@ -2992,14 +2996,14 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* Load the cache image, if requested */ if (cache_ptr->load_image) { cache_ptr->load_image = FALSE; if (H5C__load_cache_image(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't load cache image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "Can't load cache image"); } /* end if */ read_only = ((flags & H5C__READ_ONLY_FLAG) != 0); @@ -3018,7 +3022,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (entry_ptr != NULL) { if (entry_ptr->ring != ring) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "ring type mismatch occurred for cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "ring type mismatch occurred for cache entry"); if (entry_ptr->prefetched) { /* This call removes the prefetched entry from the cache, @@ -3026,7 +3030,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign * image of the prefetched entry. */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't deserialize prefetched entry"); assert(!entry_ptr->prefetched); assert(entry_ptr->addr == addr); @@ -3034,7 +3038,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign /* Check for trying to load the wrong type of entry from an address */ if (entry_ptr->type != type) - HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type") + HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, NULL, "incorrect cache entry type"); #ifdef H5_HAVE_PARALLEL /* If this is a collective metadata read, the entry is not marked as @@ -3051,17 +3055,17 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign int buf_size; if (MPI_COMM_NULL == (comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed"); if (entry_ptr->image_ptr == NULL) { int mpi_rank; if ((mpi_rank = H5F_mpi_get_rank(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "Can't get MPI rank") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "Can't get MPI rank"); if (NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, - "memory allocation failed for on disk image buffer") + "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); @@ -3103,7 +3107,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign tag = H5CX_get_tag(); if (H5C_verify_tag(entry_ptr->type->id, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "tag verification failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, NULL, "tag verification failed"); } /* end if */ } #endif @@ -3119,7 +3123,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign coll_access, #endif /* H5_HAVE_PARALLEL */ type, addr, udata))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry"); entry_ptr = (H5C_cache_entry_t *)thing; cache_ptr->entries_loaded_counter++; @@ -3132,7 +3136,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign /* Apply tag to newly protected entry */ if (H5C__tag_entry(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Cannot tag metadata entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, NULL, "Cannot tag metadata entry"); /* If the entry is very large, and we are configured to allow it, * we may wish to perform a flash cache size increase. @@ -3140,7 +3144,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (cache_ptr->flash_size_increase_possible && (entry_ptr->size > cache_ptr->flash_size_increase_threshold)) if (H5C__flash_increase_cache_size(cache_ptr, 0, entry_ptr->size) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__flash_increase_cache_size failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__flash_increase_cache_size failed"); if (cache_ptr->index_size >= cache_ptr->max_cache_size) empty_space = 0; @@ -3162,7 +3166,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (cache_ptr->check_write_permitted != NULL) { if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted 1") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted 1"); else have_write_permitted = TRUE; } /* end if */ @@ -3202,7 +3206,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign * entries as long as all the protects precede the unprotects. */ if (H5C__make_space_in_cache(f, space_needed, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__make_space_in_cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__make_space_in_cache failed"); } /* end if */ /* Insert the entry in the hash table. @@ -3245,7 +3249,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign (entry_ptr->ro_ref_count)++; } /* end if */ else - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?"); } /* end if */ else { H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL); @@ -3270,7 +3274,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (!have_write_permitted) { if (cache_ptr->check_write_permitted != NULL) { if ((cache_ptr->check_write_permitted)(f, &write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Can't get write_permitted"); else have_write_permitted = TRUE; } @@ -3282,7 +3286,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (cache_ptr->resize_enabled && (cache_ptr->cache_accesses >= cache_ptr->resize_ctl.epoch_length)) if (H5C__auto_adjust_cache_size(f, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Cache auto-resize failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Cache auto-resize failed"); if (cache_ptr->size_decreased) { cache_ptr->size_decreased = FALSE; @@ -3307,7 +3311,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign cache_ptr->cache_full = TRUE; if (H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__make_space_in_cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "H5C__make_space_in_cache failed"); } } /* end if */ } @@ -3323,7 +3327,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_AFTER_LOAD, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, NULL, - "can't notify client about entry inserted into cache") + "can't notify client about entry inserted into cache"); #ifdef H5_HAVE_PARALLEL /* Make sure the size of the collective entries in the cache remain in check */ @@ -3331,12 +3335,12 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign if (H5P_USER_TRUE == H5F_COLL_MD_READ(f)) { if (cache_ptr->max_cache_size * 80 < cache_ptr->coll_list_size * 100) if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries"); } /* end if */ else { if (cache_ptr->max_cache_size * 40 < cache_ptr->coll_list_size * 100) if (H5C_clear_coll_entries(cache_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, NULL, "can't clear collective metadata entries"); } /* end else */ } /* end if */ #endif /* H5_HAVE_PARALLEL */ @@ -3378,12 +3382,12 @@ H5C_unpin_entry(void *_entry_ptr) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* Unpin the entry */ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry from client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry from client"); done: #ifdef H5C_DO_EXTREME_SANITY_CHECKS @@ -3477,7 +3481,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* if the entry has multiple read only protects, just decrement @@ -3490,7 +3494,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) assert(entry_ptr->is_read_only); if (dirtied) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??"); /* Reduce the RO ref count */ (entry_ptr->ro_ref_count)--; @@ -3499,12 +3503,12 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (pin_entry) { /* Pin the entry from a client */ if (H5C__pin_entry_from_client(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client"); } else if (unpin_entry) { /* Unpin the entry from a client */ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client"); } /* end if */ } else { @@ -3513,7 +3517,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) assert(entry_ptr->ro_ref_count == 1); if (dirtied) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??"); entry_ptr->is_read_only = FALSE; entry_ptr->ro_ref_count = 0; @@ -3546,7 +3550,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) #endif /* H5_HAVE_PARALLEL */ if (!entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Entry already unprotected??") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Entry already unprotected??"); /* Mark the entry as dirty if appropriate */ entry_ptr->is_dirty = (entry_ptr->is_dirty || dirtied); @@ -3555,7 +3559,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_unserialized(entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "Can't propagate serialization status to fd parents") + "Can't propagate serialization status to fd parents"); } /* end if */ /* Check for newly dirtied entry */ @@ -3569,14 +3573,15 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) */ if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, + "can't notify client about entry dirty flag set"); /* Propagate the flush dep dirty flag up the flush dependency chain * if appropriate */ if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_dirty(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag"); } /* end if */ /* Check for newly clean entry */ else if (!was_clean && !entry_ptr->is_dirty) { @@ -3588,26 +3593,26 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (entry_ptr->type->notify && (entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify client about entry dirty flag cleared") + "can't notify client about entry dirty flag cleared"); /* Propagate the flush dep clean flag up the flush dependency chain * if appropriate */ if (entry_ptr->flush_dep_nparents > 0) if (H5C__mark_flush_dep_clean(entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag") + HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Can't propagate flush dep dirty flag"); } /* end else-if */ /* Pin or unpin the entry as requested. */ if (pin_entry) { /* Pin the entry from a client */ if (H5C__pin_entry_from_client(cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client"); } else if (unpin_entry) { /* Unpin the entry from a client */ if (H5C__unpin_entry_from_client(cache_ptr, entry_ptr, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client"); } /* end if */ /* H5C__UPDATE_RP_FOR_UNPROTECT will place the unprotected entry on @@ -3639,10 +3644,10 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL); if (test_entry_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?"); else if (test_entry_ptr != entry_ptr) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, - "hash table contains multiple entries for addr?!?") + "hash table contains multiple entries for addr?!?"); /* Set the 'free file space' flag for the flush, if needed */ if (free_file_space) @@ -3658,7 +3663,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't flush entry"); } /* end if */ #ifdef H5_HAVE_PARALLEL else if (clear_entry) { @@ -3666,14 +3671,14 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) H5C__SEARCH_INDEX(cache_ptr, addr, test_entry_ptr, FAIL); if (test_entry_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "entry not in hash table?!?"); else if (test_entry_ptr != entry_ptr) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, - "hash table contains multiple entries for addr?!?") + "hash table contains multiple entries for addr?!?"); if (H5C__flush_single_entry(f, entry_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry"); } /* end else if */ #endif /* H5_HAVE_PARALLEL */ } @@ -3736,7 +3741,7 @@ H5C_unsettle_entry_ring(void *_entry) case H5C_RING_RDFSM: if (cache->rdfsm_settled) { if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle"); cache->rdfsm_settled = FALSE; } /* end if */ break; @@ -3744,7 +3749,7 @@ H5C_unsettle_entry_ring(void *_entry) case H5C_RING_MDFSM: if (cache->mdfsm_settled) { if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle"); cache->mdfsm_settled = FALSE; } /* end if */ break; @@ -3807,9 +3812,9 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) /* More sanity checks */ if (child_entry == parent_entry) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself"); if (!(parent_entry->is_protected || parent_entry->is_pinned)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected"); /* Check for parent not pinned */ if (!parent_entry->is_pinned) { @@ -3835,7 +3840,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) if (NULL == (child_entry->flush_dep_parent = H5FL_SEQ_MALLOC(H5C_cache_entry_ptr_t, H5C_FLUSH_DEP_PARENT_INIT))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for flush dependency parent list") + "memory allocation failed for flush dependency parent list"); child_entry->flush_dep_parent_nalloc = H5C_FLUSH_DEP_PARENT_INIT; } /* end if */ else { @@ -3846,7 +3851,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent, 2 * child_entry->flush_dep_parent_nalloc))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for flush dependency parent list") + "memory allocation failed for flush dependency parent list"); child_entry->flush_dep_parent_nalloc *= 2; } /* end else */ cache_ptr->entry_fd_height_change_counter++; @@ -3870,7 +3875,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) if (parent_entry->type->notify && (parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_DIRTIED, parent_entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry dirty flag set") + "can't notify parent about child entry dirty flag set"); } /* end if */ /* adjust the parent's number of unserialized children. Note @@ -3885,7 +3890,7 @@ H5C_create_flush_dependency(void *parent_thing, void *child_thing) if (parent_entry->type->notify && (parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_UNSERIALIZED, parent_entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry serialized flag reset") + "can't notify parent about child entry serialized flag reset"); } /* end if */ /* Post-conditions, for successful operation */ @@ -3934,13 +3939,13 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) /* Usage checks */ if (!parent_entry->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't pinned") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't pinned"); if (NULL == child_entry->flush_dep_parent) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "Child entry doesn't have a flush dependency parent array") + "Child entry doesn't have a flush dependency parent array"); if (0 == parent_entry->flush_dep_nchildren) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "Parent entry flush dependency ref. count has no child dependencies") + "Parent entry flush dependency ref. count has no child dependencies"); /* Search for parent in child's parent array. This is a linear search * because we do not expect large numbers of parents. If this changes, we @@ -3950,7 +3955,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) break; if (u == child_entry->flush_dep_nparents) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "Parent entry isn't a flush dependency parent for child entry") + "Parent entry isn't a flush dependency parent for child entry"); /* Remove parent entry from child's parent array */ if (u < (child_entry->flush_dep_nparents - 1)) @@ -3967,7 +3972,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) /* Check if we should unpin parent entry now */ if (!parent_entry->pinned_from_client) if (H5C__unpin_entry_real(cache_ptr, parent_entry, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry"); /* Mark the entry as unpinned from the cache's action */ parent_entry->pinned_from_cache = FALSE; @@ -3984,7 +3989,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) if (parent_entry->type->notify && (parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_CLEANED, parent_entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry dirty flag reset") + "can't notify parent about child entry dirty flag reset"); } /* end if */ /* adjust parent entry's number of unserialized children */ @@ -3997,7 +4002,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) if (parent_entry->type->notify && (parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_SERIALIZED, parent_entry) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, - "can't notify parent about child entry serialized flag set") + "can't notify parent about child entry serialized flag set"); } /* end if */ /* Shrink or free the parent array if appropriate */ @@ -4011,7 +4016,7 @@ H5C_destroy_flush_dependency(void *parent_thing, void *child_thing) H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent, child_entry->flush_dep_parent_nalloc / 4))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for flush dependency parent list") + "memory allocation failed for flush dependency parent list"); child_entry->flush_dep_parent_nalloc /= 4; } /* end if */ @@ -4049,7 +4054,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* Look for entry in cache */ @@ -4063,9 +4068,9 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag /* Check for entry being pinned or protected */ if (entry_ptr->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is protected") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is protected"); if (entry_ptr->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is pinned") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "Target entry is pinned"); /* If we get this far, call H5C__flush_single_entry() with the * H5C__FLUSH_INVALIDATE_FLAG and the H5C__FLUSH_CLEAR_ONLY_FLAG. @@ -4079,7 +4084,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag flush_flags |= H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG; if (H5C__flush_single_entry(f, entry_ptr, flush_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't flush entry"); done: #ifdef H5C_DO_EXTREME_SANITY_CHECKS @@ -4117,11 +4122,11 @@ H5C_remove_entry(void *_entry) /* Check for error conditions */ if (entry->is_dirty) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove dirty entry from cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove dirty entry from cache"); if (entry->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove protected entry from cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove protected entry from cache"); if (entry->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove pinned entry from cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove pinned entry from cache"); /* NOTE: If these two errors are getting tripped because the entry is * in a flush dependency with a freedspace entry, move the checks * after the "before evict" message is sent, and add the @@ -4130,10 +4135,10 @@ H5C_remove_entry(void *_entry) */ if (entry->flush_dep_nparents > 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, - "can't remove entry with flush dependency parents from cache") + "can't remove entry with flush dependency parents from cache"); if (entry->flush_dep_nchildren > 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, - "can't remove entry with flush dependency children from cache") + "can't remove entry with flush dependency children from cache"); /* Additional internal cache consistency checks */ assert(!entry->in_slist); @@ -4152,7 +4157,7 @@ H5C_remove_entry(void *_entry) * notice while the entry is still fully integrated in the cache. */ if (entry->type->notify && (entry->type->notify)(H5C_NOTIFY_ACTION_BEFORE_EVICT, entry) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict") + HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry to evict"); /* Update the cache internal data structures as appropriate for a destroy. * Specifically: diff --git a/src/H5Cimage.c b/src/H5Cimage.c index 96d22d7..87df542 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -260,18 +260,18 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr) /* Allocate the buffer in which to construct the cache image block */ if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for cache image buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for cache image buffer"); /* Construct the cache image block header image */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "header image construction failed"); 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTENCODE, FAIL, "entry image construction failed"); assert((size_t)(p - (uint8_t *)cache_ptr->image_buffer) < cache_ptr->image_data_len); /* Construct the adaptive resize status image -- not yet */ @@ -403,16 +403,16 @@ H5C__generate_cache_image(H5F_t *f, H5C_t *cache_ptr) /* Construct cache image */ if (H5C__construct_cache_image_buffer(f, cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't create metadata cache image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't create metadata cache image"); /* Free image entries array */ if (H5C__free_image_entries_array(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't free image entries array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't free image entries array"); /* Write cache image block if so configured */ if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDC_IMAGE_BLK) { if (H5C__write_cache_image(f, cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't write metadata cache image block to file") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't write metadata cache image block to file"); H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr); } /* end if */ @@ -503,9 +503,9 @@ H5C__get_cache_image_config(const H5C_t *cache_ptr, H5C_cache_image_ctl_t *confi FUNC_ENTER_PACKAGE if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache_ptr on entry"); if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad config_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad config_ptr on entry"); *config_ptr = cache_ptr->image_ctl; @@ -551,7 +551,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr) */ if (H5F_block_read(f, H5FD_MEM_SUPER, cache_ptr->image_addr, cache_ptr->image_len, cache_ptr->image_buffer) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_READERROR, FAIL, "Can't read metadata cache image block") + HGOTO_ERROR(H5E_CACHE, H5E_READERROR, FAIL, "Can't read metadata cache image block"); H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr); @@ -620,15 +620,15 @@ H5C__load_cache_image(H5F_t *f) /* Allocate space for the image */ if (NULL == (cache_ptr->image_buffer = H5MM_malloc(cache_ptr->image_len + 1))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for cache image buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for cache image buffer"); /* Load the image from file */ if (H5C__read_cache_image(f, cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_READERROR, FAIL, "Can't read metadata cache image block") + HGOTO_ERROR(H5E_CACHE, H5E_READERROR, FAIL, "Can't read metadata cache image block"); /* Reconstruct cache contents, from image */ if (H5C__reconstruct_cache_contents(f, cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDECODE, FAIL, "Can't reconstruct cache contents from image block") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDECODE, FAIL, "Can't reconstruct cache contents from image block"); /* Free the image buffer */ cache_ptr->image_buffer = H5MM_xfree(cache_ptr->image_buffer); @@ -645,7 +645,7 @@ H5C__load_cache_image(H5F_t *f) if (cache_ptr->delete_image) { if (H5F__super_ext_remove_msg(f, H5O_MDCI_MSG_ID) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, - "can't remove metadata cache image message from superblock extension") + "can't remove metadata cache image message from superblock extension"); /* Reset image block values */ cache_ptr->image_len = 0; @@ -825,7 +825,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) if (cache_ptr->load_image) { cache_ptr->load_image = FALSE; if (H5C__load_cache_image(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image") + HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image"); } /* end if */ /* Before we start to generate the cache image (if requested), verify @@ -868,11 +868,11 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) */ if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDCI_SBE_MESG) if (H5C__write_cache_image_superblock_msg(f, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "creation of cache image SB mesg failed.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "creation of cache image SB mesg failed."); /* Serialize the cache */ if (H5C__serialize_cache(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "serialization of the cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "serialization of the cache failed"); /* Scan the cache and record data needed to construct the * cache image. In particular, for each entry we must record: @@ -891,7 +891,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) * manager code, this size should be correct. */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C__prep_for_file_close__scan_entries failed"); assert(HADDR_UNDEF == cache_ptr->image_addr); #ifdef H5_HAVE_PARALLEL @@ -935,7 +935,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) (cache_ptr->image_addr = H5FD_alloc(f->shared->lf, H5FD_MEM_SUPER, f, (hsize_t)p0_image_len, &eoa_frag_addr, &eoa_frag_size))) HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, - "can't allocate file space for metadata cache image") + "can't allocate file space for metadata cache image"); } /* end if */ else #endif /* H5_HAVE_PARALLEL */ @@ -947,7 +947,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) (hsize_t)(cache_ptr->image_data_len), &eoa_frag_addr, &eoa_frag_size))) HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, - "can't allocate file space for metadata cache image") + "can't allocate file space for metadata cache image"); /* Make note of the eoa after allocation of the cache image * block. This value is used for sanity checking when we @@ -956,7 +956,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) */ 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); /* For now, drop any fragment left over from the allocation of the * image block on the ground. A fragment should only be returned @@ -989,7 +989,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) */ if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDC_IMAGE_BLK) if (H5C__write_cache_image_superblock_msg(f, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "update of cache image SB mesg failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "update of cache image SB mesg failed"); /* At this point: * @@ -1027,7 +1027,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) */ if (cache_ptr->num_entries_in_image > 0) { if (H5C__prep_for_file_close__setup_image_entries_array(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINIT, FAIL, "can't setup image entries array.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINIT, FAIL, "can't setup image entries array."); /* Sort the entries */ qsort(cache_ptr->image_entries, (size_t)cache_ptr->num_entries_in_image, @@ -1044,7 +1044,7 @@ H5C__prep_image_for_file_close(H5F_t *f, hbool_t *image_generated) if (cache_ptr->image_ctl.flags & H5C_CI__GEN_MDC_IMAGE_BLK) if (H5F__super_ext_remove_msg(f, H5O_MDCI_MSG_ID) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, - "can't remove MDC image msg from superblock ext") + "can't remove MDC image msg from superblock ext"); cache_ptr->image_ctl.generate_image = FALSE; } /* end else */ @@ -1096,11 +1096,11 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl /* Check arguments */ if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad cache_ptr on entry"); /* Validate the config: */ if (H5C_validate_cache_image_config(config_ptr) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid cache image configuration") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid cache image configuration"); #ifdef H5_HAVE_PARALLEL /* The collective metadata write code is not currently compatible @@ -1164,26 +1164,26 @@ H5C_validate_cache_image_config(H5C_cache_image_ctl_t *ctl_ptr) FUNC_ENTER_NOAPI(FAIL) if (ctl_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL ctl_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL ctl_ptr on entry"); if (ctl_ptr->version != H5C__CURR_CACHE_IMAGE_CTL_VER) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown cache image control version") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown cache image control version"); /* At present, we do not support inclusion of the adaptive resize * configuration in the cache image. Thus the save_resize_status * field must be FALSE. */ if (ctl_ptr->save_resize_status != FALSE) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unexpected value in save_resize_status field") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unexpected value in save_resize_status field"); /* At present, we do not support prefetched entry ageouts. Thus * the entry_ageout field must be set to * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. */ if (ctl_ptr->entry_ageout != H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unexpected value in entry_ageout field") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unexpected value in entry_ageout field"); if ((ctl_ptr->flags & ~H5C_CI__ALL_FLAGS) != 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown flag set") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown flag set"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1289,38 +1289,38 @@ H5C__decode_cache_image_header(const H5F_t *f, H5C_t *cache_ptr, const uint8_t * /* Check signature */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image header signature"); p += H5C__MDCI_BLOCK_SIGNATURE_LEN; /* Check version */ version = *p++; if (version != (uint8_t)H5C__MDCI_BLOCK_VERSION_0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image version") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image version"); /* Decode flags */ flags = *p++; if (flags & H5C__MDCI_HEADER_HAVE_RESIZE_STATUS) have_resize_status = TRUE; if (have_resize_status) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "MDC resize status not yet supported") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "MDC resize status not yet supported"); /* Read image data length */ H5F_DECODE_LENGTH(f, p, cache_ptr->image_data_len); /* For now -- will become <= eventually */ if (cache_ptr->image_data_len != cache_ptr->image_len) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image data length") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache image data length"); /* Read num entries */ UINT32DECODE(p, cache_ptr->num_entries_in_image); if (cache_ptr->num_entries_in_image == 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache entry count") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad metadata cache entry count"); /* Verify expected length of header */ actual_header_len = (size_t)(p - *buf); expected_header_len = H5C__cache_image_block_header_size(f); if (actual_header_len != expected_header_len) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad header image len") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad header image len"); /* Update buffer pointer */ *buf = p; @@ -1415,7 +1415,7 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint /* Decode dirty dependency child count */ UINT16DECODE(p, fd_dirty_child_count); if (fd_dirty_child_count > fd_child_count) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid dirty flush dependency child count") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid dirty flush dependency child count"); /* Decode dependency parent count */ UINT16DECODE(p, fd_parent_count); @@ -1428,16 +1428,16 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint /* Decode entry offset */ H5F_addr_decode(f, &p, &addr); if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid entry offset") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid entry offset"); /* Decode entry length */ H5F_DECODE_LENGTH(f, p, size); if (size == 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid entry size") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid entry size"); /* Verify expected length of entry image */ if ((size_t)(p - *buf) != H5C__cache_image_block_entry_header_size(f)) - HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, FAIL, "Bad entry image len") + HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, FAIL, "Bad entry image len"); /* If parent count greater than zero, allocate array for parent * addresses, and decode addresses into the array. @@ -1446,18 +1446,19 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr, const uint int i; /* Local index variable */ if (NULL == (fd_parent_addrs = (haddr_t *)H5MM_malloc((size_t)(fd_parent_count)*H5F_SIZEOF_ADDR(f)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for fd parent addrs buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, + "memory allocation failed for fd parent addrs buffer"); for (i = 0; i < fd_parent_count; i++) { H5F_addr_decode(f, &p, &(fd_parent_addrs[i])); if (!H5_addr_defined(fd_parent_addrs[i])) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid flush dependency parent offset") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid flush dependency parent offset"); } /* end for */ } /* end if */ /* Allocate buffer for entry image */ if (NULL == (image_ptr = H5MM_malloc(size + H5C_IMAGE_EXTRA_SPACE))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); @@ -1552,7 +1553,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr, uint8_t * actual_header_len = (size_t)(p - *buf); expected_header_len = H5C__cache_image_block_header_size(f); if (actual_header_len != expected_header_len) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad header image len") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad header image len"); /* Update buffer pointer */ *buf = p; @@ -1601,7 +1602,7 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne /* Encode type */ if ((ie_ptr->type_id < 0) || (ie_ptr->type_id > 255)) - HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "type_id out of range.") + HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "type_id out of range."); *p++ = (uint8_t)(ie_ptr->type_id); /* Compose and encode flags */ @@ -1623,17 +1624,17 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne /* Validate and encode dependency child count */ if (ie_ptr->fd_child_count > H5C__MDCI_MAX_FD_CHILDREN) - HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_child_count out of range") + HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_child_count out of range"); UINT16ENCODE(p, (uint16_t)(ie_ptr->fd_child_count)); /* Validate and encode dirty dependency child count */ if (ie_ptr->fd_dirty_child_count > H5C__MDCI_MAX_FD_CHILDREN) - HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_dirty_child_count out of range") + HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_dirty_child_count out of range"); UINT16ENCODE(p, (uint16_t)(ie_ptr->fd_dirty_child_count)); /* Validate and encode dependency parent count */ if (ie_ptr->fd_parent_count > H5C__MDCI_MAX_FD_PARENTS) - HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_parent_count out of range") + HGOTO_ERROR(H5E_CACHE, H5E_BADRANGE, FAIL, "fd_parent_count out of range"); UINT16ENCODE(p, (uint16_t)(ie_ptr->fd_parent_count)); /* Encode index in LRU */ @@ -1647,7 +1648,7 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf, unsigne /* Verify expected length of entry image */ if ((size_t)(p - *buf) != H5C__cache_image_block_entry_header_size(f)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad entry image len") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "Bad entry image len"); /* Encode dependency parent offsets -- if any */ for (u = 0; u < ie_ptr->fd_parent_count; u++) @@ -1841,7 +1842,7 @@ H5C__prep_for_file_close__compute_fd_heights(const H5C_t *cache_ptr) if (NULL == (entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_calloc( sizeof(haddr_t) * (size_t)(entry_ptr->fd_parent_addrs)))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "memory allocation failed for fd parent addr array") + "memory allocation failed for fd parent addr array"); v = 0; for (u = 0; u < entry_ptr->flush_dep_nparents; u++) { @@ -2002,7 +2003,7 @@ H5C__prep_for_file_close__setup_image_entries_array(H5C_t *cache_ptr) /* Allocate and initialize image_entries array */ if (NULL == (image_entries = (H5C_image_entry_t *)H5MM_calloc( sizeof(H5C_image_entry_t) * (size_t)(cache_ptr->num_entries_in_image + 1)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for image_entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for image_entries"); /* Initialize (non-zero/NULL/FALSE) fields */ for (u = 0; u <= cache_ptr->num_entries_in_image; u++) { @@ -2199,7 +2200,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) if (NULL == (entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_malloc( sizeof(haddr_t) * (size_t)(entry_ptr->fd_parent_count)))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "memory allocation failed for fd parent addrs buffer") + "memory allocation failed for fd parent addrs buffer"); 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; @@ -2220,7 +2221,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) */ if (entry_ptr->flush_dep_nchildren > 0) { if (!entry_ptr->is_pinned) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "encountered unpinned fd parent?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "encountered unpinned fd parent?!?"); entry_ptr->fd_child_count = entry_ptr->flush_dep_nchildren; entry_ptr->fd_dirty_child_count = entry_ptr->flush_dep_ndirty_children; @@ -2262,7 +2263,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) * call, computation of the image size is delayed. */ if (H5C__prep_for_file_close__compute_fd_heights(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "computation of flush dependency heights failed?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "computation of flush dependency heights failed?!?"); /* At this point, all entries that will appear in the cache * image should be marked correctly. Compute the size of the @@ -2386,7 +2387,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) /* 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDECODE, FAIL, "cache image header decode failed"); 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 */ @@ -2400,7 +2401,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) * entry in cache_ptr->image_entrise. */ if (NULL == (pf_entry_ptr = H5C__reconstruct_cache_entry(f, cache_ptr, &p))) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "reconstruction of cache entry failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "reconstruction of cache entry failed"); /* Note that we make no checks on available cache space before * inserting the reconstructed entry into the metadata cache. @@ -2434,7 +2435,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) parent_ptr = NULL; H5C__SEARCH_INDEX(cache_ptr, pf_entry_ptr->fd_parent_addrs[v], parent_ptr, FAIL); if (parent_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "fd parent not in cache?!?") + HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "fd parent not in cache?!?"); /* Sanity checks */ assert(parent_ptr->addr == pf_entry_ptr->fd_parent_addrs[v]); @@ -2448,7 +2449,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) /* Setup the flush dependency */ if (H5C_create_flush_dependency(parent_ptr, pf_entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Can't restore flush dependency") + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Can't restore flush dependency"); /* And now unprotect */ H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, parent_ptr, FAIL); @@ -2528,12 +2529,12 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) hbool_t write_permitted = FALSE; if (cache_ptr->check_write_permitted && (cache_ptr->check_write_permitted)(f, &write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "Can't get write_permitted") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "Can't get write_permitted"); else write_permitted = cache_ptr->write_permitted; if (H5C__make_space_in_cache(f, 0, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "H5C__make_space_in_cache failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "H5C__make_space_in_cache failed"); } /* end if */ done: @@ -2581,7 +2582,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b /* Allocate space for the prefetched cache entry */ if (NULL == (pf_entry_ptr = H5FL_CALLOC(H5C_cache_entry_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for prefetched cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for prefetched cache entry"); /* Get pointer to buffer */ p = *buf; @@ -2634,7 +2635,7 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b if (!file_is_rw) pf_entry_ptr->fd_dirty_child_count = 0; if (pf_entry_ptr->fd_dirty_child_count > pf_entry_ptr->fd_child_count) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid dirty flush dependency child count") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid dirty flush dependency child count"); /* Decode dependency parent count */ UINT16DECODE(p, pf_entry_ptr->fd_parent_count); @@ -2648,16 +2649,16 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b /* Decode entry offset */ H5F_addr_decode(f, &p, &pf_entry_ptr->addr); if (!H5_addr_defined(pf_entry_ptr->addr)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid entry offset") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid entry offset"); /* Decode entry length */ H5F_DECODE_LENGTH(f, p, pf_entry_ptr->size); if (pf_entry_ptr->size == 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid entry size") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid entry size"); /* Verify expected length of entry image */ if ((size_t)(p - *buf) != H5C__cache_image_block_entry_header_size(f)) - HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, NULL, "Bad entry image len") + HGOTO_ERROR(H5E_CACHE, H5E_BADSIZE, NULL, "Bad entry image len"); /* If parent count greater than zero, allocate array for parent * addresses, and decode addresses into the array. @@ -2667,18 +2668,19 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr, const uint8_t **b if (NULL == (pf_entry_ptr->fd_parent_addrs = (haddr_t *)H5MM_malloc( (size_t)(pf_entry_ptr->fd_parent_count) * H5F_SIZEOF_ADDR(f)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for fd parent addrs buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, + "memory allocation failed for fd parent addrs buffer"); for (u = 0; u < pf_entry_ptr->fd_parent_count; u++) { H5F_addr_decode(f, &p, &(pf_entry_ptr->fd_parent_addrs[u])); if (!H5_addr_defined(pf_entry_ptr->fd_parent_addrs[u])) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid flush dependency parent offset") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, NULL, "invalid flush dependency parent offset"); } /* end for */ } /* end if */ /* Allocate buffer for entry image */ if (NULL == (pf_entry_ptr->image_ptr = H5MM_malloc(pf_entry_ptr->size + H5C_IMAGE_EXTRA_SPACE))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer"); #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)pf_entry_ptr->image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); #endif /* H5C_DO_MEMORY_SANITY_CHECKS */ @@ -2764,7 +2766,7 @@ H5C__write_cache_image_superblock_msg(H5F_t *f, hbool_t create) /* Write metadata cache image message to superblock extension */ if (H5F__super_ext_write_msg(f, H5O_MDCI_MSG_ID, &mdci_msg, create, mesg_flags) < 0) HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, - "can't write metadata cache image message to superblock extension") + "can't write metadata cache image message to superblock extension"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2804,7 +2806,7 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr) /* Write the buffer (if serial access, or rank 0 for parallel access) */ if (H5F_block_write(f, H5FD_MEM_SUPER, cache_ptr->image_addr, cache_ptr->image_len, cache_ptr->image_buffer) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't write metadata cache image block to file") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't write metadata cache image block to file"); #ifdef H5_HAVE_PARALLEL } /* end if */ } /* end block */ diff --git a/src/H5Cint.c b/src/H5Cint.c index a2a4dcf..eb9b64c 100644 --- a/src/H5Cint.c +++ b/src/H5Cint.c @@ -117,20 +117,20 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) cache_ptr->resize_in_progress = TRUE; if (!cache_ptr->resize_enabled) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Auto cache resize disabled"); 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate"); assert((0.0 <= hit_rate) && (hit_rate <= 1.0)); switch (cache_ptr->resize_ctl.incr_mode) { case H5C_incr__off: if (cache_ptr->size_increase_possible) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "size_increase_possible but H5C_incr__off?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "size_increase_possible but H5C_incr__off?!?!?"); break; case H5C_incr__threshold: @@ -163,7 +163,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode"); } /* If the decr_mode is either age out or age out with threshold, we @@ -183,7 +183,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) (cache_ptr->epoch_markers_active < cache_ptr->resize_ctl.epochs_before_eviction)) { if (H5C__autoadjust__ageout__insert_new_marker(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't insert new epoch marker") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't insert new epoch marker"); inserted_epoch_marker = TRUE; } @@ -234,13 +234,13 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) else { if (H5C__autoadjust__ageout(f, hit_rate, &status, &new_max_cache_size, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ageout code failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ageout code failed"); } /* end else */ } /* end if */ break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unknown incr_mode"); } } @@ -250,7 +250,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) !inserted_epoch_marker) /* move last epoch marker to the head of the LRU list */ if (H5C__autoadjust__ageout__cycle_epoch_marker(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error cycling epoch marker") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error cycling epoch marker"); if ((status == increase) || (status == decrease)) { old_max_cache_size = cache_ptr->max_cache_size; @@ -283,7 +283,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) switch (cache_ptr->resize_ctl.flash_incr_mode) { case H5C_flash_incr__off: HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "flash_size_increase_possible but H5C_flash_incr__off?!") + "flash_size_increase_possible but H5C_flash_incr__off?!"); break; case H5C_flash_incr__add_space: @@ -293,7 +293,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?"); break; } } @@ -306,7 +306,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted) if (H5C_reset_cache_hit_rate_stats(cache_ptr) < 0) /* this should be impossible... */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed"); done: /* Sanity checks */ @@ -351,7 +351,7 @@ H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *statu /* remove excess epoch markers if any */ if (cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction) if (H5C__autoadjust__ageout__remove_excess_markers(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't remove excess epoch markers"); if ((cache_ptr->resize_ctl.decr_mode == H5C_decr__age_out) || ((cache_ptr->resize_ctl.decr_mode == H5C_decr__age_out_with_threshold) && @@ -360,7 +360,7 @@ H5C__autoadjust__ageout(H5F_t *f, double hit_rate, enum H5C_resize_status *statu if (cache_ptr->max_cache_size > cache_ptr->resize_ctl.min_size) { /* evict aged out cache entries if appropriate... */ if (H5C__autoadjust__ageout__evict_aged_out_entries(f, write_permitted) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error flushing aged out entries"); /* ... and then reduce cache size if appropriate */ if (cache_ptr->index_size < cache_ptr->max_cache_size) { @@ -423,18 +423,18 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr) assert(cache_ptr); if (cache_ptr->epoch_markers_active <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "No active epoch markers on entry?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "No active epoch markers on entry?!?!?"); /* remove the last marker from both the ring buffer and the LRU list */ i = cache_ptr->epoch_marker_ringbuf[cache_ptr->epoch_marker_ringbuf_first]; cache_ptr->epoch_marker_ringbuf_first = (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1); if (cache_ptr->epoch_marker_ringbuf_size <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow"); cache_ptr->epoch_marker_ringbuf_size -= 1; if (cache_ptr->epoch_marker_active[i] != TRUE) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?"); H5C__DLL_REMOVE((&((cache_ptr->epoch_markers)[i])), (cache_ptr)->LRU_head_ptr, (cache_ptr)->LRU_tail_ptr, (cache_ptr)->LRU_list_len, (cache_ptr)->LRU_list_size, (FAIL)) @@ -450,7 +450,7 @@ H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t *cache_ptr) (cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1); cache_ptr->epoch_marker_ringbuf[cache_ptr->epoch_marker_ringbuf_last] = i; if (cache_ptr->epoch_marker_ringbuf_size >= H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow"); cache_ptr->epoch_marker_ringbuf_size += 1; @@ -561,7 +561,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte cache_ptr->last_entry_removed_ptr = NULL; if (H5C__flush_single_entry(f, entry_ptr, H5C__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry"); if (cache_ptr->entries_removed_counter > 1 || cache_ptr->last_entry_removed_ptr == prev_ptr) @@ -573,7 +573,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte if (H5C__flush_single_entry( f, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry"); } /* end else-if */ else { assert(!entry_ptr->is_dirty); @@ -642,7 +642,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte if (!(entry_ptr->is_dirty) && !(entry_ptr->prefetched_dirty)) if (H5C__flush_single_entry( f, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry"); /* just skip the entry if it is dirty, as we can't do * anything with it now since we can't write. @@ -684,14 +684,14 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr) assert(cache_ptr); 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Already have a full complement of markers"); /* find an unused marker */ i = 0; while ((cache_ptr->epoch_marker_active)[i] && i < H5C__MAX_EPOCH_MARKERS) i++; if (i >= H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't find unused marker"); assert(((cache_ptr->epoch_markers)[i]).addr == (haddr_t)i); assert(((cache_ptr->epoch_markers)[i]).next == NULL); @@ -703,7 +703,7 @@ H5C__autoadjust__ageout__insert_new_marker(H5C_t *cache_ptr) (cache_ptr->epoch_marker_ringbuf_last + 1) % (H5C__MAX_EPOCH_MARKERS + 1); (cache_ptr->epoch_marker_ringbuf)[cache_ptr->epoch_marker_ringbuf_last] = i; if (cache_ptr->epoch_marker_ringbuf_size >= H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer overflow"); cache_ptr->epoch_marker_ringbuf_size += 1; @@ -749,11 +749,11 @@ H5C__autoadjust__ageout__remove_all_markers(H5C_t *cache_ptr) (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1); if (cache_ptr->epoch_marker_ringbuf_size <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow"); cache_ptr->epoch_marker_ringbuf_size -= 1; if (cache_ptr->epoch_marker_active[i] != TRUE) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?"); /* remove the epoch marker from the LRU list */ H5C__DLL_REMOVE(&(cache_ptr->epoch_markers[i]), cache_ptr->LRU_head_ptr, cache_ptr->LRU_tail_ptr, @@ -800,7 +800,7 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr) assert(cache_ptr); 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "no excess markers on entry"); while (cache_ptr->epoch_markers_active > cache_ptr->resize_ctl.epochs_before_eviction) { /* get the index of the last epoch marker in the LRU list @@ -813,11 +813,11 @@ H5C__autoadjust__ageout__remove_excess_markers(H5C_t *cache_ptr) (cache_ptr->epoch_marker_ringbuf_first + 1) % (H5C__MAX_EPOCH_MARKERS + 1); if (cache_ptr->epoch_marker_ringbuf_size <= 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "ring buffer underflow"); cache_ptr->epoch_marker_ringbuf_size -= 1; if (cache_ptr->epoch_marker_active[i] != TRUE) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unused marker in LRU?!?"); /* remove the epoch marker from the LRU list */ H5C__DLL_REMOVE(&(cache_ptr->epoch_markers[i]), cache_ptr->LRU_head_ptr, cache_ptr->LRU_tail_ptr, @@ -873,7 +873,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n 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") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "old_entry_size >= new_entry_size"); space_needed = new_entry_size - old_entry_size; if (((cache_ptr->index_size + space_needed) > cache_ptr->max_cache_size) && @@ -881,7 +881,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n switch (cache_ptr->resize_ctl.flash_incr_mode) { case H5C_flash_incr__off: HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "flash_size_increase_possible but H5C_flash_incr__off?!") + "flash_size_increase_possible but H5C_flash_incr__off?!"); break; case H5C_flash_incr__add_space: @@ -894,7 +894,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?"); break; } @@ -917,7 +917,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n switch (cache_ptr->resize_ctl.flash_incr_mode) { case H5C_flash_incr__off: HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "flash_size_increase_possible but H5C_flash_incr__off?!") + "flash_size_increase_possible but H5C_flash_incr__off?!"); break; case H5C_flash_incr__add_space: @@ -926,7 +926,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n break; default: /* should be unreachable */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown flash_incr_mode?!?!?"); break; } @@ -940,7 +940,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n * be good as we haven't reset the hit rate statistics. */ if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate"); (cache_ptr->resize_ctl.rpt_fcn)(cache_ptr, H5C__CURR_AUTO_RESIZE_RPT_FCN_VER, hit_rate, status, old_max_cache_size, new_max_cache_size, old_min_clean_size, @@ -949,7 +949,7 @@ H5C__flash_increase_cache_size(H5C_t *cache_ptr, size_t old_entry_size, size_t n if (H5C_reset_cache_hit_rate_stats(cache_ptr) < 0) /* this should be impossible... */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_reset_cache_hit_rate_stats failed"); } done: @@ -1040,7 +1040,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags) /* remove ageout markers if present */ if (cache_ptr->epoch_markers_active > 0) if (H5C__autoadjust__ageout__remove_all_markers(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "error removing all epoch markers"); /* flush invalidate each ring, starting from the outermost ring and * working inward. @@ -1048,7 +1048,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags) ring = H5C_RING_USER; while (ring < H5C_RING_NTYPES) { if (H5C__flush_invalidate_ring(f, ring, flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate ring failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate ring failed"); ring++; } /* end while */ @@ -1262,7 +1262,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) /* Get cache entry for this node */ next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); if (NULL == next_entry_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!"); assert(next_entry_ptr->is_dirty); assert(next_entry_ptr->in_slist); @@ -1294,7 +1294,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) if (node_ptr != NULL) { next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); if (NULL == next_entry_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!"); assert(next_entry_ptr->is_dirty); assert(next_entry_ptr->in_slist); @@ -1325,7 +1325,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) } /* end if */ else if (entry_ptr->is_pinned) { if (H5C__flush_single_entry(f, entry_ptr, H5C__DURING_FLUSH_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty pinned entry flush failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty pinned entry flush failed"); if (cache_ptr->slist_changed) { /* The slist has been modified by something @@ -1345,7 +1345,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) (cooked_flags | H5C__DURING_FLUSH_FLAG | H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry flush destroy failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "dirty entry flush destroy failed"); if (cache_ptr->slist_changed) { /* The slist has been modified by something @@ -1453,7 +1453,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) (cooked_flags | H5C__DURING_FLUSH_FLAG | H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Entry flush destroy failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Entry flush destroy failed"); /* Restart the index list scan if necessary. Must * do this if the next entry is evicted, and also if @@ -1514,7 +1514,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) HGOTO_ERROR( H5E_CACHE, H5E_CANTFLUSH, FAIL, "Pinned entry count not decreasing, cur_ring_pel_len = %d, old_ring_pel_len = %d, ring = %d", - (int)cur_ring_pel_len, (int)old_ring_pel_len, (int)ring) + (int)cur_ring_pel_len, (int)old_ring_pel_len, (int)ring); } /* end if */ assert(protected_entries == cache_ptr->pl_len); @@ -1522,7 +1522,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) if ((protected_entries > 0) && (protected_entries == cache_ptr->index_len)) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Only protected entries left in cache, protected_entries = %d", - (int)protected_entries) + (int)protected_entries); } /* main while loop */ /* Invariants, after destroying all entries in the ring */ @@ -1539,9 +1539,9 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) assert(protected_entries <= cache_ptr->pl_len); if (protected_entries > 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cache has protected entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Cache has protected entries"); else if (cur_ring_pel_len > 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't unpin all pinned entries in ring") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't unpin all pinned entries in ring"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1600,7 +1600,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ ignore_protected = ((flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0); @@ -1685,7 +1685,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) /* Get cache entry for this node */ next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); if (NULL == next_entry_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!"); assert(next_entry_ptr->is_dirty); assert(next_entry_ptr->in_slist); @@ -1723,7 +1723,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) if (node_ptr != NULL) { next_entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr); if (NULL == next_entry_ptr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "next_entry_ptr == NULL ?!?!"); assert(next_entry_ptr->is_dirty); assert(next_entry_ptr->in_slist); @@ -1755,7 +1755,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) } /* end if */ else { if (H5C__flush_single_entry(f, entry_ptr, (flags | H5C__DURING_FLUSH_FLAG)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush entry"); if (cache_ptr->slist_changed) { /* The slist has been modified by something @@ -1787,7 +1787,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags) 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items"); #ifdef H5C_DO_SANITY_CHECKS if (!flush_marked_entries) { @@ -1919,7 +1919,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) cache_ptr->last_entry_removed_ptr = NULL; if (H5C__flush_single_entry(f, entry_ptr, H5C__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry"); if ((cache_ptr->entries_removed_counter > 1) || (cache_ptr->last_entry_removed_ptr == prev_ptr)) @@ -1938,7 +1938,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) if (H5C__flush_single_entry(f, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry"); } else { /* We have enough space so don't flush clean entry. */ @@ -2055,7 +2055,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted) ) { if (H5C__flush_single_entry( f, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry"); } /* end if */ /* we are scanning the clean LRU, so the serialize function @@ -2165,7 +2165,7 @@ H5C__serialize_cache(H5F_t *f) #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ #ifndef NDEBUG @@ -2210,14 +2210,14 @@ H5C__serialize_cache(H5F_t *f) /* Settle raw data FSM */ if (!cache_ptr->rdfsm_settled) if (H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed"); break; case H5C_RING_MDFSM: /* Settle metadata FSM */ if (!cache_ptr->mdfsm_settled) if (H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed"); break; case H5C_RING_SBE: @@ -2225,12 +2225,12 @@ H5C__serialize_cache(H5F_t *f) break; default: - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!"); break; } /* end switch */ if (H5C__serialize_ring(f, ring) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialize ring failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialize ring failed"); ring++; } /* end while */ @@ -2413,7 +2413,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) /* Serialize the entry */ if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed"); assert(entry_ptr->flush_dep_nunser_children == 0); assert(entry_ptr->serialization_count == 0); @@ -2475,14 +2475,14 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring) /* Serialize the entry */ if (H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed"); /* Check for the cache changing */ if ((cache_ptr->entries_loaded_counter > 0) || (cache_ptr->entries_inserted_counter > 0) || (cache_ptr->entries_relocated_counter > 0)) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, - "flush_me_last entry serialization triggered restart") + "flush_me_last entry serialization triggered restart"); assert(entry_ptr->flush_dep_nunser_children == 0); assert(entry_ptr->serialization_count == 0); diff --git a/src/H5Clog.c b/src/H5Clog.c index 69ad8b3..dfbc699 100644 --- a/src/H5Clog.c +++ b/src/H5Clog.c @@ -85,7 +85,7 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h /* Check logging flags */ if (cache->log_info->enabled) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging already set up") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging already set up"); /* Get the rank when MPI is in use. Logging clients will usually * use that to create per-process logs. @@ -98,14 +98,14 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h /* Set up logging */ if (H5C_LOG_STYLE_JSON == style) { if (H5C__log_json_set_up(cache->log_info, log_location, mpi_rank) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to set up json logging") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to set up json logging"); } else if (H5C_LOG_STYLE_TRACE == style) { if (H5C__log_trace_set_up(cache->log_info, log_location, mpi_rank) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to set up trace logging") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to set up trace logging"); } else - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unknown logging style") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unknown logging style"); /* Set logging flags */ cache->log_info->enabled = TRUE; @@ -113,7 +113,7 @@ H5C_log_set_up(H5C_t *cache, const char log_location[], H5C_log_style_t style, h /* Start logging if requested */ if (start_immediately) if (H5C_start_logging(cache) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to start logging") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to start logging"); done: @@ -141,17 +141,17 @@ H5C_log_tear_down(H5C_t *cache) /* Check logging flags */ if (FALSE == cache->log_info->enabled) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled"); /* Stop logging if that's going on */ if (cache->log_info->logging) if (H5C_stop_logging(cache) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to stop logging") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to stop logging"); /* Tear down logging */ if (cache->log_info->cls->tear_down_logging) if (cache->log_info->cls->tear_down_logging(cache->log_info) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific tear down call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific tear down call failed"); /* Unset logging flags */ cache->log_info->enabled = FALSE; @@ -181,12 +181,12 @@ H5C_start_logging(H5C_t *cache) /* Check logging flags */ if (FALSE == cache->log_info->enabled) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled"); /* Start logging */ if (cache->log_info->cls->start_logging) if (cache->log_info->cls->start_logging(cache->log_info) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific start call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific start call failed"); /* Set logging flags */ cache->log_info->logging = TRUE; @@ -194,7 +194,7 @@ H5C_start_logging(H5C_t *cache) /* Write a log message */ if (cache->log_info->cls->write_start_log_msg) if (cache->log_info->cls->write_start_log_msg(cache->log_info->udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write start call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write start call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -221,19 +221,19 @@ H5C_stop_logging(H5C_t *cache) /* Check logging flags */ if (FALSE == cache->log_info->enabled) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not enabled"); if (FALSE == cache->log_info->logging) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not in progress") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "logging not in progress"); /* Write a log message */ if (cache->log_info->cls->write_stop_log_msg) if (cache->log_info->cls->write_stop_log_msg(cache->log_info->udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write stop call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write stop call failed"); /* Stop logging */ if (cache->log_info->cls->stop_logging) if (cache->log_info->cls->stop_logging(cache->log_info) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific stop call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific stop call failed"); /* Set logging flags */ cache->log_info->logging = FALSE; @@ -291,7 +291,7 @@ H5C_log_write_create_cache_msg(H5C_t *cache, herr_t fxn_ret_value) /* Write a log message */ if (cache->log_info->cls->write_create_cache_log_msg) if (cache->log_info->cls->write_create_cache_log_msg(cache->log_info->udata, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write create cache call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write create cache call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -323,7 +323,7 @@ H5C_log_write_destroy_cache_msg(H5C_t *cache) /* Write a log message */ if (cache->log_info->cls->write_destroy_cache_log_msg) if (cache->log_info->cls->write_destroy_cache_log_msg(cache->log_info->udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write destroy cache call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write destroy cache call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -351,7 +351,7 @@ H5C_log_write_evict_cache_msg(H5C_t *cache, herr_t fxn_ret_value) /* Write a log message */ if (cache->log_info->cls->write_evict_cache_log_msg) if (cache->log_info->cls->write_evict_cache_log_msg(cache->log_info->udata, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write evict cache call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write evict cache call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -380,7 +380,7 @@ H5C_log_write_expunge_entry_msg(H5C_t *cache, haddr_t address, int type_id, herr if (cache->log_info->cls->write_expunge_entry_log_msg) if (cache->log_info->cls->write_expunge_entry_log_msg(cache->log_info->udata, address, type_id, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write expunge entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific write expunge entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -408,7 +408,7 @@ H5C_log_write_flush_cache_msg(H5C_t *cache, herr_t fxn_ret_value) /* Write a log message */ if (cache->log_info->cls->write_flush_cache_log_msg) if (cache->log_info->cls->write_flush_cache_log_msg(cache->log_info->udata, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific flush cache call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific flush cache call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -438,7 +438,7 @@ H5C_log_write_insert_entry_msg(H5C_t *cache, haddr_t address, int type_id, unsig if (cache->log_info->cls->write_insert_entry_log_msg) if (cache->log_info->cls->write_insert_entry_log_msg(cache->log_info->udata, address, type_id, flags, size, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific insert entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific insert entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -468,7 +468,7 @@ H5C_log_write_mark_entry_dirty_msg(H5C_t *cache, const H5C_cache_entry_t *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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark dirty entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark dirty entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -498,7 +498,7 @@ H5C_log_write_mark_entry_clean_msg(H5C_t *cache, const H5C_cache_entry_t *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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark clean entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark clean entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -528,7 +528,7 @@ H5C_log_write_mark_unserialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark unserialized entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark unserialized entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -558,7 +558,7 @@ H5C_log_write_mark_serialized_entry_msg(H5C_t *cache, const H5C_cache_entry_t *e 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark serialized entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific mark serialized entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -588,7 +588,7 @@ H5C_log_write_move_entry_msg(H5C_t *cache, haddr_t old_addr, haddr_t new_addr, i if (cache->log_info->cls->write_move_entry_log_msg) if (cache->log_info->cls->write_move_entry_log_msg(cache->log_info->udata, old_addr, new_addr, type_id, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific move entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific move entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -617,7 +617,7 @@ H5C_log_write_pin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr_t 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") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific pin entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -650,7 +650,7 @@ H5C_log_write_create_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, const 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific create fd call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific create fd call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -681,7 +681,7 @@ H5C_log_write_protect_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, in 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific protect entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific protect entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -712,7 +712,7 @@ H5C_log_write_resize_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, siz 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific resize entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific resize entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -741,7 +741,7 @@ H5C_log_write_unpin_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, herr 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") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unpin entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -774,7 +774,7 @@ H5C_log_write_destroy_fd_msg(H5C_t *cache, const H5C_cache_entry_t *parent, cons 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific destroy fd call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific destroy fd call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -804,7 +804,7 @@ H5C_log_write_unprotect_entry_msg(H5C_t *cache, haddr_t address, int type_id, un if (cache->log_info->cls->write_unprotect_entry_log_msg) if (cache->log_info->cls->write_unprotect_entry_log_msg(cache->log_info->udata, address, type_id, flags, fxn_ret_value) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unprotect entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific unprotect entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -834,7 +834,7 @@ H5C_log_write_set_cache_config_msg(H5C_t *cache, const H5AC_cache_config_t *conf 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific set cache config call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific set cache config call failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -864,7 +864,7 @@ H5C_log_write_remove_entry_msg(H5C_t *cache, const H5C_cache_entry_t *entry, her 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) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific remove entry call failed") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "log-specific remove entry call failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c index 64aa0a4..52154d3 100644 --- a/src/H5Clog_json.c +++ b/src/H5Clog_json.c @@ -170,7 +170,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata) /* Write the log message and flush */ n_chars = HDstrlen(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") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message"); memset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char))); done: @@ -217,12 +217,12 @@ H5C__log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mp /* Allocate memory for the JSON-specific data */ if (NULL == (log_info->udata = H5MM_calloc(sizeof(H5C_log_json_udata_t)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed"); json_udata = (H5C_log_json_udata_t *)(log_info->udata); /* Allocate memory for the message buffer */ if (NULL == (json_udata->message = (char *)H5MM_calloc(H5C_MAX_JSON_LOG_MSG_SIZE * sizeof(char)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Possibly fix up the log file name. * The extra 39 characters are for adding the rank to the file name @@ -234,7 +234,7 @@ H5C__log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mp n_chars = 5 + 39 + 1 + HDstrlen(log_location) + 1; if (NULL == (file_name = (char *)H5MM_calloc(n_chars * sizeof(char)))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "can't allocate memory for mdc log file name manipulation") + "can't allocate memory for mdc log file name manipulation"); /* Add the rank to the log file name when MPI is in use */ if (-1 == mpi_rank) @@ -244,7 +244,7 @@ H5C__log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mp /* Open log file and set it to be unbuffered */ if (NULL == (json_udata->outfile = fopen(file_name, "w"))) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file"); HDsetbuf(json_udata->outfile, NULL); done: @@ -295,7 +295,7 @@ H5C__json_tear_down_logging(H5C_log_info_t *log_info) /* Close log file */ if (EOF == fclose(json_udata->outfile)) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "problem closing mdc log file") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "problem closing mdc log file"); json_udata->outfile = NULL; /* Fre the udata */ @@ -343,7 +343,7 @@ H5C__json_write_start_log_msg(void *udata) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -382,7 +382,7 @@ H5C__json_write_stop_log_msg(void *udata) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -421,7 +421,7 @@ H5C__json_write_create_cache_log_msg(void *udata, herr_t fxn_ret_value) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -459,7 +459,7 @@ H5C__json_write_destroy_cache_log_msg(void *udata) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -498,7 +498,7 @@ H5C__json_write_evict_cache_log_msg(void *udata, herr_t fxn_ret_value) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -539,7 +539,7 @@ H5C__json_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id, /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -578,7 +578,7 @@ H5C__json_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value) /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -623,7 +623,7 @@ H5C__json_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id, /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -664,7 +664,7 @@ H5C__json_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t *e /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -705,7 +705,7 @@ H5C__json_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t *e /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -747,7 +747,7 @@ H5C__json_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_ent /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -789,7 +789,7 @@ H5C__json_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entry /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -833,7 +833,7 @@ H5C__json_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_ad /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -874,7 +874,7 @@ H5C__json_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, h /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -920,7 +920,7 @@ H5C__json_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent, /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -972,7 +972,7 @@ H5C__json_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *entr /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1015,7 +1015,7 @@ H5C__json_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entry /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1056,7 +1056,7 @@ H5C__json_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1102,7 +1102,7 @@ H5C__json_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent, /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1145,7 +1145,7 @@ H5C__json_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_i /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1186,7 +1186,7 @@ H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1227,7 +1227,7 @@ H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entry /* Write the log message to the file */ if (H5C__json_write_log_message(json_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c index 4d8e6a8..ffa415f 100644 --- a/src/H5Clog_trace.c +++ b/src/H5Clog_trace.c @@ -165,7 +165,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata) /* Write the log message and flush */ n_chars = HDstrlen(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") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message"); memset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char))); done: @@ -212,12 +212,12 @@ H5C__log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int m /* Allocate memory for the JSON-specific data */ if (NULL == (log_info->udata = H5MM_calloc(sizeof(H5C_log_trace_udata_t)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed"); trace_udata = (H5C_log_trace_udata_t *)(log_info->udata); /* Allocate memory for the message buffer */ if (NULL == (trace_udata->message = (char *)H5MM_calloc(H5C_MAX_TRACE_LOG_MSG_SIZE * sizeof(char)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Possibly fix up the log file name. * The extra 39 characters are for adding the rank to the file name @@ -229,7 +229,7 @@ H5C__log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int m n_chars = HDstrlen(log_location) + 1 + 39 + 1; if (NULL == (file_name = (char *)H5MM_calloc(n_chars * sizeof(char)))) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, - "can't allocate memory for mdc log file name manipulation") + "can't allocate memory for mdc log file name manipulation"); /* Add the rank to the log file name when MPI is in use */ if (-1 == mpi_rank) @@ -239,7 +239,7 @@ H5C__log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int m /* Open log file and set it to be unbuffered */ if (NULL == (trace_udata->outfile = fopen(file_name, "w"))) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "can't create mdc log file"); HDsetbuf(trace_udata->outfile, NULL); /* Write the header */ @@ -293,7 +293,7 @@ H5C__trace_tear_down_logging(H5C_log_info_t *log_info) /* Close log file */ if (EOF == fclose(trace_udata->outfile)) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "problem closing mdc log file") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "problem closing mdc log file"); trace_udata->outfile = NULL; /* Fre the udata */ @@ -334,7 +334,7 @@ H5C__trace_write_expunge_entry_log_msg(void *udata, haddr_t address, int type_id /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -366,7 +366,7 @@ H5C__trace_write_flush_cache_log_msg(void *udata, herr_t fxn_ret_value) /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -400,7 +400,7 @@ H5C__trace_write_insert_entry_log_msg(void *udata, haddr_t address, int type_id, /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -434,7 +434,7 @@ H5C__trace_write_mark_entry_dirty_log_msg(void *udata, const H5C_cache_entry_t * /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -468,7 +468,7 @@ H5C__trace_write_mark_entry_clean_log_msg(void *udata, const H5C_cache_entry_t * /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -503,7 +503,7 @@ H5C__trace_write_mark_unserialized_entry_log_msg(void *udata, const H5C_cache_en /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -538,7 +538,7 @@ H5C__trace_write_mark_serialized_entry_log_msg(void *udata, const H5C_cache_entr /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -572,7 +572,7 @@ H5C__trace_write_move_entry_log_msg(void *udata, haddr_t old_addr, haddr_t new_a /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -606,7 +606,7 @@ H5C__trace_write_pin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry, /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -644,7 +644,7 @@ H5C__trace_write_create_fd_log_msg(void *udata, const H5C_cache_entry_t *parent, /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -679,7 +679,7 @@ H5C__trace_write_protect_entry_log_msg(void *udata, const H5C_cache_entry_t *ent /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -714,7 +714,7 @@ H5C__trace_write_resize_entry_log_msg(void *udata, const H5C_cache_entry_t *entr /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -748,7 +748,7 @@ H5C__trace_write_unpin_entry_log_msg(void *udata, const H5C_cache_entry_t *entry /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -786,7 +786,7 @@ H5C__trace_write_destroy_fd_log_msg(void *udata, const H5C_cache_entry_t *parent /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -820,7 +820,7 @@ H5C__trace_write_unprotect_entry_log_msg(void *udata, haddr_t address, int type_ /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -867,7 +867,7 @@ H5C__trace_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -901,7 +901,7 @@ H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache_entry_t *entr /* Write the log message to the file */ if (H5C__trace_write_log_message(trace_udata) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message") + HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "unable to emit log message"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 3d8afe6..a7de3c8 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -208,7 +208,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha /* Create skip list of entries for collective write */ if (NULL == (cache_ptr->coll_write_list = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list for entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create skip list for entries"); } /* end if */ n = num_candidates / (unsigned)mpi_size; @@ -216,7 +216,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha if (NULL == (candidate_assignment_table = (unsigned *)H5MM_malloc(sizeof(unsigned) * (size_t)(mpi_size + 1)))) - HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed for candidate assignment table") + HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed for candidate assignment table"); candidate_assignment_table[0] = 0; candidate_assignment_table[mpi_size] = num_candidates; @@ -279,9 +279,9 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha #ifdef H5C_DO_SANITY_CHECKS if (u > 0) { if (last_addr == addr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "duplicate entry in cleaned list") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "duplicate entry in cleaned list"); else if (last_addr > addr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "candidate list not sorted") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "candidate list not sorted"); } /* end if */ last_addr = addr; @@ -289,15 +289,15 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL); if (entry_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "listed candidate entry not in cache?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "listed candidate entry not in cache?!?!?"); if (!entry_ptr->is_dirty) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?"); if (entry_ptr->is_protected) /* For now at least, we can't deal with protected entries. * If we encounter one, scream and die. If it becomes an * issue, we should be able to work around this. */ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry is protected?!?!?"); /* Sanity checks */ assert(entry_ptr->ring >= H5C_RING_USER); @@ -365,7 +365,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha * noticeably poorer hit ratio as a result. */ if (H5C__flush_candidate_entries(f, entries_to_flush, entries_to_clear) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush candidates failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush candidates failed"); /* If we've deferred writing to do it collectively, take care of that now */ if (f->shared->coll_md_write) { @@ -374,7 +374,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha /* Write collective list */ if (H5C__collective_write(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "can't write metadata collectively") + HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "can't write metadata collectively"); } /* end if */ done: @@ -452,7 +452,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr) nominated_addr = entry_ptr->addr; if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed"); nominated_entries_size += entry_ptr->size; nominated_entries_count++; @@ -478,7 +478,7 @@ H5C_construct_candidate_list__clean_cache(H5C_t *cache_ptr) nominated_addr = entry_ptr->addr; if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed"); nominated_entries_size += entry_ptr->size; nominated_entries_count++; @@ -563,7 +563,7 @@ H5C_construct_candidate_list__min_clean(H5C_t *cache_ptr) nominated_addr = entry_ptr->addr; if (H5AC_add_candidate((H5AC_t *)cache_ptr, nominated_addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_add_candidate() failed"); nominated_entries_size += entry_ptr->size; nominated_entries_count++; @@ -641,7 +641,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ for (u = 0; u < ce_array_len; u++) { @@ -652,15 +652,15 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr last_addr = addr; else { if (last_addr == addr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Duplicate entry in cleaned list"); if (last_addr > addr) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cleaned list not sorted") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cleaned list not sorted"); } /* end else */ #ifdef H5C_DO_EXTREME_SANITY_CHECKS if (H5C__validate_protected_entry_list(cache_ptr) < 0 || H5C__validate_pinned_entry_list(cache_ptr) < 0 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed in for loop") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed in for loop"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ #endif /* H5C_DO_SANITY_CHECKS */ @@ -672,13 +672,13 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr #ifdef H5C_DO_SANITY_CHECKS 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?!?!?") + 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 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?!?!?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?"); } /* end else-if */ else { /* Mark the entry to be cleared on unprotect. We will @@ -738,7 +738,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr if (H5C__flush_single_entry(f, clear_ptr, (H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__GENERATE_IMAGE_FLAG | H5C__UPDATE_PAGE_BUFFER_FLAG)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry"); } /* end if */ else entry_ptr = entry_ptr->prev; @@ -769,7 +769,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr if (H5C__flush_single_entry(f, clear_ptr, (H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__GENERATE_IMAGE_FLAG | H5C__UPDATE_PAGE_BUFFER_FLAG)) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't clear entry"); } /* end if */ else entry_ptr = entry_ptr->next; @@ -884,11 +884,11 @@ H5C__collective_write(H5F_t *f) /* Get original transfer mode */ if (H5CX_get_io_xfer_mode(&orig_xfer_mode) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Set transfer mode */ if (H5CX_set_io_xfer_mode(H5FD_MPIO_COLLECTIVE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O transfer mode") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O transfer mode"); /* Get number of entries in collective write list */ count = H5SL_count(cache_ptr->coll_write_list); @@ -901,19 +901,19 @@ H5C__collective_write(H5F_t *f) int i; if (NULL == (addrs = H5MM_malloc(count * sizeof(*addrs)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate address array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate address array"); if (NULL == (sizes = H5MM_malloc(count * sizeof(*sizes)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate sizes array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate sizes array"); if (NULL == (bufs = H5MM_malloc(count * sizeof(*bufs)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate buffers array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate buffers array"); if (NULL == (types = H5MM_malloc(count * sizeof(*types)))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate types array") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "couldn't allocate types array"); /* Fill arrays */ node = H5SL_first(cache_ptr->coll_write_list); 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") + HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item"); /* Set up initial array position & buffer base address */ assert(entry_ptr->type); @@ -931,7 +931,7 @@ H5C__collective_write(H5F_t *f) i = 1; while (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") + HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't retrieve skip list item"); /* Set up array position */ assert(entry_ptr->type); @@ -952,11 +952,11 @@ H5C__collective_write(H5F_t *f) /* Pass buf type, file type to the file driver */ if (H5CX_set_mpi_coll_datatypes(MPI_BYTE, MPI_BYTE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O properties") + HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O properties"); /* Make vector write call */ if (H5F_shared_vector_write(H5F_SHARED(f), count32, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "unable to write entries") + HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "unable to write entries"); done: H5MM_xfree(types); @@ -1062,7 +1062,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[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 || H5C__validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ cache_ptr->flush_in_progress = TRUE; @@ -1073,7 +1073,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES ring = H5C_RING_USER; while (ring < H5C_RING_NTYPES) { if (H5C__flush_candidates_in_ring(f, ring, entries_to_flush[ring], entries_to_clear[ring]) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush candidates in ring failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush candidates in ring failed"); ring++; } /* end while */ @@ -1150,7 +1150,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu #ifdef H5C_DO_EXTREME_SANITY_CHECKS if ((H5C__validate_protected_entry_list(cache_ptr) < 0) || (H5C__validate_pinned_entry_list(cache_ptr) < 0) || (H5C__validate_lru_list(cache_ptr) < 0)) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ #ifdef H5C_DO_SANITY_CHECKS @@ -1244,7 +1244,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu cache_ptr->last_entry_removed_ptr = NULL; if (H5C__flush_single_entry(f, op_ptr, op_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry"); if (cache_ptr->entries_removed_counter != 0 || cache_ptr->last_entry_removed_ptr != NULL) restart_scan = TRUE; @@ -1376,7 +1376,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu * write, if the list exists. */ if (H5C__flush_single_entry(f, op_ptr, op_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush entry"); if (cache_ptr->entries_removed_counter != 0 || cache_ptr->last_entry_removed_ptr != NULL) restart_scan = TRUE; @@ -1444,7 +1444,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu entry_ptr = entry_ptr->il_next; } /* end while */ - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush/clear all entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush/clear all entries"); } /* end if */ done: diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index fbde8a8..027cba9 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -83,7 +83,7 @@ do { if ((head_ptr) == NULL || (tail_ptr) == NULL || ) \ ) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre remove SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre remove SC failed"); \ } } while (0) #define H5C__GEN_DLL_PRE_INSERT_SC(entry_ptr, list_next, list_prev, head_ptr, tail_ptr, len, list_size, fail_val) \ @@ -101,7 +101,7 @@ if ((entry_ptr) == NULL || (entry_ptr)->list_next != NULL || (entry_ptr)->list_p (tail_ptr) == NULL || (tail_ptr)->list_next != NULL) \ ) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre insert SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre insert SC failed"); \ } #define H5C__GEN_DLL_PRE_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size, fail_val) \ @@ -109,12 +109,12 @@ if ((dll_len) <= 0 || (dll_size) <= 0 || (old_size) <= 0 || \ (old_size) > (dll_size) || (new_size) <= 0 || \ ((dll_len) == 1 && (old_size) != (dll_size)) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre size update SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL pre size update SC failed"); \ } #define H5C__GEN_DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size, fail_val) \ if ((new_size) > (dll_size) || ((dll_len) == 1 && (new_size) != (dll_size))) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL post size update SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "DLL post size update SC failed"); \ } #else /* H5C_DO_SANITY_CHECKS */ #define H5C__GEN_DLL_PRE_REMOVE_SC(entry_ptr, list_next, list_prev, head_ptr, tail_ptr, len, list_size, fail_val) @@ -616,7 +616,7 @@ if ((cache_ptr) == NULL || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "pre HT insert SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "pre HT insert SC failed"); \ } #define H5C__POST_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \ @@ -634,7 +634,7 @@ if ((cache_ptr) == NULL || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "post HT insert SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, "post HT insert SC failed"); \ } #define H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr, fail_val) \ @@ -666,7 +666,7 @@ if ( (cache_ptr) == NULL || (cache_ptr)->index_len < 1 || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT remove SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT remove SC failed"); \ } #define H5C__POST_HT_REMOVE_SC(cache_ptr, entry_ptr, fail_val) \ @@ -687,22 +687,22 @@ if ((cache_ptr) == NULL || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT remove SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT remove SC failed"); \ } #define H5C__PRE_HT_SEARCH_SC(cache_ptr, entry_addr, fail_val) \ if (H5C__PRE_HT_SEARCH_SC_CMP(cache_ptr, entry_addr)) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT search SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT search SC failed"); \ } #define H5C__POST_SUC_HT_SEARCH_SC(cache_ptr, entry_ptr, k, fail_val) \ if(H5C__POST_SUC_HT_SEARCH_SC_CMP(cache_ptr, entry_ptr, k)) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post successful HT search SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post successful HT search SC failed"); \ } #define H5C__POST_HT_SHIFT_TO_FRONT_SC(cache_ptr, entry_ptr, k, fail_val) \ if(H5C__POST_HT_SHIFT_TO_FRONT_SC_CMP(cache_ptr, entry_ptr, k)) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT shift to front SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT shift to front SC failed"); \ } #define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ @@ -729,7 +729,7 @@ if ((cache_ptr) == NULL || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT entry size change SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT entry size change SC failed"); \ } #define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ @@ -753,7 +753,7 @@ if ((cache_ptr) == NULL || \ (cache_ptr)->index_len != (cache_ptr)->il_len || \ (cache_ptr)->index_size != (cache_ptr)->il_size \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT entry size change SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT entry size change SC failed"); \ } #define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr, fail_val) \ @@ -773,7 +773,7 @@ if ((cache_ptr) == NULL || (cache_ptr)->index_len <= 0 || \ ((cache_ptr)->clean_index_ring_size[(entry_ptr)->ring] + \ (cache_ptr)->dirty_index_ring_size[(entry_ptr)->ring]) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT update for entry clean SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT update for entry clean SC failed"); \ } #define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr, fail_val) \ @@ -793,7 +793,7 @@ if ((cache_ptr) == NULL || (cache_ptr)->index_len <= 0 || \ ((cache_ptr)->clean_index_ring_size[(entry_ptr)->ring] + \ (cache_ptr)->dirty_index_ring_size[(entry_ptr)->ring]) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT update for entry dirty SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "pre HT update for entry dirty SC failed"); \ } #define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr, fail_val) \ @@ -806,7 +806,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir ((cache_ptr)->clean_index_ring_size[(entry_ptr)->ring] + \ (cache_ptr)->dirty_index_ring_size[(entry_ptr)->ring]) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT update for entry clean SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT update for entry clean SC failed"); \ } #define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr, fail_val) \ @@ -819,7 +819,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir ((cache_ptr)->clean_index_ring_size[(entry_ptr)->ring] + \ (cache_ptr)->dirty_index_ring_size[(entry_ptr)->ring]) \ ) { \ - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT update for entry dirty SC failed") \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, (fail_val), "post HT update for entry dirty SC failed"); \ } #else /* H5C_DO_SANITY_CHECKS */ @@ -1065,7 +1065,7 @@ do { \ assert((cache_ptr)->slist_ptr); \ \ if(H5SL_insert((cache_ptr)->slist_ptr, entry_ptr, &((entry_ptr)->addr)) < 0) \ - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), "can't insert entry in skip list") \ + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), "can't insert entry in skip list"); \ \ (entry_ptr)->in_slist = TRUE; \ (cache_ptr)->slist_changed = TRUE; \ @@ -1114,7 +1114,7 @@ do { 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_val), "can't delete entry from skip list") \ + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, (fail_val), "can't delete entry from skip list"); \ \ assert((cache_ptr)->slist_len > 0); \ if(!(during_flush)) \ diff --git a/src/H5Cprefetched.c b/src/H5Cprefetched.c index b9d25aed..1e90b7c 100644 --- a/src/H5Cprefetched.c +++ b/src/H5Cprefetched.c @@ -243,7 +243,7 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing) /* Destroy flush dependency with flush dependency parent */ if (H5C_destroy_flush_dependency(parent_ptr, entry_ptr) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, - "unable to destroy prefetched entry flush dependency") + "unable to destroy prefetched entry flush dependency"); if (parent_ptr->prefetched) { /* In prefetched entries, the fd_child_count field is @@ -258,7 +258,7 @@ H5C__prefetched_entry_notify(H5C_notify_action_t action, void *_thing) break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); break; } /* end switch */ @@ -299,7 +299,7 @@ H5C__prefetched_entry_free_icr(void *_thing) 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?") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "prefetched entry image buffer still attached?"); entry_ptr = H5FL_FREE(H5C_cache_entry_t, entry_ptr); diff --git a/src/H5Cquery.c b/src/H5Cquery.c index 952ee12..73e46d1 100644 --- a/src/H5Cquery.c +++ b/src/H5Cquery.c @@ -78,9 +78,9 @@ H5C_get_cache_auto_resize_config(const H5C_t *cache_ptr, H5C_auto_size_ctl_t *co FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad config_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad config_ptr on entry."); *config_ptr = cache_ptr->resize_ctl; @@ -113,7 +113,7 @@ H5C_get_cache_size(const H5C_t *cache_ptr, size_t *max_size_ptr, size_t *min_cle FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); if (max_size_ptr != NULL) *max_size_ptr = cache_ptr->max_cache_size; @@ -149,7 +149,7 @@ H5C_get_cache_flush_in_progress(const H5C_t *cache_ptr, hbool_t *flush_in_progre FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); if (flush_in_progress_ptr != NULL) *flush_in_progress_ptr = cache_ptr->flush_in_progress; @@ -179,9 +179,9 @@ H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr) FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); if (hit_rate_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad hit_rate_ptr on entry."); assert(cache_ptr->cache_hits >= 0); assert(cache_ptr->cache_accesses >= cache_ptr->cache_hits); @@ -234,7 +234,7 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in assert(in_cache_ptr != NULL); if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL); @@ -286,10 +286,10 @@ H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry."); if (evictions_enabled_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad evictions_enabled_ptr on entry.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad evictions_enabled_ptr on entry."); *evictions_enabled_ptr = cache_ptr->evictions_enabled; @@ -351,7 +351,7 @@ H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring) /* Locate the entry at the address */ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL); if (entry_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't find entry in index") + HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't find entry in index"); /* Return the ring value */ *ring = entry_ptr->ring; @@ -377,7 +377,7 @@ H5C_get_mdc_image_info(const H5C_t *cache_ptr, haddr_t *image_addr, hsize_t *ima FUNC_ENTER_NOAPI(FAIL) if (cache_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry"); if (image_addr) *image_addr = cache_ptr->image_addr; diff --git a/src/H5Ctag.c b/src/H5Ctag.c index a13c121..082b57e 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -215,7 +215,7 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry) else { /* Perform some sanity checks to ensure that a correct tag is being applied */ if (H5C_verify_tag(entry->type->id, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "tag verification failed") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "tag verification failed"); } #endif @@ -226,7 +226,7 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry) if (NULL == tag_info) { /* Allocate new tag info struct */ if (NULL == (tag_info = H5FL_CALLOC(H5C_tag_info_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "can't allocate tag info for cache entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "can't allocate tag info for cache entry"); /* Set the tag for all entries */ tag_info->tag = tag; @@ -349,7 +349,7 @@ H5C__iter_tagged_entries_real(H5C_t *cache, haddr_t tag, H5C_tag_iter_cb_t cb, v /* Make callback for entry */ if ((cb)(entry, cb_ctx) != H5_ITER_CONT) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "tagged entry iteration callback failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "tagged entry iteration callback failed"); /* Advance to next entry */ entry = next_entry; @@ -382,17 +382,17 @@ H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global, H5C_ta /* Iterate over the entries for this tag */ if (H5C__iter_tagged_entries_real(cache, tag, cb, cb_ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed"); /* Check for iterating over global metadata */ if (match_global) { /* Iterate over the entries for SOHM entries */ if (H5C__iter_tagged_entries_real(cache, H5AC__SOHM_TAG, cb, cb_ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed"); /* Iterate over the entries for global heap entries */ if (H5C__iter_tagged_entries_real(cache, H5AC__GLOBALHEAP_TAG, cb, cb_ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed"); } /* end if */ done: @@ -423,9 +423,9 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx) /* Attempt to evict entry */ if (entry->is_protected) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Cannot evict protected entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Cannot evict protected entry"); else if (entry->is_dirty) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Cannot evict dirty entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Cannot evict dirty entry"); else if (entry->is_pinned) /* Can't evict at this time, but let's note that we hit a pinned entry and we'll loop back around again (as evicting other @@ -436,7 +436,7 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx) if (H5C__flush_single_entry(ctx->f, entry, H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed."); ctx->evicted_entries_last_pass = TRUE; } else @@ -483,7 +483,7 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global) /* Iterate through entries in the cache */ if (H5C__iter_tagged_entries(cache, tag, match_global, H5C__evict_tagged_entries_cb, &ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed"); /* Keep doing this until we have stopped evicted entries */ } while (TRUE == ctx.evicted_entries_last_pass); @@ -514,7 +514,7 @@ H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global) * ctx.skipped_pf_dirty_entries is TRUE. */ if ((!ctx.skipped_pf_dirty_entries) && (ctx.pinned_entries_need_evicted)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Pinned entries still need evicted?!") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Pinned entries still need evicted?!"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -571,7 +571,7 @@ H5C__mark_tagged_entries(H5C_t *cache, haddr_t tag) * well as any major global entries which should always be flushed * when flushing based on tag value */ if (H5C__iter_tagged_entries(cache, tag, TRUE, H5C__mark_tagged_entries_cb, NULL) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -598,18 +598,18 @@ H5C__flush_marked_entries(H5F_t *f) /* Enable the slist, as it is needed in the flush */ if (H5C_set_slist_enabled(f->shared->cache, TRUE, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist enabled failed"); /* Flush all marked entries */ if (H5C_flush_cache(f, H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush cache"); /* Disable the slist. Set the clear_slist parameter to TRUE * since we called H5C_flush_cache() with the * H5C__FLUSH_MARKED_ENTRIES_FLAG. */ if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "disable slist failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -637,10 +637,10 @@ H5C_verify_tag(int id, haddr_t tag) * types require certain tag values, so check that these * constraints are met. */ if (tag == H5AC__IGNORE_TAG) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "cannot ignore a tag while doing verification.") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "cannot ignore a tag while doing verification."); else if (tag == H5AC__INVALID_TAG) { if (id != H5AC_PROXY_ENTRY_ID) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "no metadata tag provided") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "no metadata tag provided"); } /* end else-if */ else { /* Perform some sanity checks on tag value. Certain entry @@ -650,32 +650,32 @@ H5C_verify_tag(int id, haddr_t tag) /* Superblock */ if ((id == H5AC_SUPERBLOCK_ID) || (id == H5AC_DRVRINFO_ID)) { if (tag != H5AC__SUPERBLOCK_TAG) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "superblock not tagged with H5AC__SUPERBLOCK_TAG") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "superblock not tagged with H5AC__SUPERBLOCK_TAG"); } /* end if */ else { if (tag == H5AC__SUPERBLOCK_TAG) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, - "H5AC__SUPERBLOCK_TAG applied to non-superblock entry") + "H5AC__SUPERBLOCK_TAG applied to non-superblock entry"); } /* end else */ /* Free Space Manager */ if (tag == H5AC__FREESPACE_TAG && ((id != H5AC_FSPACE_HDR_ID) && (id != H5AC_FSPACE_SINFO_ID))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "H5AC__FREESPACE_TAG applied to non-freespace entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "H5AC__FREESPACE_TAG applied to non-freespace entry"); /* SOHM */ if ((id == H5AC_SOHM_TABLE_ID) || (id == H5AC_SOHM_LIST_ID)) if (tag != H5AC__SOHM_TAG) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "sohm entry not tagged with H5AC__SOHM_TAG") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "sohm entry not tagged with H5AC__SOHM_TAG"); /* Global Heap */ if (id == H5AC_GHEAP_ID) { if (tag != H5AC__GLOBALHEAP_TAG) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "global heap not tagged with H5AC__GLOBALHEAP_TAG") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "global heap not tagged with H5AC__GLOBALHEAP_TAG"); } /* end if */ else { if (tag == H5AC__GLOBALHEAP_TAG) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, - "H5AC__GLOBALHEAP_TAG applied to non-globalheap entry") + "H5AC__GLOBALHEAP_TAG applied to non-globalheap entry"); } /* end else */ } /* end else */ @@ -711,11 +711,11 @@ H5C_flush_tagged_entries(H5F_t *f, haddr_t tag) /* Mark all entries with specified tag */ if (H5C__mark_tagged_entries(cache, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't mark tagged entries"); /* Flush all marked entries */ if (H5C__flush_marked_entries(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush marked entries"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -785,7 +785,7 @@ H5C__expunge_tag_type_metadata_cb(H5C_cache_entry_t *entry, void *_ctx) /* Found one with the same tag and type id */ if (entry->type->id == ctx->type_id) if (H5C_expunge_entry(ctx->f, entry->type, entry->addr, ctx->flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, H5_ITER_ERROR, "can't expunge entry") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, H5_ITER_ERROR, "can't expunge entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -824,7 +824,7 @@ H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags /* Iterate through hash table entries, expunge those with specified tag and type id */ if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__expunge_tag_type_metadata_cb, &ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Ctest.c b/src/H5Ctest.c index 06535e8..d0e4917 100644 --- a/src/H5Ctest.c +++ b/src/H5Ctest.c @@ -96,7 +96,7 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx) /* Verify corked status for entry */ if (is_corked != ctx->status) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, H5_ITER_ERROR, "bad cork status") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, H5_ITER_ERROR, "bad cork status"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -126,12 +126,12 @@ H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status) /* Get file pointer */ if (NULL == (f = (H5F_t *)H5VL_object_verify(fid, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Convert token to address */ tag = HADDR_UNDEF; if (H5VL_native_token_to_addr(f, H5I_FILE, tag_token, &tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't get address for token") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't get address for token"); /* Get cache pointer */ cache = f->shared->cache; @@ -141,7 +141,7 @@ H5C__verify_cork_tag_test(hid_t fid, H5O_token_t tag_token, hbool_t status) /* Iterate through tagged entries in the cache */ if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__verify_cork_tag_test_cb, &ctx) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed") + HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5D.c b/src/H5D.c index cd4b1b0..2b20a91 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -102,26 +102,26 @@ H5D__create_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t spac /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, TRUE, &dapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Get link creation property list */ if (H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list"); /* Get dataset creation property list */ if (H5P_DEFAULT == dcpl_id) dcpl_id = H5P_DATASET_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, - "dcpl_id is not a dataset create property list ID") + "dcpl_id is not a dataset create property list ID"); /* Set the DCPL for the API context */ H5CX_set_dcpl(dcpl_id); @@ -132,11 +132,11 @@ H5D__create_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t spac /* Create the dataset */ if (NULL == (dset = H5VL_dataset_create(*vol_obj_ptr, &loc_params, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create dataset"); /* Get an ID for the dataset */ if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset"); done: if (H5I_INVALID_HID == ret_value) @@ -184,7 +184,7 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t /* Create the dataset synchronously */ if ((ret_value = H5D__create_api_common(loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create dataset"); done: FUNC_LEAVE_API(ret_value) @@ -220,7 +220,7 @@ H5Dcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* Create the dataset asynchronously */ if ((ret_value = H5D__create_api_common(loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create dataset"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -230,7 +230,7 @@ H5Dcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on dataset ID"); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -284,23 +284,23 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t if (H5P_DEFAULT == dcpl_id) dcpl_id = H5P_DATASET_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID"); if (H5P_DEFAULT == dapl_id) dapl_id = H5P_DATASET_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset access property list ID"); /* Set the DCPL for the API context */ H5CX_set_dcpl(dcpl_id); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&dapl_id, H5P_CLS_DACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -310,11 +310,11 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t if (NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, NULL, H5P_LINK_CREATE_DEFAULT, type_id, space_id, dcpl_id, dapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset"); /* Get an ID for the dataset */ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset"); done: /* Cleanup on failure */ @@ -350,22 +350,22 @@ H5D__open_api_common(hid_t loc_id, const char *name, hid_t dapl_id, void **token /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_DACC, FALSE, &dapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open the dataset */ if (NULL == (dset = H5VL_dataset_open(*vol_obj_ptr, &loc_params, name, dapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset"); /* Register an atom for the dataset */ if ((ret_value = H5VL_register(H5I_DATASET, dset, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID"); done: if (H5I_INVALID_HID == ret_value) @@ -400,7 +400,7 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id) /* Open the dataset synchronously */ if ((ret_value = H5D__open_api_common(loc_id, name, dapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open dataset"); done: FUNC_LEAVE_API(ret_value) @@ -434,7 +434,7 @@ H5Dopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the dataset asynchronously */ if ((ret_value = H5D__open_api_common(loc_id, name, dapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open dataset"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -444,7 +444,7 @@ H5Dopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on dataset ID"); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -472,13 +472,13 @@ H5Dclose(hid_t dset_id) /* Check args */ if (H5I_DATASET != H5I_get_type(dset_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset ID"); /* Decrement the counter on the dataset. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref_always_close(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID"); done: FUNC_LEAVE_API(ret_value) @@ -507,11 +507,11 @@ H5Dclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check args */ if (H5I_DATASET != H5I_get_type(dset_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset ID"); /* Get dataset object's connector */ if (NULL == (vol_obj = H5VL_vol_object(dset_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VOL object for dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VOL object for dataset"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { @@ -528,7 +528,7 @@ H5Dclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * reaches zero. */ if (H5I_dec_app_ref_always_close_async(dset_id, token_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -536,7 +536,7 @@ H5Dclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, dset_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -568,7 +568,7 @@ H5D__get_space_api_common(hid_t dset_id, void **token_ptr, H5VL_object_t **_vol_ /* Check args */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_SPACE; @@ -576,7 +576,7 @@ H5D__get_space_api_common(hid_t dset_id, void **token_ptr, H5VL_object_t **_vol_ /* Get the dataspace */ if (H5VL_dataset_get(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace"); /* Set return value */ ret_value = vol_cb_args.args.get_space.space_id; @@ -608,7 +608,7 @@ H5Dget_space(hid_t dset_id) /* Get the dataset's dataspace synchronously */ if ((ret_value = H5D__get_space_api_common(dset_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to synchronously get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to synchronously get dataspace"); done: FUNC_LEAVE_API(ret_value) @@ -644,7 +644,7 @@ H5Dget_space_async(const char *app_file, const char *app_func, unsigned app_line /* Get the dataset's dataspace asynchronously */ if ((ret_value = H5D__get_space_api_common(dset_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to asynchronously get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to asynchronously get dataspace"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -655,7 +655,7 @@ H5Dget_space_async(const char *app_file, const char *app_func, unsigned app_line if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on dataspace ID"); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -683,7 +683,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation /*out*/) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_SPACE_STATUS; @@ -691,7 +691,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation /*out*/) /* Get dataspace status */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get space status") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get space status"); done: FUNC_LEAVE_API(ret_value) @@ -722,7 +722,7 @@ H5Dget_type(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_TYPE; @@ -730,7 +730,7 @@ H5Dget_type(hid_t dset_id) /* Get the datatype */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get datatype"); /* Set return value */ ret_value = vol_cb_args.args.get_type.type_id; @@ -764,7 +764,7 @@ H5Dget_create_plist(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_DCPL; @@ -772,7 +772,7 @@ H5Dget_create_plist(hid_t dset_id) /* Get the dataset creation property list */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset creation properties") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset creation properties"); /* Set return value */ ret_value = vol_cb_args.args.get_dcpl.dcpl_id; @@ -823,7 +823,7 @@ H5Dget_access_plist(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_DAPL; @@ -831,7 +831,7 @@ H5Dget_access_plist(hid_t dset_id) /* Get the dataset access property list */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset access properties") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataset access properties"); /* Set return value */ ret_value = vol_cb_args.args.get_dapl.dapl_id; @@ -868,7 +868,7 @@ H5Dget_storage_size(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid dataset identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_STORAGE_SIZE; @@ -876,7 +876,7 @@ H5Dget_storage_size(hid_t dset_id) /* Get the storage size */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "unable to get storage size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "unable to get storage size"); /* Set return value */ ret_value = storage_size; @@ -910,7 +910,7 @@ H5Dget_offset(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "invalid dataset identifier"); /* Set up VOL callback arguments */ dset_opt_args.get_offset.offset = &dset_offset; @@ -919,7 +919,7 @@ H5Dget_offset(hid_t dset_id) /* Get the offset */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get offset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get offset"); /* Set return value */ ret_value = dset_offset; @@ -955,26 +955,26 @@ H5D__read_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t m /* Check arguments */ if (count == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count must be greater than 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count must be greater than 0"); if (!dset_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dset_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dset_id array not provided"); if (!mem_type_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided"); if (!mem_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided"); if (!file_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided"); /* Allocate obj array if necessary */ if (count > 1) if (NULL == (obj = (void **)H5MM_malloc(count * sizeof(void *)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array"); /* Get vol_obj_ptr (return just the first dataset to caller if requested) */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id[0], H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID"); /* Save the connector of the first dataset. Unpack the connector and call * the "direct" read function here to avoid allocating an array of count @@ -986,26 +986,26 @@ H5D__read_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t m for (i = 1; i < count; i++) { /* Get the object */ if (NULL == (tmp_vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id[i], H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID"); obj[i] = tmp_vol_obj->data; /* Make sure the class matches */ if (tmp_vol_obj->connector->cls->value != connector->cls->value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datasets are accessed through different VOL connectors and can't be used in the " - "same I/O call") + "same I/O call"); } /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Read the data */ if (H5VL_dataset_read_direct(count, obj, connector, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, token_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data"); done: /* Free memory */ @@ -1058,7 +1058,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_i /* Read the data */ if (H5D__read_api_common(1, &dset_id, &mem_type_id, &mem_space_id, &file_space_id, dxpl_id, &buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't synchronously read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't synchronously read data"); done: FUNC_LEAVE_API(ret_value) @@ -1093,7 +1093,7 @@ H5Dread_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Read the data */ if (H5D__read_api_common(1, &dset_id, &mem_type_id, &mem_space_id, &file_space_id, dxpl_id, &buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't asynchronously read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't asynchronously read data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1101,7 +1101,7 @@ H5Dread_async(const char *app_file, const char *app_func, unsigned app_line, hid if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIuiiiiixi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1132,7 +1132,7 @@ H5Dread_multi(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t mem_spac /* Read the data */ if (H5D__read_api_common(count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't synchronously read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't synchronously read data"); done: FUNC_LEAVE_API(ret_value) @@ -1169,7 +1169,7 @@ H5Dread_multi_async(const char *app_file, const char *app_func, unsigned app_lin /* Read the data */ if (H5D__read_api_common(count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't asynchronously read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't asynchronously read data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1177,7 +1177,7 @@ H5Dread_multi_async(const char *app_file, const char *app_func, unsigned app_lin if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE11(__func__, "*s*sIuz*i*i*i*iixi", app_file, app_func, app_line, count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1205,19 +1205,19 @@ H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fil /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL"); if (!offset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL"); if (!filters) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filters cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filters cannot be NULL"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID"); /* Set up VOL callback arguments */ dset_opt_args.chunk_read.offset = offset; @@ -1228,7 +1228,7 @@ H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fil /* Read the raw chunk */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, dxpl_id, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data"); /* Set return value */ *filters = dset_opt_args.chunk_read.filters; @@ -1264,26 +1264,26 @@ H5D__write_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t /* Check arguments */ if (count == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count must be greater than 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count must be greater than 0"); if (!dset_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dset_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dset_id array not provided"); if (!mem_type_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided"); if (!mem_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided"); if (!file_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided"); /* Allocate obj array if necessary */ if (count > 1) if (NULL == (obj = (void **)H5MM_malloc(count * sizeof(void *)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array"); /* Get vol_obj_ptr (return just the first dataset to caller if requested) */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id[0], H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID"); /* Save the connector of the first dataset. Unpack the connector and call * the "direct" write function here to avoid allocating an array of count @@ -1295,26 +1295,26 @@ H5D__write_api_common(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t for (i = 1; i < count; i++) { /* Get the object */ if (NULL == (tmp_vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id[i], H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id is not a dataset ID"); obj[i] = tmp_vol_obj->data; /* Make sure the class matches */ if (tmp_vol_obj->connector->cls->value != connector->cls->value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datasets are accessed through different VOL connectors and can't be used in the " - "same I/O call") + "same I/O call"); } /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Write the data */ if (H5VL_dataset_write_direct(count, obj, connector, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, token_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data"); done: /* Free memory */ @@ -1368,7 +1368,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_ /* Write the data */ if (H5D__write_api_common(1, &dset_id, &mem_type_id, &mem_space_id, &file_space_id, dxpl_id, &buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't synchronously write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't synchronously write data"); done: FUNC_LEAVE_API(ret_value) @@ -1404,7 +1404,7 @@ H5Dwrite_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Write the data */ if (H5D__write_api_common(1, &dset_id, &mem_type_id, &mem_space_id, &file_space_id, dxpl_id, &buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't asynchronously write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't asynchronously write data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1412,7 +1412,7 @@ H5Dwrite_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIuiiiii*xi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1443,7 +1443,7 @@ H5Dwrite_multi(size_t count, hid_t dset_id[], hid_t mem_type_id[], hid_t mem_spa /* Write the data */ if (H5D__write_api_common(count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't synchronously write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't synchronously write data"); done: FUNC_LEAVE_API(ret_value) @@ -1480,7 +1480,7 @@ H5Dwrite_multi_async(const char *app_file, const char *app_func, unsigned app_li /* Write the data */ if (H5D__write_api_common(count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't asynchronously write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't asynchronously write data"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1488,7 +1488,7 @@ H5Dwrite_multi_async(const char *app_file, const char *app_func, unsigned app_li if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE11(__func__, "*s*sIuz*i*i*i*ii**xi", app_file, app_func, app_line, count, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1518,24 +1518,24 @@ H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *of /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset ID"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf cannot be NULL"); if (!offset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset cannot be NULL"); if (0 == data_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "data_size cannot be zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "data_size cannot be zero"); /* Make sure data size is less than 4 GiB */ data_size_32 = (uint32_t)data_size; if (data_size != (size_t)data_size_32) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid data_size - chunks cannot be > 4 GiB") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid data_size - chunks cannot be > 4 GiB"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID"); /* Set up VOL callback arguments */ dset_opt_args.chunk_write.offset = offset; @@ -1547,7 +1547,7 @@ H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *of /* Write chunk */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, dxpl_id, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data"); done: FUNC_LEAVE_API(ret_value) @@ -1585,53 +1585,53 @@ H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_ /* Check args */ if (op == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid callback function pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid callback function pointer"); if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == (dst_space = (H5S_t *)H5I_object_verify(dst_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (dst_buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided"); /* Get datatype element size */ if (0 == (type_size = H5T_GET_SIZE(type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size"); /* Get number of elements in dataspace */ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(dst_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection"); /* Allocate the selection iterator */ if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Initialize selection iterator */ if (H5S_select_iter_init(iter, dst_space, type_size, 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information"); iter_init = TRUE; /* Loop until all data has been scattered */ while (nelmts > 0) { /* Make callback to retrieve data */ if (op(&src_buf, &src_buf_nbytes, op_data) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure") + HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure"); /* Calculate number of elements */ nelmts_scatter = src_buf_nbytes / type_size; /* Check callback results */ if (!src_buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback did not return a buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback did not return a buffer"); if (src_buf_nbytes == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned a buffer size of 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned a buffer size of 0"); if (src_buf_nbytes % type_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size is not a multiple of datatype size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size is not a multiple of datatype size"); if (nelmts_scatter > (size_t)nelmts) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned more elements than in selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback returned more elements than in selection"); /* Scatter data */ if (H5D__scatter_mem(src_buf, iter, nelmts_scatter, dst_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "scatter failed"); nelmts -= (hssize_t)nelmts_scatter; } /* end while */ @@ -1678,42 +1678,42 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf /* Check args */ if (NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (src_buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source buffer provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source buffer provided"); if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (dst_buf_size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer size is 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer size is 0"); if (dst_buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination buffer provided"); /* Get datatype element size */ if (0 == (type_size = H5T_GET_SIZE(type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype size"); /* Get number of elements in dst_buf_size */ dst_buf_nelmts = dst_buf_size / type_size; if (dst_buf_nelmts == 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "destination buffer is not large enough to hold one element") + "destination buffer is not large enough to hold one element"); /* Get number of elements in dataspace */ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(src_space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "unable to get number of elements in selection"); /* If dst_buf is not large enough to hold all the elements, make sure there * is a callback */ if (((size_t)nelmts > dst_buf_nelmts) && (op == NULL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback supplied and destination buffer too small") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback supplied and destination buffer too small"); /* Allocate the selection iterator */ if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Initialize selection iterator */ if (H5S_select_iter_init(iter, src_space, type_size, 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize selection iterator information"); iter_init = TRUE; /* Loop until all data has been scattered */ @@ -1721,12 +1721,12 @@ H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf /* Gather data */ 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "gather failed"); 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") + HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, FAIL, "callback operator returned failure"); nelmts -= (hssize_t)nelmts_gathered; assert(op || (nelmts == 0)); @@ -1778,17 +1778,17 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_ /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataspace"); if (NULL == (fill_type = (H5T_t *)H5I_object_verify(fill_type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); if (NULL == (buf_type = (H5T_t *)H5I_object_verify(buf_type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); /* Fill the selection in the memory buffer */ if (H5D__fill(fill, fill_type, buf, buf_type, space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed"); done: FUNC_LEAVE_API(ret_value) @@ -1863,17 +1863,17 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *op /* Check args */ if (NULL == op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid operator") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid operator"); if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer"); if (H5I_DATATYPE != H5I_get_type(type_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype"); if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set"); dset_op.op_type = H5S_SEL_ITER_OP_APP; dset_op.u.app_op.op = op; @@ -1910,19 +1910,19 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *s /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(dataset_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (H5I_DATATYPE != H5I_get_type(type_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype identifier"); if (H5I_DATASPACE != H5I_get_type(space_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace identifier"); if (size == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid 'size' pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid 'size' pointer"); /* Check if the 'get_vlen_buf_size' callback is supported */ supported = 0; if (H5VL_introspect_opt_query(vol_obj, H5VL_SUBCLS_DATASET, H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE, &supported) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check for 'get vlen buf size' operation") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check for 'get vlen buf size' operation"); if (supported & H5VL_OPT_QUERY_SUPPORTED) { H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */ H5VL_native_dataset_optional_args_t dset_opt_args; /* Arguments for optional operation */ @@ -1936,12 +1936,12 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *s /* Make the 'get_vlen_buf_size' callback */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get vlen buf size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get vlen buf size"); } /* end if */ else { /* Perform a generic operation that will work with all VOL connectors */ if (H5D__vlen_get_buf_size_gen(vol_obj, type_id, space_id, size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get vlen buf size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get vlen buf size"); } /* end else */ done: @@ -1971,13 +1971,13 @@ H5D__set_extent_api_common(hid_t dset_id, const hsize_t size[], void **token_ptr /* Check args */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (!size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size array cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size array cannot be NULL"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_SET_EXTENT; @@ -1985,7 +1985,7 @@ H5D__set_extent_api_common(hid_t dset_id, const hsize_t size[], void **token_ptr /* Set the extent */ if (H5VL_dataset_specific(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set dataset extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set dataset extent"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2011,7 +2011,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[]) /* Change a datset's dimensions synchronously */ if ((ret_value = H5D__set_extent_api_common(dset_id, size, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to synchronously change a dataset's dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to synchronously change a dataset's dimensions"); done: FUNC_LEAVE_API(ret_value) @@ -2044,7 +2044,7 @@ H5Dset_extent_async(const char *app_file, const char *app_func, unsigned app_lin /* Change a datset's dimensions asynchronously */ if (H5D__set_extent_api_common(dset_id, size, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to asynchronously change a dataset's dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to asynchronously change a dataset's dimensions"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -2052,7 +2052,7 @@ H5Dset_extent_async(const char *app_file, const char *app_func, unsigned app_lin if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE6(__func__, "*s*sIui*hi", app_file, app_func, app_line, dset_id, size, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -2079,11 +2079,11 @@ H5Dflush(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_FLUSH; @@ -2094,7 +2094,7 @@ H5Dflush(hid_t dset_id) * callback needs it and that's in the public API. */ if (H5VL_dataset_specific(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset"); done: FUNC_LEAVE_API(ret_value) @@ -2121,11 +2121,11 @@ H5Drefresh(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_REFRESH; @@ -2133,7 +2133,7 @@ H5Drefresh(hid_t dset_id) /* Refresh the dataset object */ if (H5VL_dataset_specific(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to refresh dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to refresh dataset"); done: FUNC_LEAVE_API(ret_value) @@ -2165,11 +2165,11 @@ H5Dformat_convert(hid_t dset_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_DATASET_FORMAT_CONVERT; @@ -2177,7 +2177,7 @@ H5Dformat_convert(hid_t dset_id) /* Convert the dataset */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_INTERNAL, FAIL, "can't convert dataset format") + HGOTO_ERROR(H5E_DATASET, H5E_INTERNAL, FAIL, "can't convert dataset format"); done: FUNC_LEAVE_API(ret_value) @@ -2205,9 +2205,9 @@ H5Dget_chunk_index_type(hid_t dset_id, H5D_chunk_index_t *idx_type /*out*/) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier"); if (NULL == idx_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "idx_type parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "idx_type parameter cannot be NULL"); /* Set up VOL callback arguments */ dset_opt_args.get_chunk_idx_type.idx_type = idx_type; @@ -2216,7 +2216,7 @@ H5Dget_chunk_index_type(hid_t dset_id, H5D_chunk_index_t *idx_type /*out*/) /* Get the chunk indexing type */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk index type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk index type"); done: FUNC_LEAVE_API(ret_value) @@ -2247,11 +2247,11 @@ H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_n /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dset_id parameter is not a valid dataset identifier"); if (NULL == offset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset parameter cannot be NULL"); if (NULL == chunk_nbytes) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "chunk_nbytes parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "chunk_nbytes parameter cannot be NULL"); /* Set up VOL callback arguments */ dset_opt_args.get_chunk_storage_size.offset = offset; @@ -2261,7 +2261,7 @@ H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_n /* Get the dataset creation property list */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk"); done: FUNC_LEAVE_API(ret_value) @@ -2298,9 +2298,9 @@ H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks /*out*/) /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (NULL == nchunks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)"); /* Set up VOL callback arguments */ dset_opt_args.get_num_chunks.space_id = fspace_id; @@ -2310,7 +2310,7 @@ H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks /*out*/) /* Get the number of written chunks */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks"); done: FUNC_LEAVE_API(ret_value) @@ -2351,9 +2351,9 @@ H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_index, hsize_t *of /* Check arguments */ if (NULL == offset && NULL == filter_mask && NULL == addr && NULL == size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "invalid arguments, must have at least one non-null output argument") + "invalid arguments, must have at least one non-null output argument"); if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); /* Set up VOL callback arguments */ dset_opt_args.get_num_chunks.space_id = fspace_id; @@ -2363,11 +2363,11 @@ H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_index, hsize_t *of /* Get the number of written chunks to check range */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks"); /* Check range for chunk index */ if (chk_index >= nchunks) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk index is out of range") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk index is out of range"); /* Set up VOL callback arguments */ dset_opt_args.get_chunk_info_by_idx.space_id = fspace_id; @@ -2381,7 +2381,7 @@ H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_index, hsize_t *of /* Call private function to get the chunk info given the chunk's index */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by index"); done: FUNC_LEAVE_API(ret_value) @@ -2419,12 +2419,12 @@ H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *offset, unsigned *filte /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (NULL == filter_mask && NULL == addr && NULL == size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "invalid arguments, must have at least one non-null output argument") + "invalid arguments, must have at least one non-null output argument"); if (NULL == offset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument (null)"); /* Set up VOL callback arguments */ dset_opt_args.get_chunk_info_by_coord.offset = offset; @@ -2436,7 +2436,7 @@ H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *offset, unsigned *filte /* Call private function to get the chunk info given the chunk's index */ if (H5VL_dataset_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by its logical coordinates") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by its logical coordinates"); done: FUNC_LEAVE_API(ret_value) @@ -2470,15 +2470,15 @@ H5Dchunk_iter(hid_t dset_id, hid_t dxpl_id, H5D_chunk_iter_op_t op, void *op_dat /* Check arguments */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (NULL == op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid callback to chunk iteration") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid callback to chunk iteration"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dxpl_id is not a dataset transfer property list ID"); /* Set up VOL callback arguments */ dset_opt_args.chunk_iter.op = op; diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 40edc77..cb7aa1d 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -520,7 +520,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED if (cmp < 0) { /* Negative indices not supported yet */ - HGOTO_ERROR(H5E_STORAGE, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error") + HGOTO_ERROR(H5E_STORAGE, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error"); } else if (H5VM_vector_eq_u(udata->common.layout->ndims, udata->common.scaled, lt_key->scaled) && lt_key->nbytes > 0) { @@ -559,7 +559,7 @@ H5D__btree_insert(H5F_t H5_ATTR_NDEBUG_UNUSED *f, haddr_t H5_ATTR_NDEBUG_UNUSED ret_value = H5B_INS_RIGHT; } else { - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, H5B_INS_ERROR, "internal error"); } done: @@ -588,7 +588,7 @@ H5D__btree_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */, hbool_t *lt /* Remove raw data chunk from file */ H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t); if (H5MF_xfree(f, H5FD_MEM_DRAW, addr, (hsize_t)lt_key->nbytes) < 0) - HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk") + HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk"); /* Mark keys as unchanged */ *lt_key_changed = FALSE; @@ -623,18 +623,18 @@ H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key assert(layout); if (layout->ndims > H5O_LAYOUT_NDIMS) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad number of dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad number of dimensions"); UINT32DECODE(raw, key->nbytes); UINT32DECODE(raw, key->filter_mask); for (unsigned u = 0; u < layout->ndims; u++) { if (layout->dim[u] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u); /* Retrieve coordinate offset */ UINT64DECODE(raw, tmp_offset); if (0 != (tmp_offset % layout->dim[u])) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad coordinate offset") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "bad coordinate offset"); /* Convert to a scaled offset */ key->scaled[u] = tmp_offset / layout->dim[u]; @@ -735,7 +735,7 @@ H5D__btree_shared_free(void *_shared) /* Chain up to the generic B-tree shared info free routine */ if (H5B_shared_free(shared) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free shared B-tree info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free shared B-tree info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -767,17 +767,17 @@ H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, const H5O_l /* Allocate & initialize global info for the shared structure */ if (NULL == (shared = H5B_shared_new(f, H5B_BTREE, sizeof_rkey))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info"); /* Set up the "local" information for this dataset's chunks */ if (NULL == (my_layout = H5FL_MALLOC(H5O_layout_chunk_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk layout"); H5MM_memcpy(my_layout, layout, sizeof(H5O_layout_chunk_t)); shared->udata = my_layout; /* Make shared B-tree info reference counted */ if (NULL == (store->u.btree.shared = H5UC_create(shared, H5D__btree_shared_free))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info"); done: if (ret_value < 0) @@ -816,7 +816,7 @@ H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t H5_ATTR_UNUS /* Allocate the shared structure */ if (H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -859,7 +859,7 @@ H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info) /* Create the v1 B-tree for the chunk index */ if (H5B_create(idx_info->f, H5B_BTREE, &udata, &(idx_info->storage->idx_addr) /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -915,7 +915,7 @@ H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, * its size changed. */ if (H5B_insert(idx_info->f, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to allocate chunk") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to allocate chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -952,7 +952,7 @@ H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat /* Go get the chunk information from the B-tree */ found = FALSE; if (H5B_find(idx_info->f, H5B_BTREE, idx_info->storage->idx_addr, &found, udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1070,7 +1070,7 @@ H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t * chunk (in the B-tree callback). */ if (H5B_remove(idx_info->f, H5B_BTREE, idx_info->storage->idx_addr, udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to remove chunk entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1111,7 +1111,7 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Set up the shared structure */ if (H5D__btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info"); /* Set up B-tree user data */ memset(&udata, 0, sizeof udata); @@ -1120,13 +1120,13 @@ H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Delete entire B-tree */ if (H5B_delete(idx_info->f, H5B_BTREE, tmp_storage.idx_addr, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk B-tree"); /* Release the shared B-tree page */ if (NULL == tmp_storage.u.btree.shared) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "ref-counted page nil") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "ref-counted page nil"); if (H5UC_DEC(tmp_storage.u.btree.shared) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page"); } /* end if */ done: @@ -1163,14 +1163,14 @@ H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_ /* 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) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for source shared B-tree info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for source shared B-tree info"); if (H5D__btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, - "can't create wrapper for destination shared B-tree info") + "can't create wrapper for destination shared B-tree info"); /* 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") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); assert(H5_addr_defined(idx_info_dst->storage->idx_addr)); done: @@ -1198,9 +1198,9 @@ H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk /* Decrement refcount on shared B-tree info */ if (H5UC_DEC(storage_src->u.btree.shared) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page"); if (H5UC_DEC(storage_dst->u.btree.shared) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement ref-counted page"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1240,7 +1240,7 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) /* Get metadata information for B-tree */ if (H5B_get_info(idx_info->f, H5B_BTREE, idx_info->storage->idx_addr, &bt_info, NULL, &udata) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to iterate over chunk B-tree") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to iterate over chunk B-tree"); /* Set the size of the B-tree */ *index_size = bt_info.size; @@ -1319,9 +1319,9 @@ H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Free the raw B-tree node buffer */ if (NULL == idx_info->storage->u.btree.shared) - HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") + HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil"); if (H5UC_DEC(idx_info->storage->u.btree.shared) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") + HGOTO_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1361,7 +1361,7 @@ H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, un /* Allocate the shared structure */ if (H5D__btree_shared_create(f, &storage, &layout) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info"); shared_init = TRUE; /* Set up user data for callback */ diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c index ac4e7d5..7fe8397 100644 --- a/src/H5Dbtree2.c +++ b/src/H5Dbtree2.c @@ -225,7 +225,7 @@ H5D__bt2_crt_context(void *_udata) /* Allocate callback context */ if (NULL == (ctx = H5FL_MALLOC(H5D_bt2_ctx_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate callback context") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate callback context"); /* Determine the size of addresses and set the chunk size and # of dimensions for the dataset */ ctx->sizeof_addr = H5F_SIZEOF_ADDR(udata->f); @@ -234,7 +234,7 @@ H5D__bt2_crt_context(void *_udata) /* Set up the "local" information for this dataset's chunk dimension sizes */ if (NULL == (my_dim = (uint32_t *)H5FL_ARR_MALLOC(uint32_t, H5O_LAYOUT_NDIMS))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate chunk dims") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate chunk dims"); H5MM_memcpy(my_dim, udata->dim, H5O_LAYOUT_NDIMS * sizeof(uint32_t)); ctx->dim = my_dim; @@ -609,16 +609,16 @@ H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info) /* Get header */ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Retrieve the dataset's object header proxy */ if (NULL == (oh_proxy = H5O_get_proxy(oh))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy"); /* Make the v2 B-tree a child flush dependency of the dataset's object header proxy */ if (H5B2_depend(idx_info->storage->u.btree2.bt2, oh_proxy) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header proxy") + "unable to create flush dependency on object header proxy"); done: /* Release the object header from the cache */ @@ -670,13 +670,13 @@ H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info) /* Open v2 B-tree for the chunk index */ if (NULL == (idx_info->storage->u.btree2.bt2 = H5B2_open(idx_info->f, idx_info->storage->idx_addr, &u_ctx))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open v2 B-tree for tracking chunked dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open v2 B-tree for tracking chunked dataset"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__btree2_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -740,18 +740,18 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info) /* Create the v2 B-tree for the chunked dataset */ if (NULL == (idx_info->storage->u.btree2.bt2 = H5B2_create(idx_info->f, &bt2_cparam, &u_ctx))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking chunked dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking chunked dataset"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(idx_info->storage->u.btree2.bt2, &(idx_info->storage->idx_addr)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't get v2 B-tree address for tracking chunked dataset") + "can't get v2 B-tree address for tracking chunked dataset"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__btree2_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -857,11 +857,11 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, if (NULL == idx_info->storage->u.btree2.bt2) { /* Open existing v2 B-tree */ if (H5D__bt2_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); } /* end if */ else /* Patch the top level file pointer contained in bt2 if needed */ if (H5B2_patch_file(idx_info->storage->u.btree2.bt2, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer"); /* Set convenience pointer to v2 B-tree structure */ bt2 = idx_info->storage->u.btree2.bt2; @@ -882,7 +882,7 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, /* Update record for v2 B-tree (could be insert or modify) */ if (H5B2_update(bt2, &bt2_udata, H5D__bt2_mod_cb, &bt2_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTUPDATE, FAIL, "unable to update record in v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTUPDATE, FAIL, "unable to update record in v2 B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -947,11 +947,11 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) if (NULL == idx_info->storage->u.btree2.bt2) { /* Open existing v2 B-tree */ if (H5D__bt2_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); } /* end if */ else /* Patch the top level file pointer contained in bt2 if needed */ if (H5B2_patch_file(idx_info->storage->u.btree2.bt2, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer"); /* Set convenience pointer to v2 B-tree structure */ bt2 = idx_info->storage->u.btree2.bt2; @@ -972,7 +972,7 @@ H5D__bt2_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) /* Go get chunk information from v2 B-tree */ found = FALSE; if (H5B2_find(bt2, &bt2_udata, &found, H5D__bt2_found_cb, &found_rec) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "can't check for chunk in v2 B-tree"); /* Check if chunk was found */ if (found) { @@ -1065,11 +1065,11 @@ H5D__bt2_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chu if (NULL == idx_info->storage->u.btree2.bt2) { /* Open existing v2 B-tree */ if (H5D__bt2_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); } /* end if */ else /* Patch the top level file pointer contained in bt2 if needed */ if (H5B2_patch_file(idx_info->storage->u.btree2.bt2, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer"); /* Set convenience pointer to v2 B-tree structure */ bt2 = idx_info->storage->u.btree2.bt2; @@ -1114,7 +1114,7 @@ H5D__bt2_remove_cb(const void *_record, void *_udata) /* Free the space in the file for the object being removed */ H5_CHECK_OVERFLOW(record->nbytes, uint32_t, hsize_t); if (H5MF_xfree(f, H5FD_MEM_DRAW, record->chunk_addr, (hsize_t)record->nbytes) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1152,11 +1152,11 @@ H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *u if (NULL == idx_info->storage->u.btree2.bt2) { /* Open existing v2 B-tree */ if (H5D__bt2_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); } /* end if */ else /* Patch the top level file pointer contained in bt2 if needed */ if (H5B2_patch_file(idx_info->storage->u.btree2.bt2, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer"); /* Set convenience pointer to v2 B-tree structure */ bt2 = idx_info->storage->u.btree2.bt2; @@ -1173,7 +1173,7 @@ H5D__bt2_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *u if (H5B2_remove(bt2, &bt2_udata, (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) ? NULL : H5D__bt2_remove_cb, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1223,7 +1223,7 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Delete the v2 B-tree */ /*(space in the file for each object is freed in the 'remove' callback) */ if (H5B2_delete(idx_info->f, idx_info->storage->idx_addr, &u_ctx, remove_op, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree"); idx_info->storage->idx_addr = HADDR_UNDEF; } /* end if */ @@ -1266,14 +1266,14 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id /* Check if the source v2 B-tree is open yet */ if (NULL == idx_info_src->storage->u.btree2.bt2) if (H5D__bt2_idx_open(idx_info_src) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); /* Set copied metadata tag */ H5_BEGIN_TAG(H5AC__COPIED_TAG) /* 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); assert(H5_addr_defined(idx_info_dst->storage->idx_addr)); /* Reset metadata tag */ @@ -1307,12 +1307,12 @@ H5D__bt2_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chunk_t /* Close v2 B-tree for source file */ if (H5B2_close(storage_src->u.btree2.bt2) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close v2 B-tree"); storage_src->u.btree2.bt2 = NULL; /* Close v2 B-tree for destination file */ if (H5B2_close(storage_dst->u.btree2.bt2) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close v2 B-tree"); storage_dst->u.btree2.bt2 = NULL; done: @@ -1348,14 +1348,14 @@ H5D__bt2_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) /* Open v2 B-tree */ if (H5D__bt2_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree"); /* Set convenience pointer to v2 B-tree structure */ bt2_cdset = idx_info->storage->u.btree2.bt2; /* Get v2 B-tree size for indexing chunked dataset */ if (H5B2_size(bt2_cdset, index_size) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve v2 B-tree storage info for chunked dataset") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve v2 B-tree storage info for chunked dataset"); done: /* Close v2 B-tree index */ @@ -1440,11 +1440,11 @@ H5D__bt2_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Patch the top level file pointer contained in bt2 if needed */ if (H5B2_patch_file(idx_info->storage->u.btree2.bt2, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch v2 B-tree file pointer"); /* Close v2 B-tree */ if (H5B2_close(idx_info->storage->u.btree2.bt2) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree"); idx_info->storage->u.btree2.bt2 = NULL; } /* end if */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index d8ebd81..7eba50c 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -395,7 +395,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t /* Allocate dataspace and initialize it if it hasn't been. */ if (!H5D__chunk_is_space_alloc(&layout->storage)) if (H5D__alloc_storage(dset, H5D_ALLOC_WRITE, FALSE, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage"); /* Calculate the index of this chunk */ H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); @@ -403,7 +403,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t /* Find out the file address of the chunk (if any) */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Sanity check */ assert((H5_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || @@ -435,7 +435,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t * if its size has changed. */ if (H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, scaled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk"); /* Cache the new chunk information */ H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, &udata); @@ -443,7 +443,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t /* Make sure the address of the chunk is returned. */ if (!H5_addr_defined(udata.chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk address isn't defined") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk address isn't defined"); /* Evict the (old) entry from the cache if present, but do not flush * it to disk */ @@ -451,13 +451,13 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */ if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk"); } /* end if */ /* Write the data to the file */ if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, udata.chunk_block.offset, data_size, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file"); /* Insert the chunk record into the index */ if (need_insert && layout->storage.u.chunk.ops->insert) { @@ -465,7 +465,7 @@ H5D__chunk_direct_write(H5D_t *dset, uint32_t filters, hsize_t *offset, uint32_t udata.filter_mask = filters; if ((layout->storage.u.chunk.ops->insert)(&idx_info, &udata, dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index"); } /* end if */ done: @@ -502,7 +502,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo /* Allocate dataspace and initialize it if it hasn't been. */ if (!H5D__chunk_is_space_alloc(&layout->storage) && !H5D__chunk_is_data_cached(dset->shared)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "storage is not initialized") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "storage is not initialized"); /* Calculate the index of this chunk */ H5VM_chunk_scaled(dset->shared->ndims, offset, layout->u.chunk.dim, scaled); @@ -516,7 +516,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo /* Find out the file address of the chunk */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Sanity check */ assert((H5_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || @@ -535,7 +535,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo /* Flush the chunk to disk and clear the cache entry */ if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], flush) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk"); /* Reset fields about the chunk we are looking for */ udata.filter_mask = 0; @@ -545,17 +545,17 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t *filters, vo /* Get the new file address / chunk size after flushing */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); } /* Make sure the address of the chunk is returned. */ if (!H5_addr_defined(udata.chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined"); /* Read the chunk data into the supplied buffer */ if (H5F_shared_block_read(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, udata.chunk_block.offset, udata.chunk_block.length, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk"); /* Return the filter mask */ *filters = udata.filter_mask; @@ -604,7 +604,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage /* Find out the file address of the chunk */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Sanity check */ assert((H5_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || @@ -612,7 +612,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage /* The requested chunk is not in cache or on disk */ if (!H5_addr_defined(udata.chunk_block.offset) && UINT_MAX == udata.idx_hint) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk storage is not allocated") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk storage is not allocated"); /* Check if there are filters registered to the dataset */ if (dset->shared->dcpl_cache.pline.nused > 0) { @@ -628,7 +628,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage if (ent->dirty == TRUE) { /* Flush the chunk to disk and clear the cache entry */ if (H5D__chunk_cache_evict(dset, rdcc->slot[udata.idx_hint], TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk"); /* Reset fields about the chunk we are looking for */ udata.chunk_block.offset = HADDR_UNDEF; @@ -637,13 +637,13 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage /* Get the new file address / chunk size after flushing */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); } } /* Make sure the address of the chunk is returned. */ if (!H5_addr_defined(udata.chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined"); /* Return the chunk size on disk */ *storage_size = udata.chunk_block.length; @@ -677,7 +677,7 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize /* Can happen when corrupt files are parsed */ if (ndims == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "number of dimensions cannot be zero") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "number of dimensions cannot be zero"); /* Compute the # of chunks in dataset dimensions */ layout->nchunks = 1; @@ -690,7 +690,7 @@ H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims, const hsize else { /* Sanity check */ if (layout->dim[u] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimension size must be > 0, dim = %u ", u) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimension size must be > 0, dim = %u ", u); layout->max_chunks[u] = ((max_dims[u] + layout->dim[u]) - 1) / layout->dim[u]; } @@ -730,12 +730,12 @@ H5D__chunk_set_info(const H5D_t *dset) /* Set the base layout information */ if (H5D__chunk_set_info_real(&dset->shared->layout.u.chunk, dset->shared->ndims, dset->shared->curr_dims, dset->shared->max_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info"); /* Call the index's "resize" callback */ if (dset->shared->layout.storage.u.chunk.ops->resize && (dset->shared->layout.storage.u.chunk.ops->resize)(&dset->shared->layout.u.chunk) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to resize chunk index information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to resize chunk index information"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -794,7 +794,7 @@ H5D__chunk_set_sizes(H5D_t *dset) /* Check for chunk larger than can be represented in 32-bits */ /* (Chunk size is encoded in 32-bit value in v1 B-tree records) */ if (chunk_size > (uint64_t)0xffffffff) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be < 4GB") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be < 4GB"); H5_CHECKED_ASSIGN(dset->shared->layout.u.chunk.size, uint32_t, chunk_size, uint64_t); @@ -825,24 +825,24 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset) /* Check for invalid chunk dimension rank */ if (0 == dset->shared->layout.u.chunk.ndims) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "no chunk information set?") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "no chunk information set?"); if (dset->shared->layout.u.chunk.ndims != dset->shared->ndims) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimensionality of chunks doesn't match the dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dimensionality of chunks doesn't match the dataspace"); /* Set chunk sizes */ if (H5D__chunk_set_sizes(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes"); 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) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "external storage not supported with chunked layout") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "external storage not supported with chunked layout"); /* Sanity check dimensions */ for (u = 0; u < dset->shared->layout.u.chunk.ndims - 1; u++) { /* Don't allow zero-sized chunk dimensions */ if (0 == dset->shared->layout.u.chunk.dim[u]) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be > 0, dim = %u ", u) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "chunk size must be > 0, dim = %u ", u); /* * The chunk size of a dimension with a fixed size cannot exceed @@ -852,12 +852,12 @@ H5D__chunk_construct(H5F_t H5_ATTR_UNUSED *f, H5D_t *dset) if (dset->shared->curr_dims[u] && dset->shared->max_dims[u] != H5S_UNLIMITED && dset->shared->max_dims[u] < dset->shared->layout.u.chunk.dim[u]) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "chunk size must be <= maximum dimension size for fixed-sized dimensions") + "chunk size must be <= maximum dimension size for fixed-sized dimensions"); } /* end for */ /* Reset address and pointer of the array struct for the chunked storage index */ if (H5D_chunk_idx_reset(&dset->shared->layout.storage.u.chunk, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -890,21 +890,21 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id) H5D_CHUNK_STORAGE_INDEX_CHK(sc); if (NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for fapl ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for fapl ID"); /* Use the properties in dapl_id if they have been set, otherwise use the properties from the file */ if (H5P_get(dapl, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc->nslots) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache number of slots") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache number of slots"); if (rdcc->nslots == H5D_CHUNK_CACHE_NSLOTS_DEFAULT) rdcc->nslots = H5F_RDCC_NSLOTS(f); if (H5P_get(dapl, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc->nbytes_max) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache byte size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache byte size"); if (rdcc->nbytes_max == H5D_CHUNK_CACHE_NBYTES_DEFAULT) rdcc->nbytes_max = H5F_RDCC_NBYTES(f); if (H5P_get(dapl, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc->w0) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get preempt read chunks") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get preempt read chunks"); if (rdcc->w0 < 0) rdcc->w0 = H5F_RDCC_W0(f); @@ -914,7 +914,7 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id) else { rdcc->slot = H5FL_SEQ_CALLOC(H5D_rdcc_ent_ptr_t, rdcc->nslots); if (NULL == rdcc->slot) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Reset any cached chunk info for this dataset */ H5D__chunk_cinfo_cache_reset(&(rdcc->last)); @@ -929,14 +929,14 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id) /* Initial scaled dimension sizes */ if (dset->shared->layout.u.chunk.dim[u] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u); /* Round up to the next integer # of chunks, to accommodate partial chunks */ rdcc->scaled_dims[u] = (dset->shared->curr_dims[u] + dset->shared->layout.u.chunk.dim[u] - 1) / dset->shared->layout.u.chunk.dim[u]; if (!(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u]))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2"); /* Initial 'power2up' values for scaled dimensions */ rdcc->scaled_power2up[u] = scaled_power2up; @@ -954,11 +954,11 @@ H5D__chunk_init(H5F_t *f, const H5D_t *const dset, hid_t dapl_id) /* Allocate any indexing structures */ if (sc->ops->init && (sc->ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information"); /* Set the number of chunks in dataset, etc. */ if (H5D__chunk_set_info(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set # of chunks for dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set # of chunks for dataset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1036,7 +1036,7 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Allocate chunk map */ if (NULL == (dinfo->layout_io_info.chunk_map = H5FL_MALLOC(H5D_chunk_map_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk map") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk map"); fm = dinfo->layout_io_info.chunk_map; /* Get layout for dataset */ @@ -1054,7 +1054,7 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Check if the memory space is scalar & make equivalent memory space */ if ((sm_ndims = H5S_GET_EXTENT_NDIMS(dinfo->mem_space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number"); /* Set the number of dimensions for the memory dataspace */ H5_CHECKED_ASSIGN(fm->m_ndims, unsigned, sm_ndims, int); @@ -1068,7 +1068,7 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) * additions involving the offset and the hyperslab selection -QAK) */ if ((file_space_normalized = H5S_hyper_normalize_offset(dinfo->file_space, old_offset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection"); /* Decide the number of chunks in each dimension */ for (u = 0; u < f_ndims; u++) @@ -1076,13 +1076,13 @@ H5D__chunk_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) fm->chunk_dim[u] = dinfo->layout->u.chunk.dim[u]; if (H5D__chunk_io_init_selections(io_info, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file and memory chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file and memory chunk selections"); /* Check if we're performing selection I/O and save the result if it hasn't * been disabled already */ if (io_info->use_select_io != H5D_SELECTION_IO_MODE_OFF) if (H5D__chunk_may_use_select_io(io_info, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if selection I/O is possible") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if selection I/O is possible"); /* Calculate type conversion buffer size if necessary. Currently only implemented for selection I/O. */ if (io_info->use_select_io != H5D_SELECTION_IO_MODE_OFF && @@ -1161,15 +1161,15 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Make a copy of the dataspace for the dataset */ if ((dataset->shared->cache.chunk.single_space = H5S_copy(dinfo->file_space, TRUE, FALSE)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file space"); /* Resize chunk's dataspace dimensions to size of chunk */ if (H5S_set_extent_real(dataset->shared->cache.chunk.single_space, fm->chunk_dim) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust chunk dimensions") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust chunk dimensions"); /* Set the single chunk dataspace to 'all' selection */ if (H5S_select_all(dataset->shared->cache.chunk.single_space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to set all selection"); } /* end if */ fm->single_space = dataset->shared->cache.chunk.single_space; assert(fm->single_space); @@ -1177,7 +1177,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info"); fm->single_piece_info = dataset->shared->cache.chunk.single_piece_info; assert(fm->single_piece_info); @@ -1187,7 +1187,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Set up chunk mapping for single element */ if (H5D__create_piece_map_single(dinfo, io_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to create chunk selections for single element") + "unable to create chunk selections for single element"); } /* end if */ else { hbool_t sel_hyper_flag; /* Whether file selection is a hyperslab */ @@ -1195,7 +1195,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Initialize skip list for chunk selections */ if (NULL == dataset->shared->cache.chunk.sel_chunks) 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") + 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; assert(fm->dset_sel_pieces); @@ -1204,9 +1204,9 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Get type of selection on disk & in memory */ if ((fm->fsel_type = H5S_GET_SELECT_TYPE(dinfo->file_space)) < H5S_SEL_NONE) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection"); if ((fm->msel_type = H5S_GET_SELECT_TYPE(dinfo->mem_space)) < H5S_SEL_NONE) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection"); /* If the selection is NONE or POINTS, set the flag to FALSE */ if (fm->fsel_type == H5S_SEL_POINTS || fm->fsel_type == H5S_SEL_NONE) @@ -1219,14 +1219,14 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Build the file selection for each chunk */ if (H5S_SEL_ALL == fm->fsel_type) { if (H5D__create_piece_file_map_all(dinfo, io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections"); } /* end if */ else { /* Sanity check */ 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections"); } /* end else */ } /* end if */ else { @@ -1234,7 +1234,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Create temporary datatypes for selection iteration */ if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype"); /* set opdata for H5D__piece_mem_cb */ io_info_wrap.io_info = io_info; @@ -1244,7 +1244,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Spaces might not be the same shape, iterate over the file selection directly */ if (H5S_select_iterate(&bogus, file_type, dinfo->file_space, &iter_op, &io_info_wrap) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections"); /* Reset "last piece" info */ fm->last_index = (hsize_t)-1; @@ -1260,12 +1260,12 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) * information to generate the memory chunk information quickly. */ if (H5D__create_piece_mem_map_hyper(dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections"); } /* end if */ else if (sel_hyper_flag && fm->f_ndims == 1 && fm->m_ndims == 1 && H5S_SELECT_IS_REGULAR(dinfo->mem_space) && H5S_SELECT_IS_SINGLE(dinfo->mem_space)) { if (H5D__create_piece_mem_map_1d(dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections"); } /* end else-if */ else { H5S_sel_iter_op_t iter_op; /* Operator for iteration */ @@ -1273,11 +1273,11 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Make a copy of equivalent memory space */ if ((tmp_mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space"); /* De-select the mem space copy */ if (H5S_select_none(tmp_mspace) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select memory space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select memory space"); /* Save chunk template information */ fm->mchunk_tmpl = tmp_mspace; @@ -1285,13 +1285,13 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Create temporary datatypes for selection iteration */ if (!file_type) if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype"); /* Create selection iterator for memory selection */ if (0 == (elmt_size = H5T_get_size(mem_type))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid"); if (H5S_select_iter_init(&(fm->mem_iter), dinfo->mem_space, elmt_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); iter_init = TRUE; /* Selection iteration info has been initialized */ /* set opdata for H5D__piece_mem_cb */ @@ -1302,7 +1302,7 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Spaces aren't the same shape, iterate over the memory selection directly */ if (H5S_select_iterate(&bogus, file_type, dinfo->file_space, &iter_op, &io_info_wrap) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections"); } /* end else */ } /* end else */ @@ -1502,7 +1502,7 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Get coordinate for selection */ if (H5S_SELECT_BOUNDS(di->file_space, sel_start, sel_end) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Initialize the 'single piece' file & memory piece information */ piece_info = fm->single_piece_info; @@ -1512,7 +1512,7 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) for (u = 0; u < fm->f_ndims; u++) { /* 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) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", 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]; @@ -1525,11 +1525,11 @@ H5D__create_piece_map_single(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Copy selection for file's dataspace into chunk dataspace */ if (H5S_select_copy(fm->single_space, di->file_space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection"); /* Move selection back to have correct offset in chunk */ if (H5S_SELECT_ADJUST_U(fm->single_space, coords) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection"); /* Set the file dataspace for the chunk to the shared 'single' dataspace */ piece_info->fspace = fm->single_space; @@ -1600,7 +1600,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Get dataspace dimensions */ if (H5S_get_simple_extent_dims(di->file_space, file_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Set initial chunk location, partial dimensions, etc */ num_partial_dims = 0; @@ -1608,7 +1608,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) for (u = 0; u < fm->f_ndims; u++) { /* 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) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u); /* Set up start / end coordinates for first chunk */ scaled[u] = 0; @@ -1633,7 +1633,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Create "temporary" chunk for selection operations (copy file space) */ if (NULL == (tmp_fchunk = H5S_create_simple(fm->f_ndims, fm->chunk_dim, NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk"); /* Iterate through each chunk in the dataset */ while (sel_points) { @@ -1644,7 +1644,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Allocate the file & memory chunk information */ if (NULL == (new_piece_info = H5FL_MALLOC(H5D_piece_info_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate piece info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate piece info"); /* Initialize the chunk information */ @@ -1653,14 +1653,14 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Set the file chunk dataspace */ if (NULL == (new_piece_info->fspace = H5S_copy(tmp_fchunk, TRUE, FALSE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy chunk dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy chunk dataspace"); new_piece_info->fspace_shared = FALSE; /* If there are partial dimensions for this chunk, set the hyperslab for them */ if (num_partial_dims > 0) if (H5S_select_hyperslab(new_piece_info->fspace, H5S_SELECT_SET, zeros, NULL, curr_partial_clip, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk selection"); /* Set the memory chunk dataspace */ new_piece_info->mspace = NULL; @@ -1680,7 +1680,7 @@ H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_info_t *io_info) /* Insert the new chunk into the skip list */ if (H5SL_insert(fm->dset_sel_pieces, new_piece_info, &new_piece_info->index) < 0) { H5D__free_piece_info(new_piece_info, NULL, NULL); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into skip list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into skip list"); } /* end if */ /* Add piece to global piece_count*/ @@ -1807,13 +1807,13 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in /* Get bounding box for selection (to reduce the number of chunks to iterate over) */ if (H5S_SELECT_BOUNDS(dinfo->file_space, sel_start, sel_end) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Set initial chunk location & hyperslab size */ for (u = 0; u < fm->f_ndims; u++) { /* Validate this chunk dimension */ if (dinfo->layout->u.chunk.dim[u] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", u); scaled[u] = start_scaled[u] = sel_start[u] / dinfo->layout->u.chunk.dim[u]; coords[u] = start_coords[u] = scaled[u] * dinfo->layout->u.chunk.dim[u]; end[u] = (coords[u] + fm->chunk_dim[u]) - 1; @@ -1835,21 +1835,21 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in if (H5S_combine_hyperslab(dinfo->file_space, H5S_SELECT_AND, coords, NULL, fm->chunk_dim, NULL, &tmp_fchunk) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, - "unable to combine file space selection with chunk block") + "unable to combine file space selection with chunk block"); /* Resize chunk's dataspace dimensions to size of chunk */ if (H5S_set_extent_real(tmp_fchunk, fm->chunk_dim) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't adjust chunk dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't adjust chunk dimensions"); /* Move selection back to have correct offset in chunk */ if (H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't adjust chunk selection"); /* Add temporary chunk to the list of chunks */ /* Allocate the file & memory chunk information */ if (NULL == (new_piece_info = H5FL_MALLOC(H5D_piece_info_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk info"); /* Initialize the chunk information */ @@ -1882,7 +1882,7 @@ H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *dinfo, H5D_io_info_t *io_in /* Insert the new piece into the skip list */ if (H5SL_insert(fm->dset_sel_pieces, new_piece_info, &new_piece_info->index) < 0) { H5D__free_piece_info(new_piece_info, NULL, NULL); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert piece into skip list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert piece into skip list"); } /* end if */ /* Get number of elements selected in chunk */ @@ -1997,11 +1997,11 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo) else { /* Get bounding box for file selection */ if (H5S_SELECT_BOUNDS(dinfo->file_space, file_sel_start, file_sel_end) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Get bounding box for memory selection */ 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Calculate the adjustment for memory selection from file selection */ assert(fm->m_ndims == fm->f_ndims); @@ -2031,11 +2031,11 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo) /* Copy the memory dataspace */ if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space"); /* Get the chunk's selection type */ if ((chunk_sel_type = H5S_GET_SELECT_TYPE(piece_info->fspace)) < H5S_SEL_NONE) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection"); /* Set memory selection for "all" chunk selections */ if (H5S_SEL_ALL == chunk_sel_type) { @@ -2046,7 +2046,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo) /* Set to same shape as chunk */ if (H5S_select_hyperslab(piece_info->mspace, H5S_SELECT_SET, coords, NULL, fm->chunk_dim, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk memory selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk memory selection"); } /* end if */ else { /* Sanity check */ @@ -2054,7 +2054,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo) /* Copy the file chunk's selection */ if (H5S_SELECT_COPY(piece_info->mspace, piece_info->fspace, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy selection"); /* Compute the adjustment for this chunk */ for (u = 0; u < fm->f_ndims; u++) { @@ -2065,7 +2065,7 @@ H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *dinfo) /* Adjust the selection */ if (H5S_SELECT_ADJUST_S(piece_info->mspace, piece_adjust) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to adjust selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to adjust selection"); } /* end else */ /* Get the next piece node in the skip list */ @@ -2126,7 +2126,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo) 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection bound info"); /* Iterate over each chunk in the chunk list */ curr_node = H5SL_first(fm->dset_sel_pieces); @@ -2140,13 +2140,13 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo) /* Copy the memory dataspace */ if ((piece_info->mspace = H5S_copy(dinfo->mem_space, TRUE, FALSE)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space"); chunk_points = H5S_GET_SELECT_NPOINTS(piece_info->fspace); if (H5S_select_hyperslab(piece_info->mspace, H5S_SELECT_SET, mem_sel_start, NULL, &tmp_count, &chunk_points) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk memory selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk memory selection"); mem_sel_start[0] += chunk_points; @@ -2209,7 +2209,7 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, /* Allocate the file & memory chunk information */ if (NULL == (piece_info = H5FL_MALLOC(H5D_piece_info_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info"); /* Initialize the chunk information */ @@ -2219,14 +2219,14 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, /* Create a dataspace for the chunk */ if ((fspace = H5S_create_simple(fm->f_ndims, fm->chunk_dim, NULL)) == NULL) { piece_info = H5FL_FREE(H5D_piece_info_t, piece_info); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace for chunk"); } /* end if */ /* De-select the chunk space */ if (H5S_select_none(fspace) < 0) { (void)H5S_close(fspace); piece_info = H5FL_FREE(H5D_piece_info_t, piece_info); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to de-select dataspace"); } /* end if */ /* Set the file chunk dataspace */ @@ -2254,7 +2254,7 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, /* Insert the new chunk into the skip list */ if (H5SL_insert(fm->dset_sel_pieces, piece_info, &piece_info->index) < 0) { H5D__free_piece_info(piece_info, NULL, NULL); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into dataset skip list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert chunk into dataset skip list"); } /* end if */ /* Add piece to global piece_count */ @@ -2272,7 +2272,7 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, /* Add point to file selection for chunk */ if (H5S_select_elements(piece_info->fspace, H5S_SELECT_APPEND, (size_t)1, coords_in_chunk) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "unable to select element"); /* Increment the number of elemented selected in chunk */ piece_info->piece_points++; @@ -2327,13 +2327,14 @@ H5D__piece_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u */ /* Get the chunk node from the skip list */ if (NULL == (piece_info = (H5D_piece_info_t *)H5SL_search(fm->dset_sel_pieces, &chunk_index))) - HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, H5_ITER_ERROR, "can't locate piece in dataset skip list") + HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, H5_ITER_ERROR, + "can't locate piece in dataset skip list"); /* Check if the chunk already has a memory space */ if (NULL == piece_info->mspace) /* Copy the template memory chunk dataspace */ if (NULL == (piece_info->mspace = H5S_copy(fm->mchunk_tmpl, FALSE, FALSE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy file space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy file space"); /* Update the "last chunk seen" information */ fm->last_index = chunk_index; @@ -2342,21 +2343,21 @@ H5D__piece_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, u /* Get coordinates of selection iterator for memory */ if (H5S_SELECT_ITER_COORDS(&fm->mem_iter, coords_in_mem) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, H5_ITER_ERROR, "unable to get iterator coordinates") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, H5_ITER_ERROR, "unable to get iterator coordinates"); /* Add point to memory selection for chunk */ if (fm->msel_type == H5S_SEL_POINTS) { if (H5S_select_elements(piece_info->mspace, H5S_SELECT_APPEND, (size_t)1, coords_in_mem) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, H5_ITER_ERROR, "unable to select element") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, H5_ITER_ERROR, "unable to select element"); } /* end if */ else { if (H5S_hyper_add_span_element(piece_info->mspace, fm->m_ndims, coords_in_mem) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, H5_ITER_ERROR, "unable to select element") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, H5_ITER_ERROR, "unable to select element"); } /* end else */ /* Move memory selection iterator to next element in selection */ if (H5S_SELECT_ITER_NEXT(&fm->mem_iter, (size_t)1) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, H5_ITER_ERROR, "unable to move to next iterator location") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, H5_ITER_ERROR, "unable to move to next iterator location"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2391,11 +2392,11 @@ H5D__chunk_mdio_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) while (piece_node) { /* Get piece info */ if (NULL == (piece_info = (H5D_piece_info_t *)H5D_CHUNK_GET_NODE_INFO(dinfo, piece_node))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from list"); /* Get the info for the chunk in the file */ if (H5D__chunk_lookup(dinfo->dset, piece_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Save chunk file address */ piece_info->faddr = udata.chunk_block.offset; @@ -2480,7 +2481,7 @@ H5D__chunk_cacheable(const H5D_io_info_t H5_ATTR_PARALLEL_USED *io_info, H5D_dse /* Revtrieve the fill value status */ if (H5P_is_fill_value_defined(fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* If the fill value needs to be written then we will need * to use the cache to write the fill value */ @@ -2541,7 +2542,7 @@ H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *d /* Check if the page buffer is enabled */ if (H5PB_enabled(io_info->f_sh, H5FD_MEM_DRAW, &page_buf_enabled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if page buffer is enabled") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if page buffer is enabled"); if (page_buf_enabled) { /* Note that page buffer is disabled in parallel */ io_info->use_select_io = H5D_SELECTION_IO_MODE_OFF; @@ -2622,7 +2623,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Check the fill value status */ if (H5P_is_fill_value_defined(fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* If we are never to return fill values, or if we would return them * but they aren't set, set the flag to skip missing chunks. @@ -2654,13 +2655,13 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) 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, - "memory allocation failed for memory space list") + "memory allocation failed for memory space list"); if (NULL == (chunk_file_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for file space list") + "memory allocation failed for file space list"); if (NULL == (chunk_addrs = H5MM_malloc(num_chunks * sizeof(haddr_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for chunk address list") + "memory allocation failed for chunk address list"); } /* end if */ else { chunk_mem_spaces = chunk_mem_spaces_local; @@ -2683,7 +2684,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Get the info for the chunk in the file */ if (H5D__chunk_lookup(dset_info->dset, chunk_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* There should be no chunks cached */ assert(UINT_MAX == udata.idx_hint); @@ -2727,7 +2728,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) nonexistent_dset_info.mem_space = chunk_info->mspace; nonexistent_dset_info.nelmts = chunk_info->piece_points; if ((dset_info->io_ops.single_read)(&nonexistent_io_info, &nonexistent_dset_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked read failed"); } /* end if */ /* Advance to next chunk in list */ @@ -2744,7 +2745,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) if (H5F_shared_select_read(H5F_SHARED(dset_info->dset->oloc.file), H5FD_MEM_DRAW, (uint32_t)num_chunks, chunk_mem_spaces, chunk_file_spaces, chunk_addrs, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunk selection read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunk selection read failed"); /* Clean up memory */ if (chunk_mem_spaces != chunk_mem_spaces_local) { @@ -2804,7 +2805,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Get the info for the chunk in the file */ if (H5D__chunk_lookup(dset_info->dset, chunk_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Sanity check */ assert((H5_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || @@ -2822,7 +2823,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Determine if we should use the chunk cache */ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable"); if (cacheable) { /* Load the chunk into cache and lock it. */ @@ -2834,7 +2835,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Lock the chunk into the cache */ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, FALSE, FALSE))) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk"); /* Set up the storage buffer information for this chunk */ cpt_store.compact.buf = chunk; @@ -2860,12 +2861,12 @@ H5D__chunk_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) chk_io_info->dsets_info[0].mem_space = chunk_info->mspace; chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points; if ((dset_info->io_ops.single_read)(chk_io_info, &chk_io_info->dsets_info[0]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked read failed"); /* Release the cache lock on the chunk. */ if (chunk && H5D__chunk_unlock(io_info, dset_info, &udata, FALSE, chunk, src_accessed_bytes) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk"); } /* end if */ /* Advance to next chunk in list */ @@ -2972,13 +2973,13 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) 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, - "memory allocation failed for memory space list") + "memory allocation failed for memory space list"); if (NULL == (chunk_file_spaces = H5MM_malloc(num_chunks * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for file space list") + "memory allocation failed for file space list"); if (NULL == (chunk_addrs = H5MM_malloc(num_chunks * sizeof(haddr_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for chunk address list") + "memory allocation failed for chunk address list"); } /* end if */ else { chunk_mem_spaces = chunk_mem_spaces_local; @@ -3004,7 +3005,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Get the info for the chunk in the file */ if (H5D__chunk_lookup(dset_info->dset, chunk_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* There should be no chunks cached */ assert(UINT_MAX == udata.idx_hint); @@ -3018,7 +3019,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Determine if we should use the chunk cache */ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable"); if (cacheable) { /* Load the chunk into cache. But if the whole chunk is written, * simply allocate space instead of load the chunk. */ @@ -3040,7 +3041,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Lock the chunk into the cache */ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, FALSE))) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk"); /* Set up the storage buffer information for this chunk */ cpt_store.compact.buf = chunk; @@ -3050,11 +3051,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) cpt_dset_info.mem_space = chunk_info->mspace; cpt_dset_info.nelmts = chunk_info->piece_points; if ((dset_info->io_ops.single_write)(&cpt_io_info, &cpt_dset_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed"); /* Release the cache lock on the chunk */ if (H5D__chunk_unlock(io_info, dset_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk"); } /* end if */ else { /* If the chunk hasn't been allocated on disk, do so now. */ @@ -3072,11 +3073,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) if (H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, - "unable to insert/resize chunk on chunk level") + "unable to insert/resize chunk on chunk level"); /* Make sure the address of the chunk is returned. */ if (!H5_addr_defined(udata.chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined"); /* Cache the new chunk information */ H5D__chunk_cinfo_cache_update(&dset_info->dset->shared->cache.chunk.last, &udata); @@ -3086,7 +3087,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) if ((dset_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, - "unable to insert chunk addr into index") + "unable to insert chunk addr into index"); } /* end if */ /* Add chunk to list for selection I/O, if not performing multi dataset I/O */ @@ -3130,7 +3131,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) if (H5F_shared_select_write(H5F_SHARED(dset_info->dset->oloc.file), H5FD_MEM_DRAW, (uint32_t)num_chunks, chunk_mem_spaces, chunk_file_spaces, chunk_addrs, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "chunk selection write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "chunk selection write failed"); /* Clean up memory */ if (chunk_mem_spaces != chunk_mem_spaces_local) { @@ -3165,7 +3166,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Look up the chunk */ if (H5D__chunk_lookup(dset_info->dset, chunk_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Sanity check */ assert((H5_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) || @@ -3176,7 +3177,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Determine if we should use the chunk cache */ if ((cacheable = H5D__chunk_cacheable(io_info, dset_info, udata.chunk_block.offset, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable"); if (cacheable) { /* Load the chunk into cache. But if the whole chunk is written, * simply allocate space instead of load the chunk. */ @@ -3197,7 +3198,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) /* Lock the chunk into the cache */ if (NULL == (chunk = H5D__chunk_lock(io_info, dset_info, &udata, entire_chunk, FALSE))) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk"); /* Set up the storage buffer information for this chunk */ cpt_store.compact.buf = chunk; @@ -3221,11 +3222,11 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) if (H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, - "unable to insert/resize chunk on chunk level") + "unable to insert/resize chunk on chunk level"); /* Make sure the address of the chunk is returned. */ if (!H5_addr_defined(udata.chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined"); /* Cache the new chunk information */ H5D__chunk_cinfo_cache_update(&dset_info->dset->shared->cache.chunk.last, &udata); @@ -3247,19 +3248,19 @@ H5D__chunk_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info) chk_io_info->dsets_info[0].mem_space = chunk_info->mspace; chk_io_info->dsets_info[0].nelmts = chunk_info->piece_points; if ((dset_info->io_ops.single_write)(chk_io_info, &chk_io_info->dsets_info[0]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "chunked write failed"); /* Release the cache lock on the chunk, or insert chunk into index. */ if (chunk) { if (H5D__chunk_unlock(io_info, dset_info, &udata, TRUE, chunk, dst_accessed_bytes) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk"); } /* end if */ else { if (need_insert && dset_info->dset->shared->layout.storage.u.chunk.ops->insert) if ((dset_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, NULL) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, - "unable to insert chunk addr into index") + "unable to insert chunk addr into index"); } /* end else */ /* Advance to next chunk in list */ @@ -3316,7 +3317,7 @@ H5D__chunk_flush(H5D_t *dset) nerrors++; } /* end for */ if (nerrors) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3361,11 +3362,11 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di * piece if the skiplist is not available */ if (fm->dset_sel_pieces) { if (H5SL_free(fm->dset_sel_pieces, H5D__free_piece_info, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTNEXT, FAIL, "can't free dataset skip list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTNEXT, FAIL, "can't free dataset skip list"); } /* end if */ else if (fm->last_piece_info) { if (H5D__free_piece_info(fm->last_piece_info, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free piece info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free piece info"); fm->last_piece_info = NULL; } /* end if */ } /* end else */ @@ -3373,7 +3374,8 @@ H5D__chunk_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *di /* Free the memory piece dataspace template */ if (fm->mchunk_tmpl) if (H5S_close(fm->mchunk_tmpl) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "can't release memory chunk dataspace template") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, + "can't release memory chunk dataspace template"); /* Free chunk map */ di->layout_io_info.chunk_map = H5FL_FREE(H5D_chunk_map_t, di->layout_io_info.chunk_map); @@ -3432,7 +3434,7 @@ H5D__chunk_dest(H5D_t *dset) /* Free any index structures */ if (sc->ops->dest && (sc->ops->dest)(&idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -3461,7 +3463,7 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) /* Reset index structures */ if ((storage->ops->reset)(storage, reset_addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3612,7 +3614,7 @@ H5D__chunk_create(const H5D_t *dset /*in,out*/) /* Create the index for the chunks */ if ((sc->ops->create)(&idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3759,7 +3761,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat /* Go get the chunk information */ if ((sc->ops->get_addr)(&idx_info, udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address"); /* * Cache the information retrieved. @@ -3859,9 +3861,9 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function"); if (!reset) { /* @@ -3870,7 +3872,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) * for later. */ if (NULL == (buf = H5MM_malloc(alloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline"); H5MM_memcpy(buf, ent->chunk, alloc); } /* end if */ else { @@ -3887,11 +3889,11 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) H5_CHECKED_ASSIGN(nbytes, size_t, udata.chunk_block.length, hsize_t); if (H5Z_pipeline(&(dset->shared->dcpl_cache.pline), 0, &(udata.filter_mask), err_detect, filter_cb, &nbytes, &alloc, &buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "output pipeline failed"); #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length"); #endif /* H5_SIZEOF_SIZE_T > 4 */ H5_CHECKED_ASSIGN(udata.chunk_block.length, hsize_t, nbytes, size_t); @@ -3934,7 +3936,8 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) */ if (H5D__chunk_file_alloc(&idx_info, &(ent->chunk_block), &udata.chunk_block, &need_insert, ent->scaled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, + "unable to insert/resize chunk on chunk level"); /* Update the chunk entry's info, in case it was allocated or relocated */ ent->chunk_block.offset = udata.chunk_block.offset; @@ -3946,12 +3949,12 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset) 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) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file"); /* Insert the chunk record into the index */ if (need_insert && sc->ops->insert) if ((sc->ops->insert)(&idx_info, &udata, dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index"); /* Cache the chunk's info, in case it's accessed again shortly */ H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, &udata); @@ -4171,7 +4174,7 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size) } /* end while */ if (nerrors) - HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry") + HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4288,7 +4291,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds */ if (NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); H5MM_memcpy(chunk, ent->chunk, chunk_size); ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline); ent->chunk = (uint8_t *)chunk; @@ -4314,7 +4317,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds */ if (NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); H5MM_memcpy(chunk, ent->chunk, chunk_size); ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline); @@ -4394,7 +4397,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds rdcc->stats.nhits++; if (NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk"); /* In the case that some dataset functions look through this data, * clear it to all 0s. */ @@ -4416,10 +4419,10 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds if (NULL == (chunk = H5D__chunk_mem_alloc(my_chunk_alloc, (udata->new_unfilt_chunk ? old_pline : pline)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); if (H5F_shared_block_read(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, chunk_addr, my_chunk_alloc, chunk) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk"); if (old_pline && old_pline->nused) { H5Z_EDC_t err_detect; /* Error detection info */ @@ -4427,13 +4430,13 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get I/O filter callback function"); if (H5Z_pipeline(old_pline, H5Z_FLAG_REVERSE, &(udata->filter_mask), err_detect, filter_cb, &my_chunk_alloc, &buf_alloc, &chunk) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, NULL, "data pipeline read failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, NULL, "data pipeline read failed"); /* Reallocate chunk if necessary */ if (udata->new_unfilt_chunk) { @@ -4442,7 +4445,7 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds if (NULL == (chunk = H5D__chunk_mem_alloc(my_chunk_alloc, pline))) { (void)H5D__chunk_mem_xfree(tmp_chunk, old_pline); HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); } /* end if */ H5MM_memcpy(chunk, tmp_chunk, chunk_size); (void)H5D__chunk_mem_xfree(tmp_chunk, old_pline); @@ -4462,10 +4465,10 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds * size in memory, so allocate memory big enough. */ if (NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); if (H5P_is_fill_value_defined(fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined"); if (fill->fill_time == H5D_FILL_TIME_ALLOC || (fill->fill_time == H5D_FILL_TIME_IFSET && @@ -4480,14 +4483,14 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds if (H5D__fill_init(&fb_info, chunk, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)0, chunk_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't initialize fill buffer info"); fb_info_init = TRUE; /* Check for VL datatype & non-default fill value */ if (fb_info.has_vlen_fill_type) /* Fill the buffer with VL datatype fill values */ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, NULL, "can't refill fill value buffer"); } /* end if */ else memset(chunk, 0, chunk_size); @@ -4508,14 +4511,14 @@ H5D__chunk_lock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds /* Preempt enough things from the cache to make room */ if (ent) { if (H5D__chunk_cache_evict(dset, ent, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk from cache") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk from cache"); } /* end if */ if (H5D__chunk_cache_prune(dset, chunk_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache"); /* Create a new entry */ if (NULL == (ent = H5FL_CALLOC(H5D_rdcc_ent_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry"); ent->edge_chunk_state = disable_filters ? H5D_RDCC_DISABLE_FILTERS : 0; if (udata->new_unfilt_chunk) @@ -4664,7 +4667,7 @@ H5D__chunk_unlock(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ fake_ent.chunk = (uint8_t *)chunk; if (H5D__chunk_flush_entry(dset, &fake_ent, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); } /* end if */ else { if (chunk) @@ -4751,7 +4754,7 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes) for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -4762,7 +4765,7 @@ H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes) /* Iterate over the chunks */ if ((sc->ops->iterate)(&idx_info, H5D__chunk_allocated_cb, &chunk_bytes) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve allocated chunk information from index") + "unable to retrieve allocated chunk information from index"); /* Set number of bytes for caller */ *nbytes = chunk_bytes; @@ -4867,7 +4870,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old for (op_dim = 0; op_dim < space_ndims; op_dim++) { /* Validate this chunk dimension */ if (chunk_dim[op_dim] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim); min_unalloc[op_dim] = (old_dim[op_dim] + chunk_dim[op_dim] - 1) / chunk_dim[op_dim]; max_unalloc[op_dim] = (space_dim[op_dim] - 1) / chunk_dim[op_dim]; @@ -4889,7 +4892,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old /* Check the dataset's fill-value status */ if (H5P_is_fill_value_defined(fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* If we are filling the dataset on allocation or "if set" and * the fill value _is_ set, _and_ we are not overwriting the new blocks, @@ -4910,7 +4913,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old if (H5D__fill_init(&fb_info, NULL, H5D__chunk_mem_alloc, pline, H5D__chunk_mem_free, pline, &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)0, orig_chunk_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info"); fb_info_init = TRUE; /* Initialize the fill_buf pointer to the buffer in fb_info. If edge @@ -4932,24 +4935,24 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old if (has_unfilt_edge_chunks) { if (NULL == (unfilt_fill_buf = H5D__chunk_mem_alloc(orig_chunk_size, &def_pline))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); H5MM_memcpy(unfilt_fill_buf, fb_info.fill_buf, orig_chunk_size); } /* end if */ /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function"); /* Push the chunk through the filters */ if (H5Z_pipeline(pline, 0, &filter_mask, err_detect, filter_cb, &orig_chunk_size, &buf_size, &fb_info.fill_buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed"); #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (orig_chunk_size > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length"); #endif /* H5_SIZEOF_SIZE_T > 4 */ } /* end if */ } /* end if */ @@ -5025,7 +5028,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old /* Look up this chunk */ if (H5D__chunk_lookup(dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); #ifndef NDEBUG /* None of the chunks should be allocated */ if (H5D_CHUNK_IDX_NONE != sc->idx_type) @@ -5063,13 +5066,13 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old if (NULL == (fb_info.fill_buf = H5D__chunk_mem_realloc(fb_info.fill_buf, orig_chunk_size, pline))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory reallocation failed for raw data chunk") + "memory reallocation failed for raw data chunk"); fb_info.fill_buf_size = orig_chunk_size; } /* end if */ /* Fill the buffer with VL datatype fill values */ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer"); /* Check if there are filters which need to be applied to the chunk */ if ((pline->nused > 0) && !nunfilt_edge_chunk_dims) { @@ -5079,19 +5082,19 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function"); /* Push the chunk through the filters */ if (H5Z_pipeline(pline, 0, &filter_mask, err_detect, filter_cb, &nbytes, &fb_info.fill_buf_size, &fb_info.fill_buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed"); #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length"); #endif /* H5_SIZEOF_SIZE_T > 4 */ /* Keep the number of bytes the chunk turned in to */ @@ -5113,7 +5116,8 @@ 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, + "unable to insert/resize chunk on chunk level"); assert(H5_addr_defined(udata.chunk_block.offset)); /* Check if fill values should be written to chunks */ @@ -5136,7 +5140,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old (chunk_fill_info.num_chunks + 1024) * sizeof(struct chunk_coll_fill_info)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "memory allocation failed for chunk fill info") + "memory allocation failed for chunk fill info"); chunk_fill_info.chunk_info = tmp_realloc; } @@ -5155,7 +5159,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old #endif /* H5_HAVE_PARALLEL */ if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, udata.chunk_block.offset, chunk_size, *fill_buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file"); #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ @@ -5164,7 +5168,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old /* Insert the chunk record into the index */ if (need_insert && ops->insert) if ((ops->insert)(&idx_info, &udata, dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index"); /* Increment indices and adjust the edge chunk state */ carry = TRUE; @@ -5220,7 +5224,7 @@ H5D__chunk_allocate(const H5D_t *dset, hbool_t full_overwrite, const hsize_t old /* do final collective I/O */ if (using_mpi && blocks_written) if (H5D__chunk_collective_fill(dset, &chunk_fill_info, fb_info.fill_buf, unfilt_fill_buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file"); #endif /* H5_HAVE_PARALLEL */ /* Reset any cached chunk info for this dataset */ @@ -5324,7 +5328,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]) /* Validate this chunk dimension */ if (chunk_dim[op_dim] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim); /* Calculate offset of first previously incomplete chunk in this * dimension */ @@ -5371,7 +5375,7 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]) /* Lookup the chunk */ if (H5D__chunk_lookup(dset, chunk_sc, &chk_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* If this chunk does not exist in cache or on disk, no need to do * anything */ @@ -5380,11 +5384,11 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hsize_t old_dim[]) * updating the chunk to no longer be an edge chunk. */ if (NULL == (chunk = (void *)H5D__chunk_lock(&chk_io_info, &chk_dset_info, &chk_udata, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk"); /* Unlock the chunk */ if (H5D__chunk_unlock(&chk_io_info, &chk_dset_info, &chk_udata, TRUE, chunk, (uint32_t)0) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk"); } /* end if */ /* Increment indices */ @@ -5463,19 +5467,19 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_ /* Get the MPI communicator */ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file))) - HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator") + HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator"); /* Get the MPI rank */ if ((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank") + HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank"); /* Get the MPI size */ if ((mpi_size = H5F_mpi_get_size(dset->oloc.file)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size") + HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size"); /* Distribute evenly the number of blocks between processes. */ if (mpi_size == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Resulted in division by zero") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Resulted in division by zero"); num_blocks = (size_t)(chunk_fill_info->num_chunks / (size_t)mpi_size); /* value should be the same on all procs */ @@ -5495,7 +5499,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_ /* Allocate buffers */ if (NULL == (chunk_disp_array = (MPI_Aint *)H5MM_malloc((size_t)(blocks + 1) * sizeof(MPI_Aint)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file displacement buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file displacement buffer"); if (partial_chunk_fill_buf) { MPI_Aint fill_buf_addr; @@ -5521,7 +5525,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_ * unfiltered fill buffer. */ if (NULL == (block_disps = (MPI_Aint *)H5MM_calloc((size_t)(blocks + 1) * sizeof(MPI_Aint)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate block displacements buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate block displacements buffer"); } /* @@ -5544,7 +5548,7 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_ /* Allocate buffer for block lengths if necessary */ if (!all_same_block_len) if (NULL == (block_lens = (int *)H5MM_malloc((size_t)(blocks + 1) * sizeof(int)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk lengths buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk lengths buffer"); for (i = 0; i < (size_t)blocks; i++) { size_t idx = i + (size_t)(mpi_rank * blocks); @@ -5639,21 +5643,21 @@ H5D__chunk_collective_fill(const H5D_t *dset, H5D_chunk_coll_fill_info_t *chunk_ /* Set MPI datatypes for operation */ if (H5CX_set_mpi_coll_datatypes(mem_type, file_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O properties") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O properties"); /* Get current transfer mode */ if (H5CX_get_io_xfer_mode(&prev_xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode"); have_xfer_mode = TRUE; /* Set transfer mode */ if (H5CX_set_io_xfer_mode(H5FD_MPIO_COLLECTIVE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set transfer mode"); /* Low-level write (collective) */ if (H5F_shared_block_write(H5F_SHARED(dset->oloc.file), H5FD_MEM_DRAW, (haddr_t)0, (blocks) ? (size_t)1 : (size_t)0, fill_buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file"); /* Barrier so processes don't race ahead */ if (MPI_SUCCESS != (mpi_code = MPI_Barrier(mpi_comm))) @@ -5731,7 +5735,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) /* Get the info for the chunk in the file */ if (H5D__chunk_lookup(dset, scaled, &chk_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); chk_udata.new_unfilt_chunk = new_unfilt_chunk; /* If this chunk does not exist in cache or on disk, no need to do anything */ @@ -5744,7 +5748,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) if (H5D__fill_init(&udata->fb_info, NULL, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)udata->elmts_per_chunk, chunk_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info"); udata->fb_info_init = TRUE; } /* end if */ @@ -5756,15 +5760,15 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) /* Select all elements in chunk, to begin with */ if (H5S_select_all(udata->chunk_space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select space") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select space"); /* "Subtract out" the elements to keep */ if (H5S_select_hyperslab(udata->chunk_space, H5S_SELECT_NOTB, udata->hyper_start, NULL, count, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select hyperslab") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to select hyperslab"); /* Lock the chunk into the cache, to get a pointer to the chunk buffer */ if (NULL == (chunk = (void *)H5D__chunk_lock(io_info, udata->dset_info, &chk_udata, FALSE, FALSE))) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to lock raw data chunk"); /* Fill the selection in the memory buffer */ /* Use the size of the elements in the chunk directly instead of */ @@ -5779,20 +5783,20 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) if (udata->fb_info.has_vlen_fill_type) /* Re-fill the buffer to use for this I/O operation */ if (H5D__fill_refill_vl(&udata->fb_info, (size_t)sel_nelmts) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer"); /* Allocate the chunk selection iterator */ if (NULL == (chunk_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk selection iterator"); /* Create a selection iterator for scattering the elements to memory buffer */ if (H5S_select_iter_init(chunk_iter, udata->chunk_space, layout->u.chunk.dim[rank], 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunk selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunk selection information"); chunk_iter_init = TRUE; /* Scatter the data into memory */ if (H5D__scatter_mem(udata->fb_info.fill_buf, chunk_iter, (size_t)sel_nelmts, chunk /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed"); /* The number of bytes accessed in the chunk */ /* (i.e. the bytes replaced with fill values) */ @@ -5801,7 +5805,7 @@ H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk) /* Release lock on chunk */ if (H5D__chunk_unlock(io_info, udata->dset_info, &chk_udata, TRUE, chunk, bytes_accessed) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to unlock raw data chunk"); done: /* Release the selection iterator */ @@ -5981,7 +5985,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim) /* Create a dataspace for a chunk & set the extent */ if (NULL == (chunk_space = H5S_create_simple(space_ndims, chunk_dim, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Reset hyperslab start array */ /* (hyperslabs will always start from origin) */ @@ -6037,7 +6041,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim) for (op_dim = 0; op_dim < (unsigned)space_ndims; op_dim++) { /* Validate this chunk dimension */ if (chunk_dim[op_dim] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", op_dim); /* Calculate the largest offset of chunks that might need to be * modified in this dimension */ @@ -6145,7 +6149,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim) /* Fill the unused parts of the chunk */ if (H5D__chunk_prune_fill(&udata, new_unfilt_chunk) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write fill value") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write fill value"); } /* end if */ else { H5D_chunk_ud_t chk_udata; /* User data for getting chunk info */ @@ -6166,13 +6170,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim) /* Check if the chunk exists in cache or on disk */ if (H5D__chunk_lookup(dset, scaled, &chk_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk"); /* Evict the entry from the cache if present, but do not flush * it to disk */ if (UINT_MAX != chk_udata.idx_hint) if (H5D__chunk_cache_evict(dset, rdcc->slot[chk_udata.idx_hint], FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk"); /* Remove the chunk from disk, if present */ if (H5_addr_defined(chk_udata.chunk_block.offset)) { @@ -6182,7 +6186,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim) /* Remove the chunk from disk */ if ((sc->ops->remove)(&idx_info, &idx_udata) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, - "unable to remove chunk entry from index") + "unable to remove chunk entry from index"); } /* end if */ } /* end else */ @@ -6315,7 +6319,8 @@ H5D__chunk_addrmap(const H5D_t *dset, haddr_t chunk_addr[]) /* Iterate over chunks to build mapping of chunk addresses */ if ((sc->ops->iterate)(&idx_info, H5D__chunk_addrmap_cb, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to iterate over chunk index to build address map") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, + "unable to iterate over chunk index to build address map"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6353,10 +6358,10 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage) /* Check for I/O pipeline message */ if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message"); else if (exists) { if (NULL == H5O_msg_read_oh(f, oh, H5O_PLINE_ID, &pline)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O pipeline message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O pipeline message"); pline_read = TRUE; } /* end else if */ else @@ -6364,14 +6369,14 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage) /* Retrieve dataset layout message */ if ((exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to check for object header message"); else if (exists) { if (NULL == H5O_msg_read_oh(f, oh, H5O_LAYOUT_ID, &layout)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout message"); layout_read = TRUE; } /* end else if */ else - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "can't find layout message") + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "can't find layout message"); /* Compose chunked index info struct */ idx_info.f = f; @@ -6381,7 +6386,7 @@ H5D__chunk_delete(H5F_t *f, H5O_t *oh, H5O_storage_t *storage) /* Delete the chunked storage information in the file */ if ((storage->u.chunk.ops->idx_delete)(&idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk index"); done: /* Clean up any messages read in */ @@ -6494,7 +6499,7 @@ H5D__chunk_update_cache(H5D_t *dset) /* Remove the old entry from the cache */ if (H5D__chunk_cache_evict(dset, ent, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks") + HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks"); } /* end while */ done: @@ -6562,7 +6567,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) (udata->file_src != udata->idx_info_dst->f)) fix_ref = TRUE; else - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy dataset elements"); } /* end if */ /* Resize the buf if it is too small to hold the data */ @@ -6572,12 +6577,12 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Re-allocate memory for copying the chunk */ if (NULL == (new_buf = H5MM_realloc(udata->buf, nbytes))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); udata->buf = new_buf; if (udata->bkg) { if (NULL == (new_buf = H5MM_realloc(udata->bkg, nbytes))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); udata->bkg = new_buf; if (!udata->cpy_info->expand_ref) memset((uint8_t *)udata->bkg + buf_size, 0, (size_t)(nbytes - buf_size)); @@ -6623,7 +6628,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) if (udata->chunk_in_cache) { if (NULL == ent) - HGOTO_ERROR(H5E_IO, H5E_BADVALUE, H5_ITER_ERROR, "NULL chunk entry pointer") + HGOTO_ERROR(H5E_IO, H5E_BADVALUE, H5_ITER_ERROR, "NULL chunk entry pointer"); assert(H5_addr_defined(chunk_rec->chunk_addr)); assert(H5_addr_defined(ent->chunk_block.offset)); @@ -6634,7 +6639,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) else { /* read chunk data from the source file */ if (H5F_block_read(udata->file_src, H5FD_MEM_DRAW, chunk_rec->chunk_addr, nbytes, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk"); } } @@ -6645,7 +6650,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) if (H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &buf_size, &buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "data pipeline read failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "data pipeline read failed"); } /* end if */ /* Perform datatype conversion, if necessary */ @@ -6663,7 +6668,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) H5_CHECK_OVERFLOW(udata->nelmts, uint32_t, size_t); if (H5T_convert(tpath_src_mem, tid_src, tid_mem, (size_t)udata->nelmts, (size_t)0, (size_t)0, buf, bkg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed"); /* Copy into another buffer, to reclaim memory later */ H5MM_memcpy(reclaim_buf, buf, reclaim_buf_size); @@ -6673,11 +6678,11 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* 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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed"); /* Reclaim space from variable length data */ if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, H5_ITER_ERROR, "unable to reclaim variable-length data") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, H5_ITER_ERROR, "unable to reclaim variable-length data"); } /* end if */ else if (fix_ref) { /* Check for expanding references */ @@ -6686,7 +6691,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Copy the reference elements */ if (H5O_copy_expand_ref(udata->file_src, udata->tid_src, udata->dt_src, buf, nbytes, udata->idx_info_dst->f, bkg, udata->cpy_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy reference attribute") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy reference attribute"); } /* end if */ /* After fix ref, copy the new reference elements to the buffer to write out */ @@ -6706,11 +6711,11 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) if (must_filter && (is_vlen || fix_ref || udata->chunk_in_cache)) { if (H5Z_pipeline(pline, 0, &(udata_dst.filter_mask), H5Z_NO_EDC, filter_cb, &nbytes, &buf_size, &buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed"); #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length"); #endif /* H5_SIZEOF_SIZE_T > 4 */ H5_CHECKED_ASSIGN(udata_dst.chunk_block.length, uint32_t, nbytes, size_t); udata->buf = buf; @@ -6726,12 +6731,12 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Allocate chunk in the file */ if (H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, udata_dst.common.scaled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level"); /* Write chunk data to destination file */ assert(H5_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") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file"); /* Set metadata tag in API context */ H5_BEGIN_TAG(H5AC__COPIED_TAG) @@ -6811,7 +6816,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Layout is not created in the destination file, reset index address */ if (H5D_chunk_idx_reset(storage_dst, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index in dest") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to reset chunked storage index in dest"); /* Initialize layout information */ { @@ -6819,12 +6824,12 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Get the dim info for dataset */ if ((sndims = H5S_extent_get_dims(ds_extent_src, curr_dims, max_dims)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions"); H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int); /* Set the source layout chunk information */ if (H5D__chunk_set_info_real(layout_src, ndims, curr_dims, max_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout's chunk info"); } /* end block */ /* Compose source & dest chunked index info structs */ @@ -6841,12 +6846,12 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Call the index-specific "copy setup" routine */ if ((storage_src->ops->copy_setup)(&idx_info_src, &idx_info_dst) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to set up index-specific chunk copying information") + "unable to set up index-specific chunk copying information"); copy_setup_done = TRUE; /* Create datatype ID for src datatype */ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype"); /* If there's a VLEN source datatype, set up type conversion information */ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) { @@ -6860,38 +6865,38 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* create a memory copy of the variable-length datatype */ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) { (void)H5T_close_real(dt_mem); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype"); } /* end if */ /* create variable-length datatype at the destination file */ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); if (H5T_set_loc(dt_dst, H5F_VOL_OBJ(f_dst), H5T_LOC_DISK) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); } /* end if */ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype"); } /* end if */ /* Set up the conversion functions */ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes"); if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes"); /* Determine largest datatype size */ if (0 == (max_dt_size = H5T_get_size(dt_src))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); if (0 == (mem_dt_size = H5T_get_size(dt_mem))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(max_dt_size, mem_dt_size); if (0 == (tmp_dt_size = H5T_get_size(dt_dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(max_dt_size, tmp_dt_size); /* Compute the number of elements per chunk */ @@ -6902,12 +6907,12 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Create the space and set the initial extent */ buf_dim = nelmts; if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Register */ if ((sid_buf = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) { (void)H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } /* end if */ /* Set initial buffer sizes */ @@ -6916,7 +6921,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Allocate memory for reclaim buf */ if (NULL == (reclaim_buf = H5MM_malloc(reclaim_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk"); /* Indicate that type conversion should be performed */ do_convert = TRUE; @@ -6935,7 +6940,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk if (do_convert) { /* Allocate background memory for converting the chunk */ if (NULL == (bkg = H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data 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))) @@ -6945,7 +6950,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Allocate memory for copying the chunk */ if (NULL == (buf = H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk"); /* Initialize the callback structure for the source */ memset(&udata, 0, sizeof udata); @@ -6976,7 +6981,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk /* Iterate over chunks to copy data */ if ((storage_src->ops->iterate)(&idx_info_src, H5D__chunk_copy_cb, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to copy data") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to copy data"); /* Iterate over the chunk cache to copy data for chunks with undefined address */ if (udata.cpy_info->shared_fo) { @@ -6994,7 +6999,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk udata.chunk = ent->chunk; udata.chunk_in_cache = TRUE; if (H5D__chunk_copy_cb(&chunk_rec, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy chunk data in cache") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy chunk data in cache"); } next = ent->next; } /* end for */ @@ -7063,10 +7068,10 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_ /* Check for I/O pipeline message */ if ((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header"); else if (exists) { if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_PLINE_ID, &pline)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't find I/O pipeline message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't find I/O pipeline message"); pline_read = TRUE; } /* end else if */ else @@ -7080,16 +7085,16 @@ H5D__chunk_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5O_layout_t *layout, hsize_ /* Get the dataspace for the dataset */ if (NULL == (space = H5S_read(loc))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header"); /* Allocate any indexing structures */ if (sc->ops->init && (sc->ops->init)(&idx_info, space, loc->addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information"); idx_info_init = TRUE; /* Get size of index structure */ if (sc->ops->size && (sc->ops->size)(&idx_info, index_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve chunk index info"); done: /* Free resources, if they've been initialized */ @@ -7176,7 +7181,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream) /* Display info for index */ if ((sc->ops->dump)(sc, stream) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to dump chunk index info") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to dump chunk index info"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -7193,7 +7198,7 @@ H5D__chunk_dump_index(H5D_t *dset, FILE *stream) /* Iterate over index and dump chunk info */ if ((sc->ops->iterate)(&idx_info, H5D__chunk_dump_index_cb, &udata) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, - "unable to iterate over chunk index to dump chunk info") + "unable to iterate over chunk index to dump chunk info"); } /* end if */ done: @@ -7292,12 +7297,12 @@ H5D__nonexistent_readvv_cb(hsize_t H5_ATTR_UNUSED dst_off, hsize_t src_off, size if (H5D__fill_init(&fb_info, (udata->rbuf + src_off), NULL, NULL, NULL, NULL, &udata->dset->shared->dcpl_cache.fill, udata->dset->shared->type, udata->dset->shared->type_id, (size_t)0, len) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info"); fb_info_init = TRUE; /* Check for VL datatype & fill the buffer with VL datatype fill values */ if (fb_info.has_vlen_fill_type && H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer"); done: /* Release the fill buffer info, if it's been initialized */ @@ -7352,7 +7357,7 @@ H5D__nonexistent_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, if ((ret_value = H5VM_opvv(chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__nonexistent_readvv_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized fill value init") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized fill value init"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7443,11 +7448,11 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old /* Compute encoded size of chunk */ new_chunk_size_len = (H5VM_log2_gen((uint64_t)(new_chunk->length)) + 8) / 8; if (new_chunk_size_len > 8) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "encoded chunk size is more than 8 bytes?!?") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "encoded chunk size is more than 8 bytes?!?"); /* Check if the chunk became too large to be encoded */ if (new_chunk_size_len > allow_chunk_size_len) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk size can't be encoded") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk size can't be encoded"); } /* end block */ if (old_chunk && H5_addr_defined(old_chunk->offset)) { @@ -7463,7 +7468,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old */ if (!(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)) if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, old_chunk->offset, old_chunk->length) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); alloc_chunk = TRUE; } /* end if */ else { @@ -7491,7 +7496,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old udata.common.scaled = scaled; if ((idx_info->storage->ops->get_addr)(idx_info, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query chunk address"); new_chunk->offset = udata.chunk_block.offset; assert(new_chunk->length == udata.chunk_block.length); break; @@ -7506,7 +7511,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old 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 (!H5_addr_defined(new_chunk->offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed"); *need_insert = TRUE; break; @@ -7573,31 +7578,31 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Allocate buffer for chunk data */ if (NULL == (buf = H5MM_malloc(read_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, - "memory allocation failed for raw data chunk") + "memory allocation failed for raw data chunk"); /* Read the non-filtered edge chunk */ if (H5F_block_read(new_idx_info->f, H5FD_MEM_DRAW, chunk_addr, read_size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk") + HGOTO_ERROR(H5E_IO, H5E_READERROR, H5_ITER_ERROR, "unable to read raw data chunk"); /* Pass the chunk through the pipeline */ if (H5Z_pipeline(new_idx_info->pline, 0, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &read_size, &buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5_ITER_ERROR, "output pipeline failed"); #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (nbytes > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, H5_ITER_ERROR, "chunk too large for 32-bit length"); #endif /* H5_SIZEOF_SIZE_T > 4 */ /* 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") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, H5_ITER_ERROR, "file allocation failed for filtered chunk"); assert(H5_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) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file"); } /* end if */ /* Set up chunk information for insertion to chunk index */ @@ -7610,7 +7615,7 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Insert chunk into the v1 B-tree chunk index */ if ((new_idx_info->storage->ops->insert)(new_idx_info, &insert_udata, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert chunk addr into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert chunk addr into index"); done: if (buf) @@ -7648,7 +7653,7 @@ H5D__chunk_format_convert(H5D_t *dset, H5D_chk_idx_info_t *idx_info, H5D_chk_idx /* Iterate over the chunks in the current index and insert the chunk addresses into version 1 B-tree index */ if ((idx_info->storage->ops->iterate)(idx_info, H5D__chunk_format_convert_cb, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7715,7 +7720,7 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty) for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -7730,7 +7735,7 @@ H5D__chunk_index_empty(const H5D_t *dset, hbool_t *empty) if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__chunk_index_empty_cb, empty) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve allocated chunk information from index") + "unable to retrieve allocated chunk information from index"); } done: @@ -7801,7 +7806,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -7817,7 +7822,7 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_num_chunks_cb, &num_chunks) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve allocated chunk information from index") + "unable to retrieve allocated chunk information from index"); *nchunks = num_chunks; } @@ -7909,7 +7914,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -7938,7 +7943,7 @@ H5D__get_chunk_info(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_chunk_info_cb, &udata) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve allocated chunk information from index") + "unable to retrieve allocated chunk information from index"); /* Obtain requested info if the chunk is found */ if (udata.found) { @@ -8042,7 +8047,7 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer"); /* Set addr & size for when dset is not written or queried chunk is not found */ if (addr) @@ -8073,7 +8078,7 @@ H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *offset, unsigned if ((dset->shared->layout.storage.u.chunk.ops->iterate)(&idx_info, H5D__get_chunk_info_by_coord_cb, &udata) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve information of the chunk by its scaled coordinates") + "unable to retrieve information of the chunk by its scaled coordinates"); /* Obtain requested info if the chunk is found */ if (udata.found) { @@ -8161,7 +8166,7 @@ H5D__chunk_iter(H5D_t *dset, H5D_chunk_iter_op_t op, void *op_data) for (ent = rdcc->head; ent; ent = ent->next) /* Flush the chunk out to disk, to make certain the size is correct later */ if (H5D__chunk_flush_entry(dset, ent, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "cannot flush indexed storage buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "cannot flush indexed storage buffer"); /* Compose chunked index info struct */ idx_info.f = dset->oloc.file; @@ -8221,11 +8226,11 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of for (u = 0; u < dset->shared->ndims; u++) { /* Make sure the offset doesn't exceed the dataset's dimensions */ if (offset[u] > dset->shared->curr_dims[u]) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "offset exceeds dimensions of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "offset exceeds dimensions of dataset"); /* Make sure the offset fall right on a chunk's boundary */ if (offset[u] % dset->shared->layout.u.chunk.dim[u]) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "offset doesn't fall on chunks's boundary") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "offset doesn't fall on chunks's boundary"); offset_copy[u] = offset[u]; } diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 04e4357..96a9123 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -129,14 +129,14 @@ H5D__compact_fill(const H5D_t *dset) if (H5D__fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, (size_t)0, dset->shared->layout.storage.u.compact.size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info"); fb_info_init = TRUE; /* Check for VL datatype & non-default fill value */ if (fb_info.has_vlen_fill_type) /* Fill the buffer with VL datatype fill values */ if (H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer"); done: /* Release the fill buffer info, if it's been initialized */ @@ -173,7 +173,7 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset) /* Check for invalid dataset dimensions */ for (u = 0; u < dset->shared->ndims; u++) if (dset->shared->max_dims[u] > dset->shared->curr_dims[u]) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "extendible compact dataset not allowed") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "extendible compact dataset not allowed"); /* * Compact dataset is stored in dataset object header message of @@ -192,7 +192,7 @@ H5D__compact_construct(H5F_t *f, H5D_t *dset) max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), FALSE); if (dset->shared->layout.storage.u.compact.size > max_comp_data_size) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "compact dataset size is bigger than header message maximum size") + "compact dataset size is bigger than header message maximum size"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -266,7 +266,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi /* Retrieve pointer to file driver structure for ctl call */ if (H5F_shared_get_file_driver(udata->f_sh, &file_handle) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get file handle") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get file handle"); /* Setup operation flags and arguments */ op_flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG | H5FD_CTL_FAIL_IF_UNKNOWN_FLAG; @@ -279,7 +279,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi /* Make request to file driver */ if (H5FD_ctl(file_handle, H5FD_CTL_MEM_COPY, op_flags, &op_args, NULL) < 0) - HGOTO_ERROR(H5E_IO, H5E_FCNTL, FAIL, "VFD memcpy request failed") + HGOTO_ERROR(H5E_IO, H5E_FCNTL, FAIL, "VFD memcpy request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -326,14 +326,14 @@ H5D__compact_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset if ((ret_value = H5VM_opvv(mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr, dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr, H5D__compact_iovv_memmanage_cb, &udata)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); } else { /* Use the vectorized memory copy routine to do actual work */ if ((ret_value = H5VM_memcpyvv(dset_info->buf.vp, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr, dset_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); } done: @@ -384,14 +384,14 @@ H5D__compact_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dse if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr, H5D__compact_iovv_memmanage_cb, &udata)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); } else { /* Use the vectorized memory copy routine to do actual work */ if ((ret_value = H5VM_memcpyvv(dset_info->store->compact.buf, dset_max_nseq, dset_curr_seq, dset_size_arr, dset_offset_arr, dset_info->buf.cvp, mem_max_nseq, mem_curr_seq, mem_size_arr, mem_offset_arr)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); } /* Mark the compact dataset's buffer as dirty */ @@ -425,7 +425,7 @@ H5D__compact_flush(H5D_t *dset) dset->shared->layout.storage.u.compact.dirty = FALSE; if (H5O_msg_write(&(dset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dset->shared->layout)) < 0) { dset->shared->layout.storage.u.compact.dirty = TRUE; - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message"); } } /* end if */ @@ -497,7 +497,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds /* Create datatype ID for src datatype, so it gets freed */ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype"); /* If there's a VLEN source datatype, do type conversion information */ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) { @@ -514,43 +514,43 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds /* create a memory copy of the variable-length datatype */ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) { (void)H5T_close_real(dt_mem); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype"); } /* end if */ /* create variable-length datatype at the destination file */ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); if (H5T_set_loc(dt_dst, H5F_VOL_OBJ(f_dst), H5T_LOC_DISK) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); } /* end if */ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype"); } /* end if */ /* Set up the conversion functions */ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes"); if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes"); /* Determine largest datatype size */ if (0 == (src_dt_size = H5T_get_size(dt_src))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); if (0 == (tmp_dt_size = H5T_get_size(dt_mem))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(src_dt_size, tmp_dt_size); if (0 == (tmp_dt_size = H5T_get_size(dt_dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(max_dt_size, tmp_dt_size); /* Set number of whole elements that fit in buffer */ if (0 == (nelmts = storage_src->size / src_dt_size)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large"); /* Set up number of bytes to copy, and initial buffer size */ buf_size = nelmts * max_dt_size; @@ -560,31 +560,31 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds /* Create the space and set the initial extent */ if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Register */ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) { H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } /* end if */ /* Allocate memory for recclaim buf */ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Allocate memory for copying the chunk */ if (NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); H5MM_memcpy(buf, storage_src->buf, storage_src->size); /* allocate temporary bkg buff for data conversion */ if (NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Convert from source file to memory */ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Copy into another buffer, to reclaim memory later */ H5MM_memcpy(reclaim_buf, buf, buf_size); @@ -594,12 +594,12 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds /* 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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); H5MM_memcpy(storage_dst->buf, buf, storage_dst->size); if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data"); } /* end if */ else if (H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) { if (f_src != f_dst) { @@ -609,7 +609,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds */ if (H5O_copy_expand_ref(f_src, tid_src, dt_src, storage_src->buf, storage_src->size, f_dst, storage_dst->buf, cpy_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute"); } /* end if */ else /* Reset value to zero */ diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index f9b36bd..4624d83 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -162,7 +162,7 @@ H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage /*out */) /* Allocate space for the contiguous data */ if (HADDR_UNDEF == (storage->addr = H5MF_alloc(f, H5FD_MEM_DRAW, storage->size))) - HGOTO_ERROR(H5E_IO, H5E_NOSPACE, FAIL, "unable to reserve file space") + HGOTO_ERROR(H5E_IO, H5E_NOSPACE, FAIL, "unable to reserve file space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -213,11 +213,11 @@ H5D__contig_fill(H5D_t *dset) if (H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) { /* Get the MPI communicator */ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(dset->oloc.file))) - HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator") + HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI communicator"); /* Get the MPI rank */ if ((mpi_rank = H5F_mpi_get_rank(dset->oloc.file)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank") + HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank"); /* Set the MPI-capable file driver flag */ using_mpi = TRUE; @@ -230,17 +230,17 @@ H5D__contig_fill(H5D_t *dset) /* Get the number of elements in the dataset's dataspace */ if ((snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "dataset has negative number of elements") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "dataset has negative number of elements"); H5_CHECKED_ASSIGN(npoints, size_t, snpoints, hssize_t); /* Get the maximum size of temporary buffers */ if (H5CX_get_max_temp_buf(&max_temp_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size"); /* Initialize the fill value buffer */ if (H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL, &dset->shared->dcpl_cache.fill, dset->shared->type, dset->shared->type_id, npoints, max_temp_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info"); fb_info_init = TRUE; /* Start at the beginning of the dataset */ @@ -275,7 +275,7 @@ H5D__contig_fill(H5D_t *dset) if (fb_info.has_vlen_fill_type) /* Re-fill the buffer to use for this I/O operation */ if (H5D__fill_refill_vl(&fb_info, curr_points) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer"); #ifdef H5_HAVE_PARALLEL /* Check if this file is accessed with an MPI-capable file driver */ @@ -300,7 +300,7 @@ H5D__contig_fill(H5D_t *dset) #endif /* H5_HAVE_PARALLEL */ H5_CHECK_OVERFLOW(size, size_t, hsize_t); if (H5D__contig_write_one(&ioinfo, &dset_info, offset, size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset"); #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ @@ -352,7 +352,7 @@ H5D__contig_delete(H5F_t *f, const H5O_storage_t *storage) /* Free the file space for the chunk */ if (H5MF_xfree(f, H5FD_MEM_DRAW, storage->u.contig.addr, storage->u.contig.size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free contiguous storage space") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free contiguous storage space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -394,23 +394,23 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset) for (u = 0; u < dset->shared->ndims; u++) if (dset->shared->max_dims[u] > dset->shared->curr_dims[u]) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "extendible contiguous non-external dataset not allowed") + "extendible contiguous non-external dataset not allowed"); /* Retrieve the number of elements in the dataspace */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace"); nelmts = (hsize_t)snelmts; /* Get the datatype's size */ if (0 == (dt_size = H5T_GET_SIZE(dset->shared->type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype"); /* Compute the size of the dataset's contiguous storage */ tmp_size = nelmts * dt_size; /* Check for overflow during multiplication */ if (nelmts != (tmp_size / dt_size)) - HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed") + HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed"); /* Assign the dataset's contiguous storage size */ dset->shared->layout.storage.u.contig.size = tmp_size; @@ -463,19 +463,19 @@ H5D__contig_init(H5F_t H5_ATTR_UNUSED *f, const H5D_t *dset, hid_t H5_ATTR_UNUSE /* Retrieve the number of elements in the dataspace */ if ((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace"); nelmts = (hsize_t)snelmts; /* Get the datatype's size */ if (0 == (dt_size = H5T_GET_SIZE(dset->shared->type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype"); /* Compute the size of the dataset's contiguous storage */ tmp_size = nelmts * dt_size; /* Check for overflow during multiplication */ if (nelmts != (tmp_size / dt_size)) - HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed") + HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed"); /* Assign the dataset's contiguous storage size */ dset->shared->layout.storage.u.contig.size = tmp_size; @@ -576,7 +576,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Get dim number and dimensionality for each dataspace */ if ((sf_ndims = H5S_GET_EXTENT_NDIMS(dinfo->file_space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimension number"); /* Normalize hyperslab selections by adjusting them by the offset */ /* (It might be worthwhile to normalize both the file and memory dataspaces @@ -585,7 +585,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) * additions involving the offset and the hyperslab selection -QAK) */ if ((file_space_normalized = H5S_hyper_normalize_offset(dinfo->file_space, old_offset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset"); /* if selected elements exist */ if (dinfo->nelmts) { @@ -599,14 +599,14 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Create "temporary" chunk for selection operations (copy file space) */ if (NULL == (tmp_fspace = H5S_copy(dinfo->file_space, TRUE, FALSE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space"); /* Add temporary chunk to the list of pieces */ /* collect piece_info into Skip List */ /* Allocate the file & memory chunk information */ if (NULL == (new_piece_info = H5FL_MALLOC(H5D_piece_info_t))) { (void)H5S_close(tmp_fspace); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info"); } /* end if */ /* Set the piece index */ @@ -662,7 +662,7 @@ H5D__contig_io_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) * already */ if (io_info->use_select_io != H5D_SELECTION_IO_MODE_OFF) if (H5D__contig_may_use_select_io(io_info, dinfo, io_info->op_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if selection I/O is possible") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if selection I/O is possible"); done: if (ret_value < 0) { @@ -758,7 +758,7 @@ H5D__contig_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t * /* Check if the page buffer is enabled */ if (H5PB_enabled(io_info->f_sh, H5FD_MEM_DRAW, &page_buf_enabled) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if page buffer is enabled") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if page buffer is enabled"); if (page_buf_enabled) { io_info->use_select_io = H5D_SELECTION_IO_MODE_OFF; io_info->no_selection_io_cause |= H5D_SEL_IO_PAGE_BUFFER; @@ -806,7 +806,7 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) dinfo->nelmts > 0 ? 1 : 0, &dinfo->mem_space, &dinfo->file_space, &(dinfo->store->contig.dset_addr), &dst_type_size, &(dinfo->buf.vp)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "contiguous selection read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "contiguous selection read failed"); } else { if (dinfo->layout_io_info.contig_piece_info) { @@ -837,7 +837,7 @@ H5D__contig_read(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) else /* Read data through legacy (non-selection I/O) pathway */ if ((dinfo->io_ops.single_read)(io_info, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "contiguous read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "contiguous read failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -880,7 +880,7 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) dinfo->nelmts > 0 ? 1 : 0, &dinfo->mem_space, &dinfo->file_space, &(dinfo->store->contig.dset_addr), &dst_type_size, &(dinfo->buf.cvp)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "contiguous selection write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "contiguous selection write failed"); } else { if (dinfo->layout_io_info.contig_piece_info) { @@ -911,7 +911,7 @@ H5D__contig_write(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) else /* Write data through legacy (non-selection I/O) pathway */ if ((dinfo->io_ops.single_write)(io_info, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "contiguous write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "contiguous write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -945,7 +945,7 @@ H5D__contig_write_one(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hsi 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) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -999,19 +999,19 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Check if we can actually hold the I/O request in the sieve buffer */ if (len > dset_contig->sieve_buf_size) { if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, addr, len, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); } /* end if */ else { /* Allocate room for the data sieve buffer */ if (NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Determine the new sieve buffer size & location */ dset_contig->sieve_loc = addr; /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF == (rel_eoa = H5F_shared_get_eoa(f_sh, H5FD_MEM_DRAW))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size"); /* Set up the buffer parameters */ max_data = store_contig->dset_size - dst_off; @@ -1023,7 +1023,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Read the new sieve buffer */ if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); /* Grab the data out of the buffer (must be first piece of data in buffer ) */ H5MM_memcpy(buf, dset_contig->sieve_buf, len); @@ -1055,7 +1055,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Write to file */ if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, sieve_start, sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); /* Reset sieve buffer dirty flag */ dset_contig->sieve_dirty = FALSE; @@ -1064,7 +1064,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Read directly into the user's buffer */ if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, addr, len, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); } /* end if */ /* Element size fits within the buffer size */ else { @@ -1073,7 +1073,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Write to file */ if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, sieve_start, sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); /* Reset sieve buffer dirty flag */ dset_contig->sieve_dirty = FALSE; @@ -1084,7 +1084,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF == (rel_eoa = H5F_shared_get_eoa(f_sh, H5FD_MEM_DRAW))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size"); /* Only need this when resizing sieve buffer */ max_data = store_contig->dset_size - dst_off; @@ -1100,7 +1100,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void * /* Read the new sieve buffer */ if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); /* Grab the data out of the buffer (must be first piece of data in buffer ) */ H5MM_memcpy(buf, dset_contig->sieve_buf, len); @@ -1135,7 +1135,7 @@ H5D__contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata /* Write data */ if (H5F_shared_block_read(udata->f_sh, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, (udata->rbuf + src_off)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1189,7 +1189,7 @@ H5D__contig_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_readvv_sieve_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer read") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer read"); } /* end if */ else { H5D_contig_readvv_ud_t udata; /* User data for H5VM_opvv() operator */ @@ -1203,7 +1203,7 @@ H5D__contig_readvv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_readvv_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read"); } /* end else */ done: @@ -1258,12 +1258,12 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Check if we can actually hold the I/O request in the sieve buffer */ if (len > dset_contig->sieve_buf_size) { if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, addr, len, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); } /* end if */ else { /* Allocate room for the data sieve buffer */ if (NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Clear memory */ if (dset_contig->sieve_size > len) @@ -1274,7 +1274,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF == (rel_eoa = H5F_shared_get_eoa(f_sh, H5FD_MEM_DRAW))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size"); /* Set up the buffer parameters */ max_data = store_contig->dset_size - dst_off; @@ -1288,7 +1288,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Read the new sieve buffer */ if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); } /* end if */ /* Grab the data out of the buffer (must be first piece of data in buffer ) */ @@ -1329,7 +1329,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Write to file */ if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, sieve_start, sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); /* Reset sieve buffer dirty flag */ dset_contig->sieve_dirty = FALSE; @@ -1342,7 +1342,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Write directly from the user's buffer */ if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, addr, len, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); } /* end if */ /* Element size fits within the buffer size */ else { @@ -1378,7 +1378,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Write to file */ if (H5F_shared_block_write(f_sh, H5FD_MEM_DRAW, sieve_start, sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); /* Reset sieve buffer dirty flag */ dset_contig->sieve_dirty = FALSE; @@ -1389,7 +1389,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF == (rel_eoa = H5F_shared_get_eoa(f_sh, H5FD_MEM_DRAW))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine file size"); /* Only need this when resizing sieve buffer */ max_data = store_contig->dset_size - dst_off; @@ -1407,7 +1407,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len, void /* Read the new sieve buffer */ if (H5F_shared_block_read(f_sh, H5FD_MEM_DRAW, dset_contig->sieve_loc, dset_contig->sieve_size, dset_contig->sieve_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed"); } /* end if */ /* Grab the data out of the buffer (must be first piece of data in buffer ) */ @@ -1445,7 +1445,7 @@ H5D__contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udat /* Write data */ if (H5F_shared_block_write(udata->f_sh, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, (udata->wbuf + src_off)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "block write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1499,7 +1499,7 @@ H5D__contig_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_writevv_sieve_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer write") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer write"); } /* end if */ else { H5D_contig_writevv_ud_t udata; /* User data for H5VM_opvv() operator */ @@ -1513,7 +1513,7 @@ H5D__contig_writevv(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__contig_writevv_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read"); } /* end else */ done: @@ -1541,7 +1541,7 @@ H5D__contig_flush(H5D_t *dset) /* Flush any data in sieve buffer */ if (H5D__flush_sieve_buf(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1568,7 +1568,7 @@ H5D__contig_io_term(H5D_io_info_t H5_ATTR_UNUSED *io_info, H5D_dset_io_info_t *d /* Free piece info */ if (di->layout_io_info.contig_piece_info) { if (H5D__free_piece_info(di->layout_io_info.contig_piece_info, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free piece info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't free piece info"); di->layout_io_info.contig_piece_info = NULL; } @@ -1633,7 +1633,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* Allocate space for destination raw data */ if (H5D__contig_alloc(f_dst, storage_dst) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to allocate contiguous storage") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to allocate contiguous storage"); /* Set up number of bytes to copy, and initial buffer size */ /* (actually use the destination size, which has been fixed up, if necessary) */ @@ -1645,49 +1645,49 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f * but this ensures that the src datatype will be freed. */ if ((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register source file datatype"); /* If there's a VLEN source datatype, set up type conversion information */ if (H5T_detect_class(dt_src, H5T_VLEN, FALSE) > 0) { /* create a memory copy of the variable-length datatype */ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) { (void)H5T_close_real(dt_mem); - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register memory datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register memory datatype"); } /* end if */ /* create variable-length datatype at the destination file */ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy"); if (H5T_set_loc(dt_dst, H5F_VOL_OBJ(f_dst), H5T_LOC_DISK) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); } /* end if */ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype"); } /* end if */ /* Set up the conversion functions */ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes"); if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes"); /* Determine largest datatype size */ if (0 == (src_dt_size = H5T_get_size(dt_src))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size"); if (0 == (mem_dt_size = H5T_get_size(dt_mem))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(src_dt_size, mem_dt_size); if (0 == (dst_dt_size = H5T_get_size(dt_dst))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size"); max_dt_size = MAX(max_dt_size, dst_dt_size); /* Set maximum number of whole elements that fit in buffer */ if (0 == (nelmts = buf_size / max_dt_size)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "element size too large"); /* Set the number of bytes to transfer */ src_nbytes = nelmts * src_dt_size; @@ -1702,12 +1702,12 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* Create the space and set the initial extent */ if (NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Register */ if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, FALSE)) < 0) { H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } /* end if */ /* Set flag to do type conversion */ @@ -1728,16 +1728,16 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* Allocate space for copy buffer */ 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer"); /* Need extra buffer for datatype conversions, to prevent stranding/leaking memory */ if (is_vlen || fix_ref) { if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer"); /* allocate temporary bkg buff for data conversion */ if (NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer"); } /* end if */ /* Loop over copying data */ @@ -1770,7 +1770,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* Adjust size of buffer's dataspace */ if (H5S_set_extent_real(buf_space, buf_dim) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to change buffer dataspace size") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to change buffer dataspace size"); } /* end if */ else /* Adjust destination & memory bytes to transfer */ @@ -1786,13 +1786,13 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f else /* Read raw data from source file */ if (H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data"); /* Perform datatype conversion, if necessary */ if (is_vlen) { /* Convert from source file to memory */ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Copy into another buffer, to reclaim memory later */ H5MM_memcpy(reclaim_buf, buf, mem_nbytes); @@ -1802,18 +1802,18 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* 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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Reclaim space from variable length data */ if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data"); } /* end if */ else if (fix_ref) { /* Check for expanding references */ if (cpy_info->expand_ref) { /* Copy the reference elements */ if (H5O_copy_expand_ref(f_src, tid_src, dt_src, buf, buf_size, f_dst, bkg, cpy_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute"); /* After fix ref, copy the new reference elements to the buffer to write out */ H5MM_memcpy(buf, bkg, buf_size); @@ -1825,7 +1825,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f /* Write raw data to destination file */ if (H5F_block_write(f_dst, H5FD_MEM_DRAW, addr_dst, dst_nbytes, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data"); /* Adjust loop variables */ addr_src += src_nbytes; diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 569dad9..22777b4 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -71,7 +71,7 @@ H5Ddebug(hid_t dset_id) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); /* Print B-tree information */ if (H5D_CHUNKED == dset->shared->layout.type) diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 1cf6ef3..d8c19c0 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -107,18 +107,18 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read"); if (H5P_DEFAULT == dcpl_id) dcpl_id = H5P_DATASET_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not dataset create property list ID"); /* Set the DCPL for the API context */ H5CX_set_dcpl(dcpl_id); @@ -129,17 +129,17 @@ H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t /* get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Create the dataset */ if (NULL == (dset = H5VL_dataset_create(vol_obj, &loc_params, name, H5P_LINK_CREATE_DEFAULT, type_id, space_id, dcpl_id, H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, H5I_INVALID_HID, "unable to create dataset"); /* Register the new dataset to get an ID for it */ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataset"); done: if (H5I_INVALID_HID == ret_value) @@ -176,9 +176,9 @@ H5Dopen1(hid_t loc_id, const char *name) /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -186,16 +186,16 @@ H5Dopen1(hid_t loc_id, const char *name) /* get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the dataset */ if (NULL == (dset = H5VL_dataset_open(vol_obj, &loc_params, name, H5P_DATASET_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open dataset"); /* Get an ID for the dataset */ if ((ret_value = H5VL_register(H5I_DATASET, dset, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register dataset ID"); done: if (H5I_INVALID_HID == ret_value) @@ -236,9 +236,9 @@ H5Dextend(hid_t dset_id, const hsize_t size[]) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier"); if (!size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified"); /* Set up VOL callback arguments */ vol_get_cb_args.op_type = H5VL_DATASET_GET_SPACE; @@ -246,16 +246,16 @@ H5Dextend(hid_t dset_id, const hsize_t size[]) /* Get the dataspace pointer for the dataset */ if (H5VL_dataset_get(vol_obj, &vol_get_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataspace"); sid = vol_get_cb_args.args.get_space.space_id; if (H5I_INVALID_HID == sid) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "received an invalid dataspace from the dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "received an invalid dataspace from the dataset"); if (NULL == (ds = (H5S_t *)H5I_object_verify(sid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get dataspace structure from ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get dataspace structure from ID"); /* Get the dataset's current extent */ if (H5S_get_simple_extent_dims(ds, dset_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions"); /* Get the dataset dimensions */ ndims = H5S_GET_EXTENT_NDIMS(ds); @@ -273,7 +273,7 @@ H5Dextend(hid_t dset_id, const hsize_t size[]) /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_spec_cb_args.op_type = H5VL_DATASET_SET_EXTENT; @@ -281,7 +281,7 @@ H5Dextend(hid_t dset_id, const hsize_t size[]) /* Increase size */ if (H5VL_dataset_specific(vol_obj, &vol_spec_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to extend dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to extend dataset"); done: /* Close the dataspace */ @@ -314,17 +314,17 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) /* Check args */ if (H5I_DATATYPE != H5I_get_type(type_id) || buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); diff --git a/src/H5Dearray.c b/src/H5Dearray.c index e468ffb..93535ac 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -222,7 +222,7 @@ H5D__earray_crt_context(void *_udata) /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5D_earray_ctx_t))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, - "can't allocate extensible array client callback context") + "can't allocate extensible array client callback context"); /* Initialize the context */ ctx->file_addr_len = H5F_SIZEOF_ADDR(udata->f); @@ -575,7 +575,7 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr) /* Allocate context for debugging callback */ if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_earray_ctx_ud_t))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, - "can't allocate extensible array client callback context") + "can't allocate extensible array client callback context"); /* Set up the object header location info */ H5O_loc_reset(&obj_loc); @@ -584,16 +584,16 @@ H5D__earray_crt_dbg_context(H5F_t *f, haddr_t obj_addr) /* Open the object header where the layout message resides */ if (H5O_open(&obj_loc) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header"); obj_opened = TRUE; /* Read the layout message */ if (NULL == H5O_msg_read(&obj_loc, H5O_LAYOUT_ID, &layout)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get layout info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get layout info"); /* close the object header */ if (H5O_close(&obj_loc, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header"); /* Create user data */ dbg_ctx->f = f; @@ -686,16 +686,16 @@ H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info) /* Get header */ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Retrieve the dataset's object header proxy */ if (NULL == (oh_proxy = H5O_get_proxy(oh))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy"); /* Make the extensible array a child flush dependency of the dataset's object header */ if (H5EA_depend(idx_info->storage->u.earray.ea, oh_proxy) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header proxy") + "unable to create flush dependency on object header proxy"); done: /* Release the object header from the cache */ @@ -746,13 +746,13 @@ H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info) /* Open the extensible array for the chunk index */ if (NULL == (idx_info->storage->u.earray.ea = H5EA_open(idx_info->f, idx_info->storage->idx_addr, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open extensible array"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__earray_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -790,7 +790,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had /* Get the dim info for dataset */ if ((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions"); H5_CHECKED_ASSIGN(ndims, unsigned, sndims, int); /* Find the rank of the unlimited dimension */ @@ -800,7 +800,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had if (H5S_UNLIMITED == max_dims[u]) { /* Check if we've already found an unlimited dimension */ if (unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASET, H5E_ALREADYINIT, FAIL, "already found unlimited dimension") + HGOTO_ERROR(H5E_DATASET, H5E_ALREADYINIT, FAIL, "already found unlimited dimension"); /* Set the unlimited dimension */ unlim_dim = (int)u; @@ -809,7 +809,7 @@ H5D__earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, had /* Check if we didn't find an unlimited dimension */ if (unlim_dim < 0) - HGOTO_ERROR(H5E_DATASET, H5E_UNINITIALIZED, FAIL, "didn't find unlimited dimension") + HGOTO_ERROR(H5E_DATASET, H5E_UNINITIALIZED, FAIL, "didn't find unlimited dimension"); /* Set the unlimited dimension for the layout's future use */ idx_info->layout->u.earray.unlim_dim = (unsigned)unlim_dim; @@ -889,17 +889,17 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info) /* Create the extensible array for the chunk index */ if (NULL == (idx_info->storage->u.earray.ea = H5EA_create(idx_info->f, &cparam, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create extensible array"); /* Get the address of the extensible array in file */ if (H5EA_get_addr(idx_info->storage->u.earray.ea, &(idx_info->storage->idx_addr)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array address"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__earray_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -956,7 +956,7 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata if (NULL == idx_info->storage->u.earray.ea) { /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); } else /* Patch the top level file pointer contained in ea if needed */ H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f); @@ -965,9 +965,9 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata ea = idx_info->storage->u.earray.ea; if (!H5_addr_defined(udata->chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already"); if (udata->chunk_idx != (udata->chunk_idx & 0xffffffff)) /* negative value */ - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32"); /* Check for filters on chunks */ if (idx_info->pline->nused > 0) { @@ -979,12 +979,12 @@ H5D__earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata /* Set the info for the chunk */ if (H5EA_set(ea, udata->chunk_idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info"); } /* end if */ else { /* Set the address for the chunk */ if (H5EA_set(ea, udata->chunk_idx, &udata->chunk_block.offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address"); } /* end else */ done: @@ -1024,7 +1024,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda if (NULL == idx_info->storage->u.earray.ea) { /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); } else /* Patch the top level file pointer contained in ea if needed */ H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f); @@ -1062,7 +1062,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda /* Get the information for the chunk */ if (H5EA_get(ea, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info"); /* Set the info for the chunk */ udata->chunk_block.offset = elmt.addr; @@ -1072,7 +1072,7 @@ H5D__earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda else { /* Get the address for the chunk */ if (H5EA_get(ea, idx, &udata->chunk_block.offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address"); /* Update the other (constant) information for the chunk */ udata->chunk_block.length = idx_info->layout->size; @@ -1226,7 +1226,7 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t if (NULL == idx_info->storage->u.earray.ea) { /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); } else /* Patch the top level file pointer contained in ea if needed */ H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f); @@ -1236,7 +1236,7 @@ H5D__earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t /* Get the extensible array statistics */ if (H5EA_get_stats(ea, &ea_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics"); if (ea_stat.stored.max_idx_set > 0) { H5D_earray_it_ud_t udata; /* User data for iteration callback */ @@ -1294,11 +1294,11 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t if (NULL == idx_info->storage->u.earray.ea) { /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); } else /* Patch the top level file pointer contained in ea if needed */ if (H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer"); /* Set convenience pointer to extensible array structure */ ea = idx_info->storage->u.earray.ea; @@ -1331,14 +1331,14 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t /* Get the info about the chunk for the index */ if (H5EA_get(ea, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info"); /* Remove raw data chunk from file if not doing SWMR writes */ assert(H5_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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); } /* end if */ /* Reset the info about the chunk for the index */ @@ -1346,27 +1346,27 @@ H5D__earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t elmt.nbytes = 0; elmt.filter_mask = 0; if (H5EA_set(ea, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk info"); } /* end if */ else { haddr_t addr = HADDR_UNDEF; /* Chunk address */ /* Get the address of the chunk for the index */ if (H5EA_get(ea, idx, &addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address"); /* Remove raw data chunk from file if not doing SWMR writes */ assert(H5_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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); } /* end if */ /* Reset the address of the chunk for the index */ addr = HADDR_UNDEF; if (H5EA_set(ea, idx, &addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk address"); } /* end else */ done: @@ -1400,7 +1400,7 @@ H5D__earray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Remove raw data chunk from file */ H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t); if (H5MF_xfree(f, H5FD_MEM_DRAW, chunk_rec->chunk_addr, (hsize_t)chunk_rec->nbytes) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1441,11 +1441,11 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Iterate over the chunk addresses in the extensible array, deleting each chunk */ if (H5D__earray_idx_iterate(idx_info, H5D__earray_idx_delete_cb, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses"); /* Close extensible array */ if (H5EA_close(idx_info->storage->u.earray.ea) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array"); idx_info->storage->u.earray.ea = NULL; /* Set up the context user data */ @@ -1454,7 +1454,7 @@ H5D__earray_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Delete extensible array */ if (H5EA_delete(idx_info->f, idx_info->storage->idx_addr, &ctx_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk extensible array"); idx_info->storage->idx_addr = HADDR_UNDEF; } /* end if */ else @@ -1497,14 +1497,14 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk if (NULL == idx_info_src->storage->u.earray.ea) /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info_src) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); /* Set copied metadata tag */ H5_BEGIN_TAG(H5AC__COPIED_TAG) /* 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); assert(H5_addr_defined(idx_info_dst->storage->idx_addr)); /* Reset metadata tag */ @@ -1538,10 +1538,10 @@ H5D__earray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun /* Close extensible arrays */ if (H5EA_close(storage_src->u.earray.ea) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array"); storage_src->u.earray.ea = NULL; if (H5EA_close(storage_dst->u.earray.ea) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array"); storage_dst->u.earray.ea = NULL; done: @@ -1578,14 +1578,14 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) /* Open the extensible array in file */ if (H5D__earray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array"); /* Set convenience pointer to extensible array structure */ ea = idx_info->storage->u.earray.ea; /* Get the extensible array statistics */ if (H5EA_get_stats(ea, &ea_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query extensible array statistics"); /* Set the size of the extensible array */ *index_size = ea_stat.computed.hdr_size + ea_stat.computed.index_blk_size + @@ -1594,7 +1594,7 @@ H5D__earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) done: if (idx_info->storage->u.earray.ea) { if (H5EA_close(idx_info->storage->u.earray.ea) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array"); idx_info->storage->u.earray.ea = NULL; } /* end if */ @@ -1677,11 +1677,11 @@ H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Patch the top level file pointer contained in ea if needed */ if (H5EA_patch_file(idx_info->storage->u.earray.ea, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch earray file pointer"); /* Close extensible array */ if (H5EA_close(idx_info->storage->u.earray.ea) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close extensible array"); idx_info->storage->u.earray.ea = NULL; } /* end if */ diff --git a/src/H5Defl.c b/src/H5Defl.c index aea37a4..84a3042 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -130,23 +130,23 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset) /* Check for invalid dataset dimensions */ for (u = 1; u < dset->shared->ndims; u++) if (dset->shared->max_dims[u] > dset->shared->curr_dims[u]) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "only the first dimension can be extendible") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "only the first dimension can be extendible"); /* Retrieve the size of the dataset's datatype */ if (0 == (dt_size = H5T_get_size(dset->shared->type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to determine datatype size"); /* Check for storage overflows */ max_points = H5S_get_npoints_max(dset->shared->space); max_storage = H5O_efl_total_size(&dset->shared->dcpl_cache.efl); if (H5S_UNLIMITED == max_points) { if (H5O_EFL_UNLIMITED != max_storage) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unlimited dataspace but finite storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unlimited dataspace but finite storage"); } /* end if */ else if ((max_points * dt_size) < max_points) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace * type size overflowed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace * type size overflowed"); else if ((max_points * dt_size) > max_storage) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace size exceeds external storage size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataspace size exceeds external storage size"); /* Compute the total size of dataset */ stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space); @@ -253,15 +253,15 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size while (size) { assert(buf); if (u >= efl->nused) - HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file") + HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file"); if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip)) - HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed") + HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed"); if (H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0) - HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name") + HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name"); if ((fd = HDopen(full_name, O_RDONLY)) < 0) - HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file"); if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + (HDoff_t)skip), SEEK_SET) < 0) - HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file"); #ifndef NDEBUG tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t); @@ -270,7 +270,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); #endif /* NDEBUG */ if ((n = HDread(fd, buf, to_read)) < 0) - HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file"); else if ((size_t)n < to_read) memset(buf + n, 0, to_read - (size_t)n); full_name = (char *)H5MM_xfree(full_name); @@ -338,19 +338,19 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz while (size) { assert(buf); if (u >= efl->nused) - HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file") + HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file"); if (H5F_OVERFLOW_HSIZET2OFFT((hsize_t)efl->slot[u].offset + skip)) - HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed") + HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed"); if (H5_combine_path(dset->shared->extfile_prefix, efl->slot[u].name, &full_name) < 0) - HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name") + HGOTO_ERROR(H5E_EFL, H5E_NOSPACE, FAIL, "can't build external file name"); if ((fd = HDopen(full_name, O_CREAT | O_RDWR, H5_POSIX_CREATE_MODE_RW)) < 0) { if (HDaccess(full_name, F_OK) < 0) - HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "external raw data file does not exist") + HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "external raw data file does not exist"); else - HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file"); } /* end if */ if (HDlseek(fd, (HDoff_t)(efl->slot[u].offset + (HDoff_t)skip), SEEK_SET) < 0) - HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file"); #ifndef NDEBUG tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size); H5_CHECK_OVERFLOW(tempto_write, hsize_t, size_t); @@ -359,7 +359,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz to_write = MIN((size_t)(efl->slot[u].size - skip), size); #endif /* NDEBUG */ if ((size_t)HDwrite(fd, buf, to_write) != to_write) - HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file") + HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file"); full_name = (char *)H5MM_xfree(full_name); HDclose(fd); fd = -1; @@ -397,7 +397,7 @@ H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) /* Read data */ if (H5D__efl_read(udata->efl, udata->dset, dst_off, len, (udata->rbuf + src_off)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "EFL read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "EFL read failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -447,7 +447,7 @@ H5D__efl_readvv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_ds /* Call generic sequence operation routine */ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__efl_readvv_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL read") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL read"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -472,7 +472,7 @@ H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata) /* Write data */ if (H5D__efl_write(udata->efl, udata->dset, dst_off, len, (udata->wbuf + src_off)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "EFL write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "EFL write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -522,7 +522,7 @@ H5D__efl_writevv(const H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, const H5D_d /* Call generic sequence operation routine */ if ((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr, H5D__efl_writevv_cb, &udata)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL write") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL write"); done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__efl_writevv() */ @@ -553,7 +553,7 @@ H5D__efl_bh_info(H5F_t *f, H5O_efl_t *efl, hsize_t *heap_size) /* Get the size of the local heap for EFL's file list */ if (H5HL_heapsize(f, efl->heap_addr, heap_size) < 0) - HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, FAIL, "unable to retrieve local heap info") + HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, FAIL, "unable to retrieve local heap info"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c index 4a18d98..9235ecd 100644 --- a/src/H5Dfarray.c +++ b/src/H5Dfarray.c @@ -220,7 +220,7 @@ H5D__farray_crt_context(void *_udata) /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5D_farray_ctx_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context"); /* Initialize the context */ ctx->file_addr_len = H5F_SIZEOF_ADDR(udata->f); @@ -427,7 +427,7 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr) /* Allocate context for debugging callback */ if (NULL == (dbg_ctx = H5FL_MALLOC(H5D_farray_ctx_ud_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context"); /* Set up the object header location info */ H5O_loc_reset(&obj_loc); @@ -436,16 +436,16 @@ H5D__farray_crt_dbg_context(H5F_t *f, haddr_t obj_addr) /* Open the object header where the layout message resides */ if (H5O_open(&obj_loc) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header"); obj_opened = TRUE; /* Read the layout message */ if (NULL == H5O_msg_read(&obj_loc, H5O_LAYOUT_ID, &layout)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get layout info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get layout info"); /* close the object header */ if (H5O_close(&obj_loc, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header"); /* Create user data */ dbg_ctx->f = f; @@ -682,16 +682,16 @@ H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info) /* Get header */ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Retrieve the dataset's object header proxy */ if (NULL == (oh_proxy = H5O_get_proxy(oh))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get dataset object header proxy"); /* Make the fixed array a child flush dependency of the dataset's object header proxy */ if (H5FA_depend(idx_info->storage->u.farray.fa, oh_proxy) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header proxy") + "unable to create flush dependency on object header proxy"); done: /* Release the object header from the cache */ @@ -763,13 +763,13 @@ H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info) /* Open the fixed array for the chunk index */ if (NULL == (idx_info->storage->u.farray.fa = H5FA_open(idx_info->f, idx_info->storage->idx_addr, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open fixed array"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__farray_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -837,17 +837,17 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info) /* Create the fixed array for the chunk index */ if (NULL == (idx_info->storage->u.farray.fa = H5FA_create(idx_info->f, &cparam, &udata))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create fixed array"); /* Get the address of the fixed array in file */ if (H5FA_get_addr(idx_info->storage->u.farray.fa, &(idx_info->storage->idx_addr)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array address"); /* Check for SWMR writes to the file */ if (H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) if (H5D__farray_idx_depend(idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency on object header") + "unable to create flush dependency on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -904,7 +904,7 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata if (NULL == idx_info->storage->u.farray.fa) { /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); } else /* Patch the top level file pointer contained in fa if needed */ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); @@ -913,9 +913,9 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata fa = idx_info->storage->u.farray.fa; if (!H5_addr_defined(udata->chunk_block.offset)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "The chunk should have allocated already"); if (udata->chunk_idx != (udata->chunk_idx & 0xffffffff)) /* negative value */ - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk index must be less than 2^32"); /* Check for filters on chunks */ if (idx_info->pline->nused > 0) { @@ -927,12 +927,12 @@ H5D__farray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata /* Set the info for the chunk */ if (H5FA_set(fa, udata->chunk_idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk info"); } /* end if */ else { /* Set the address for the chunk */ if (H5FA_set(fa, udata->chunk_idx, &udata->chunk_block.offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set chunk address"); } /* end else */ done: @@ -972,7 +972,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda if (NULL == idx_info->storage->u.farray.fa) { /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); } else /* Patch the top level file pointer contained in fa if needed */ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); @@ -992,7 +992,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda /* Get the information for the chunk */ if (H5FA_get(fa, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info"); /* Set the info for the chunk */ udata->chunk_block.offset = elmt.addr; @@ -1002,7 +1002,7 @@ H5D__farray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *uda else { /* Get the address for the chunk */ if (H5FA_get(fa, idx, &udata->chunk_block.offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address"); /* Update the other (constant) information for the chunk */ udata->chunk_block.length = idx_info->layout->size; @@ -1105,7 +1105,7 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t if (NULL == idx_info->storage->u.farray.fa) { /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); } else /* Patch the top level file pointer contained in fa if needed */ H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f); @@ -1115,7 +1115,7 @@ H5D__farray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t /* Get the fixed array statistics */ if (H5FA_get_stats(fa, &fa_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics"); /* Check if there are any array elements */ if (fa_stat.nelmts > 0) { @@ -1174,11 +1174,11 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t if (NULL == idx_info->storage->u.farray.fa) { /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); } else /* Patch the top level file pointer contained in fa if needed */ if (H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer"); /* Set convenience pointer to fixed array structure */ fa = idx_info->storage->u.farray.fa; @@ -1193,14 +1193,14 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t /* Get the info about the chunk for the index */ if (H5FA_get(fa, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info"); /* Remove raw data chunk from file if not doing SWMR writes */ assert(H5_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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); } /* end if */ /* Reset the info about the chunk for the index */ @@ -1208,27 +1208,27 @@ H5D__farray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t elmt.nbytes = 0; elmt.filter_mask = 0; if (H5FA_set(fa, idx, &elmt) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk info"); } /* end if */ else { haddr_t addr = HADDR_UNDEF; /* Chunk address */ /* Get the address of the chunk for the index */ if (H5FA_get(fa, idx, &addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address"); /* Remove raw data chunk from file if not doing SWMR writes */ assert(H5_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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk"); } /* end if */ /* Reset the address of the chunk for the index */ addr = HADDR_UNDEF; if (H5FA_set(fa, idx, &addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to reset chunk address"); } /* end else */ done: @@ -1262,7 +1262,7 @@ H5D__farray_idx_delete_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Remove raw data chunk from file */ H5_CHECK_OVERFLOW(chunk_rec->nbytes, /*From: */ uint32_t, /*To: */ hsize_t); if (H5MF_xfree(f, H5FD_MEM_DRAW, chunk_rec->chunk_addr, (hsize_t)chunk_rec->nbytes) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1299,11 +1299,11 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Iterate over the chunk addresses in the fixed array, deleting each chunk */ if (H5D__farray_idx_iterate(idx_info, H5D__farray_idx_delete_cb, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk addresses"); /* Close fixed array */ if (H5FA_close(idx_info->storage->u.farray.fa) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array"); idx_info->storage->u.farray.fa = NULL; /* Set up the user data */ @@ -1312,7 +1312,7 @@ H5D__farray_idx_delete(const H5D_chk_idx_info_t *idx_info) /* Delete fixed array */ if (H5FA_delete(idx_info->f, idx_info->storage->idx_addr, &ctx_udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk fixed array"); idx_info->storage->idx_addr = HADDR_UNDEF; } /* end if */ else @@ -1355,14 +1355,14 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk if (NULL == idx_info_src->storage->u.farray.fa) /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info_src) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); /* Set copied metadata tag */ H5_BEGIN_TAG(H5AC__COPIED_TAG) /* 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); assert(H5_addr_defined(idx_info_dst->storage->idx_addr)); /* Reset metadata tag */ @@ -1396,10 +1396,10 @@ H5D__farray_idx_copy_shutdown(H5O_storage_chunk_t *storage_src, H5O_storage_chun /* Close fixed arrays */ if (H5FA_close(storage_src->u.farray.fa) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array"); storage_src->u.farray.fa = NULL; if (H5FA_close(storage_dst->u.farray.fa) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array"); storage_dst->u.farray.fa = NULL; done: @@ -1436,14 +1436,14 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) /* Open the fixed array in file */ if (H5D__farray_idx_open(idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array"); /* Set convenience pointer to fixed array structure */ fa = idx_info->storage->u.farray.fa; /* Get the fixed array statistics */ if (H5FA_get_stats(fa, &fa_stat) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't query fixed array statistics"); *index_size = fa_stat.hdr_size; *index_size += fa_stat.dblk_size; @@ -1451,7 +1451,7 @@ H5D__farray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) done: if (idx_info->storage->u.farray.fa) { if (H5FA_close(idx_info->storage->u.farray.fa) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array"); idx_info->storage->u.farray.fa = NULL; } /* end if */ @@ -1532,11 +1532,11 @@ H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info) /* Patch the top level file pointer contained in fa if needed */ if (H5FA_patch_file(idx_info->storage->u.farray.fa, idx_info->f) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch fixed array file pointer"); /* Close fixed array */ if (H5FA_close(idx_info->storage->u.farray.fa) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close fixed array"); idx_info->storage->u.farray.fa = NULL; } /* end if */ diff --git a/src/H5Dfill.c b/src/H5Dfill.c index db0989c..ed1ac3e 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -132,7 +132,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Make sure the dataspace has an extent set (or is NULL) */ if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace extent has not been set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace extent has not been set"); /* Get the memory datatype size */ dst_type_size = H5T_get_size(buf_type); @@ -143,15 +143,15 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Wrap the local buffer for elements */ if (NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for element */ if (NULL == (elem_ptr = H5WB_actual_clear(elem_wb, dst_type_size))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Fill the selection in the memory buffer */ if (H5S_select_fill(elem_ptr, dst_type_size, space, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed"); } /* end if */ else { H5T_path_t *tpath; /* Conversion path information */ @@ -166,15 +166,16 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(fill_type, buf_type))) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, + "unable to convert between src and dest datatype"); /* Construct source & destination datatype IDs, if we will need them */ if (!H5T_path_noop(tpath)) { if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill_type, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(buf_type, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); } /* end if */ /* If there's VL type of data, make multiple copies of fill value first, @@ -190,12 +191,12 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Allocate a temporary buffer */ if (NULL == (tmp_buf = H5FL_BLK_MALLOC(type_conv, (size_t)nelmts * buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Allocate a background buffer, if necessary */ if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)nelmts * buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Replicate the file's fill value into the temporary buffer */ H5VM_array_fill(tmp_buf, fill, src_type_size, (size_t)nelmts); @@ -203,21 +204,21 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Convert from file's fill value into memory form */ if (H5T_convert(tpath, src_id, dst_id, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); /* Allocate the chunk selection iterator */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory selection iterator"); /* Create a selection iterator for scattering the elements to memory buffer */ if (H5S_select_iter_init(mem_iter, space, dst_type_size, 0) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); mem_iter_init = TRUE; /* Scatter the data into memory */ if (H5D__scatter_mem(tmp_buf, mem_iter, (size_t)nelmts, buf /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed"); } /* end if */ else { const uint8_t *fill_buf; /* Buffer to use for writing fill values */ @@ -229,11 +230,11 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Wrap the local buffer for elements */ if (NULL == (elem_wb = H5WB_wrap(elem_buf, sizeof(elem_buf)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for element */ if (NULL == (elem_ptr = H5WB_actual(elem_wb, buf_size))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Copy the user's data into the buffer for conversion */ H5MM_memcpy(elem_ptr, fill, src_type_size); @@ -243,17 +244,17 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ if (H5T_path_bkg(tpath)) { /* Wrap the local buffer for background elements */ if (NULL == (bkg_elem_wb = H5WB_wrap(bkg_elem_buf, sizeof(bkg_elem_buf)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for element */ if (NULL == (bkg_ptr = H5WB_actual_clear(bkg_elem_wb, buf_size))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer"); } /* end if */ /* Perform datatype conversion */ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, elem_ptr, bkg_ptr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); /* Point at element buffer */ fill_buf = (const uint8_t *)elem_ptr; @@ -263,7 +264,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ /* Fill the selection in the memory buffer */ if (H5S_select_fill(fill_buf, dst_type_size, space, buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed"); } /* end else */ } /* end else */ @@ -330,16 +331,16 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat /* Detect whether the datatype has a VL component */ if ((has_vlen_type = H5T_detect_class(dset_type, H5T_VLEN, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to detect vlen datatypes?") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to detect vlen datatypes?"); fb_info->has_vlen_fill_type = (hbool_t)has_vlen_type; /* If necessary, convert fill value datatypes (which copies VL components, etc.) */ if (fb_info->has_vlen_fill_type) { /* Create temporary datatype for conversion operation */ if (NULL == (fb_info->mem_type = H5T_copy(dset_type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy file datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy file datatype"); if ((fb_info->mem_tid = H5I_register(H5I_DATATYPE, fb_info->mem_type, FALSE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register memory datatype"); /* Retrieve sizes of memory & file datatypes */ fb_info->mem_elmt_size = H5T_get_size(fb_info->mem_type); @@ -371,18 +372,18 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat else fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size); if (NULL == fb_info->fill_buf) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer"); } /* end else */ /* Get the datatype conversion path for this operation */ if (NULL == (fb_info->fill_to_mem_tpath = H5T_path_find(dset_type, fb_info->mem_type))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert between src and dst datatypes") + "unable to convert between src and dst datatypes"); /* Get the inverse datatype conversion path for this operation */ if (NULL == (fb_info->mem_to_dset_tpath = H5T_path_find(fb_info->mem_type, dset_type))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert between src and dst datatypes") + "unable to convert between src and dst datatypes"); /* Check if we need to allocate a background buffer */ if (H5T_path_bkg(fb_info->fill_to_mem_tpath) || H5T_path_bkg(fb_info->mem_to_dset_tpath)) { @@ -395,7 +396,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat /* Allocate the background buffer */ if (NULL == (fb_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, fb_info->bkg_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end if */ } /* end if */ else { @@ -424,7 +425,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat else fb_info->fill_buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size); if (NULL == fb_info->fill_buf) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer"); } /* end else */ /* Replicate the fill value into the cached buffer */ @@ -472,7 +473,7 @@ H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf, H5MM_allocat fb_info->fill_buf = H5FL_BLK_MALLOC(zero_fill, fb_info->fill_buf_size); } /* end else */ if (fb_info->fill_buf == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer"); } /* end else */ } /* end else */ @@ -517,7 +518,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts) /* 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, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); /* Replicate the fill value into the cached buffer */ if (nelmts > 1) @@ -534,14 +535,14 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts) else buf = H5FL_BLK_MALLOC(non_zero_fill, fb_info->fill_buf_size); if (!buf) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer"); H5MM_memcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size); /* Type convert the dataset buffer, to copy any VL components */ if (H5T_convert(fb_info->mem_to_dset_tpath, fb_info->mem_tid, fb_info->file_tid, nelmts, (size_t)0, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); done: if (buf) { diff --git a/src/H5Dint.c b/src/H5Dint.c index 301e803..e6a709e 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -164,7 +164,7 @@ H5D_init(void) /* Initialize the ID group for the dataset IDs */ if (H5I_register_type(H5I_DATASET_CLS) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize interface"); /* Reset the "default dataset" information */ memset(&H5D_def_dset, 0, sizeof(H5D_shared_t)); @@ -176,19 +176,19 @@ H5D_init(void) * default dataset with them. */ if (NULL == (def_dcpl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_CREATE_ID_g))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get default dataset creation property list"); /* Get the default data storage layout */ if (H5P_get(def_dcpl, H5D_CRT_LAYOUT_NAME, &H5D_def_dset.layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout"); /* Get the default dataset creation properties */ if (H5P_get(def_dcpl, H5D_CRT_EXT_FILE_LIST_NAME, &H5D_def_dset.dcpl_cache.efl) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve external file list"); if (H5P_get(def_dcpl, H5D_CRT_FILL_VALUE_NAME, &H5D_def_dset.dcpl_cache.fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve fill value"); if (H5P_get(def_dcpl, H5O_CRT_PIPELINE_NAME, &H5D_def_dset.dcpl_cache.pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter"); /* Retrieve the prefixes of VDS and external file from the environment variable */ H5D_prefix_vds_env = HDgetenv("HDF5_VDS_PREFIX"); @@ -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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create and link to dataset"); assert(ocrt_info.new_obj); /* Set the return value */ @@ -383,7 +383,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation) if (H5D__get_num_chunks(dset, dset->shared->space, &n_chunks_alloc) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to retrieve number of allocated chunks in dataset") + "unable to retrieve number of allocated chunks in dataset"); assert(n_chunks_alloc <= n_chunks_total); @@ -427,7 +427,7 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type) /* Allocate new shared dataset structure */ if (NULL == (new_dset = H5FL_MALLOC(H5D_shared_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the default dataset information */ H5MM_memcpy(new_dset, &H5D_def_dset, sizeof(H5D_shared_t)); @@ -437,26 +437,26 @@ H5D__new(hid_t dcpl_id, hid_t dapl_id, hbool_t creating, hbool_t vl_type) */ if (!vl_type && creating && dcpl_id == H5P_DATASET_CREATE_DEFAULT) { if (H5I_inc_ref(dcpl_id, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DCPL ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DCPL ID"); new_dset->dcpl_id = dcpl_id; } /* end if */ else { /* Get the property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list"); new_dset->dcpl_id = H5P_copy_plist(plist, FALSE); } /* end else */ if (!vl_type && creating && dapl_id == H5P_DATASET_ACCESS_DEFAULT) { if (H5I_inc_ref(dapl_id, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DAPL ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment default DAPL ID"); new_dset->dapl_id = dapl_id; } /* end if */ else { /* Get the property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list"); new_dset->dapl_id = H5P_copy_plist(plist, FALSE); } /* end else */ @@ -504,11 +504,11 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type) /* Check whether the datatype is relocatable */ if ((relocatable = H5T_is_relocatable(type)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?"); /* Check whether the datatype is immutable */ if ((immutable = H5T_is_immutable(type)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?"); /* To use at least v18 format versions or not */ use_at_least_v18 = (H5F_LOW_BOUND(file) >= H5F_LIBVER_V18); @@ -517,30 +517,30 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, H5T_t *type) if (!immutable || relocatable || use_at_least_v18) { /* Copy datatype for dataset */ if ((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy datatype"); /* Convert a datatype (if committed) to a transient type if the committed datatype's file * location is different from the file location where the dataset will be created. */ if (H5T_convert_committed_datatype(dset->shared->type, file) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get shared datatype info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get shared datatype info"); /* Mark any datatypes as being on disk now */ if (H5T_set_loc(dset->shared->type, H5F_VOL_OBJ(file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't set datatype location") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't set datatype location"); /* Set the version for datatype */ if (H5T_set_version(file, dset->shared->type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype"); /* Get a datatype ID for the dataset's datatype */ if ((dset->shared->type_id = H5I_register(H5I_DATATYPE, dset->shared->type, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type"); } /* end if */ /* Not a custom datatype, just use it directly */ else { if (H5I_inc_ref(type_id, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "Can't increment datatype ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "Can't increment datatype ID"); /* Use existing datatype */ dset->shared->type_id = type_id; @@ -575,7 +575,7 @@ H5D__cache_dataspace_info(const H5D_t *dset) /* Cache info for dataset's dataspace */ if ((sndims = H5S_get_simple_extent_dims(dset->shared->space, dset->shared->curr_dims, dset->shared->max_dims)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't cache dataspace dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't cache dataspace dimensions"); dset->shared->ndims = (unsigned)sndims; /* Compute the initial 'power2up' values */ @@ -583,7 +583,7 @@ H5D__cache_dataspace_info(const H5D_t *dset) hsize_t scaled_power2up; /* Scaled value, rounded to next power of 2 */ if (!(scaled_power2up = H5VM_power2up(dset->shared->curr_dims[u]))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2"); dset->shared->curr_power2up[u] = scaled_power2up; } @@ -615,19 +615,19 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space) /* Copy dataspace for dataset */ if (NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataspace"); /* Cache the dataset's dataspace info */ if (H5D__cache_dataspace_info(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info"); /* Set the version for dataspace */ if (H5S_set_version(file, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype"); /* Set the dataset's dataspace to 'all' selection */ if (H5S_select_all(dset->shared->space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set all selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -658,7 +658,7 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize) /* Get the dataset object header minimize flag for this call */ if (H5CX_get_dset_min_ohdr_flag(minimize) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't get dataset object header minimize flag from API context") + "can't get dataset object header minimize flag from API context"); if (FALSE == *minimize) *minimize = H5F_get_min_dset_ohdr(file); @@ -702,25 +702,25 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) /* Datatype message size */ get_value = H5O_msg_size_oh(file, ohdr, H5O_DTYPE_ID, type, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "Can't get size of datatype message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "Can't get size of datatype message"); ret_value += get_value; /* Shared Dataspace message size */ get_value = H5O_msg_size_oh(file, ohdr, H5O_SDSPACE_ID, dset->shared->space, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of dataspace message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of dataspace message"); ret_value += get_value; /* "Layout" message size */ get_value = H5O_msg_size_oh(file, ohdr, H5O_LAYOUT_ID, &dset->shared->layout, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of layout message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of layout message"); ret_value += get_value; /* Fill Value message size */ get_value = H5O_msg_size_oh(file, ohdr, H5O_FILL_NEW_ID, fill_prop, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of fill value message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of fill value message"); ret_value += get_value; /* "Continuation" message size */ @@ -729,7 +729,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) */ get_value = H5O_msg_size_oh(file, ohdr, H5O_CONT_ID, continuation, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of continuation message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of continuation message"); ret_value += get_value; /* Fill Value (backwards compatibility) message size */ @@ -741,12 +741,12 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) H5MM_memcpy(&old_fill_prop, fill_prop, sizeof(old_fill_prop)); if (H5O_msg_reset_share(H5O_FILL_ID, &old_fill_prop) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't reset the copied fill property") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't reset the copied fill property"); get_value = H5O_msg_size_oh(file, ohdr, H5O_FILL_ID, &old_fill_prop, 0); if (get_value == 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, - "can't get size of fill value (backwards compat) message") + "can't get size of fill value (backwards compat) message"); ret_value += get_value; } @@ -756,7 +756,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) if (pline->nused > 0) { get_value = H5O_msg_size_oh(file, ohdr, H5O_PLINE_ID, pline, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of filter message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of filter message"); ret_value += get_value; } } @@ -765,7 +765,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) if (dset->shared->dcpl_cache.efl.nused > 0) { get_value = H5O_msg_size_oh(file, ohdr, H5O_EFL_ID, &dset->shared->dcpl_cache.efl, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of external file link message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of external file link message"); ret_value += get_value; } @@ -778,7 +778,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr) time_t mtime; get_value = H5O_msg_size_oh(file, ohdr, H5O_MTIME_NEW_ID, &mtime, 0); if (get_value == 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of modification time message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of modification time message"); ret_value += get_value; } } @@ -813,15 +813,15 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc) oh = H5O_create_ohdr(file, dset->shared->dcpl_id); if (NULL == oh) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't instantiate object header") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't instantiate object header"); ohdr_size = H5D__calculate_minimum_header_size(file, dset, oh); if (ohdr_size == 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "computed header size is invalid") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "computed header size is invalid"); /* Special allocation of space for compact datasets is handled by the call here. */ if (H5O_apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc) == FAIL) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -869,7 +869,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Retrieve "defined" status of fill value */ if (H5P_is_fill_value_defined(fill_prop, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* Special case handling for variable-length types */ if (H5T_detect_class(type, H5T_VLEN, FALSE)) { @@ -885,26 +885,26 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Don't allow never writing fill values with variable-length types */ if (fill_prop->fill_time == H5D_FILL_TIME_NEVER) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "Dataset doesn't support VL datatype when fill value is not defined") + "Dataset doesn't support VL datatype when fill value is not defined"); } /* end if */ /* Determine whether fill value is defined or not */ if (fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) { /* Convert fill value buffer to dataset's datatype */ if (fill_prop->buf && fill_prop->size > 0 && H5O_fill_convert(fill_prop, type, &fill_changed) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert fill value to dataset type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to convert fill value to dataset type"); fill_prop->fill_defined = TRUE; } else if (fill_status == H5D_FILL_VALUE_UNDEFINED) fill_prop->fill_defined = FALSE; else - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine if fill value is defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to determine if fill value is defined"); /* Check for invalid fill & allocation time setting */ if (fill_prop->fill_defined == FALSE && fill_prop->fill_time == H5D_FILL_TIME_ALLOC) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "fill value writing on allocation set, but no fill value defined") + "fill value writing on allocation set, but no fill value defined"); /* Check if the fill value info changed */ if (fill_changed) { @@ -913,19 +913,19 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Get dataset's property list object */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list"); /* Update dataset creation property */ if (H5P_set(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value info"); } /* end if */ if (H5D__use_minimized_dset_headers(file, &use_minimized_header) == FAIL) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get minimize settings"); if (TRUE == use_minimized_header) { if (H5D__prepare_minimized_oh(file, dset, oloc) == FAIL) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header"); } /* end if */ else { /* Add the dataset's raw data size to the size of the header, if the @@ -936,26 +936,26 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Create an object header for the dataset */ if (H5O_create(file, ohdr_size, (size_t)1, dset->shared->dcpl_id, oloc /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset object header"); } /* if using default/minimized object headers */ assert(file == dset->oloc.file); /* Pin the object header */ if (NULL == (oh = H5O_pin(oloc))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header"); /* Write the dataspace header message */ if (H5S_append(file, oh, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update dataspace header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update dataspace header message"); /* Write the datatype header message */ if (H5O_msg_append_oh(file, oh, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT, 0, type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update datatype header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update datatype header message"); /* Write new fill value message */ if (H5O_msg_append_oh(file, oh, H5O_FILL_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, fill_prop) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message"); /* If there is valid information for the old fill value struct, add it */ /* (only if we aren't using v18 format versions and above */ @@ -971,12 +971,12 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Write old fill value */ if (H5O_msg_append_oh(file, oh, H5O_FILL_ID, H5O_MSG_FLAG_CONSTANT, 0, &old_fill_prop) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message"); } /* end if */ /* Update/create the layout (and I/O pipeline & EFL) messages */ if (H5D__layout_oh_create(file, oh, dset, dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message"); /* Indicate that the layout information was initialized */ layout_init = TRUE; @@ -987,7 +987,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Get dataset's property list object */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list"); /* Check whether to add a "bogus" message */ if ((H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) && @@ -998,14 +998,14 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) /* Retrieve "bogus" message ID */ if (H5P_get(dc_plist, H5O_BOGUS_MSG_ID_NAME, &bogus_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options"); /* Retrieve "bogus" message flags */ if (H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options"); /* Add a "bogus" message (for error testing). */ if (H5O_bogus_oh(file, oh, bogus_id, (unsigned)bogus_flags) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message"); } /* end if */ } #endif /* H5O_ENABLE_BOGUS */ @@ -1016,7 +1016,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id) */ if (!use_at_least_v18) if (H5O_touch_oh(file, oh, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message"); done: /* Release pointer to object header itself */ @@ -1070,7 +1070,7 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char ** if (prefix == NULL || *prefix == '\0') { if (H5CX_get_vds_prefix(&prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for vds file") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for vds file"); } } else if (H5F_PREFIX_EFILE == prefix_type) { @@ -1078,11 +1078,11 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char ** if (prefix == NULL || *prefix == '\0') { if (H5CX_get_ext_file_prefix(&prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for the external file") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get the prefix for the external file"); } } else - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "prefix name is not sensible") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "prefix name is not sensible"); /* Prefix has to be checked for NULL / empty string again because the * code above might have updated it. @@ -1101,12 +1101,12 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char ** file_prefix_len = filepath_len + prefix_len - HDstrlen("${ORIGIN}") + 1; if (NULL == (*file_prefix = (char *)H5MM_malloc(file_prefix_len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer"); HDsnprintf(*file_prefix, file_prefix_len, "%s%s", filepath, prefix + HDstrlen("${ORIGIN}")); } /* end if */ else { if (NULL == (*file_prefix = (char *)H5MM_strdup(prefix))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end else */ } /* end else */ @@ -1155,14 +1155,14 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t /* Get the dataset's datatype */ if (NULL == (dt = (H5T_t *)H5I_object(type_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype"); /* If this is a named datatype, get the pointer via the VOL plugin */ type = H5T_get_actual_type(dt); /* Check if the datatype is "sensible" for use in a dataset */ if (H5T_is_sensible(type) != TRUE) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible"); /* Check if the datatype is/contains a VL-type */ if (H5T_detect_class(type, H5T_VLEN, FALSE)) @@ -1170,11 +1170,11 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t /* Check if the dataspace has an extent set (or is NULL) */ if (!H5S_has_extent(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "dataspace extent has not been set.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "dataspace extent has not been set."); /* Initialize the dataset object */ if (NULL == (new_dset = H5FL_CALLOC(H5D_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set up & reset dataset location */ dset_loc.oloc = &(new_dset->oloc); @@ -1183,15 +1183,15 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t /* Initialize the shared dataset space */ if (NULL == (new_dset->shared = H5D__new(dcpl_id, dapl_id, TRUE, has_vl_type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy & initialize datatype for dataset */ if (H5D__init_type(file, new_dset, type_id, type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy datatype"); /* Copy & initialize dataspace for dataset */ if (H5D__init_space(file, new_dset, space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't copy dataspace"); /* Set the dataset's checked_filters flag to enable writing */ new_dset->shared->checked_filters = TRUE; @@ -1205,72 +1205,72 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t htri_t ignore_filters = FALSE; /* Ignore optional filters or not */ if ((ignore_filters = H5Z_ignore_filters(new_dset->shared->dcpl_id, dt, space)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "H5Z_has_optional_filter() failed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "H5Z_has_optional_filter() failed"); if (FALSE == ignore_filters) { /* Check if the filters in the DCPL can be applied to this dataset */ if (H5Z_can_apply(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, NULL, "I/O filters can't operate on this dataset"); /* Make the "set local" filter callbacks for this dataset */ if (H5Z_set_local(new_dset->shared->dcpl_id, new_dset->shared->type_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set local filter parameters"); } /* ignore_filters */ /* Get new dataset's property list object */ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(new_dset->shared->dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get dataset creation property list"); /* Retrieve the properties we need */ pline = &new_dset->shared->dcpl_cache.pline; if (H5P_get(dc_plist, H5O_CRT_PIPELINE_NAME, pline) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve pipeline filter") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve pipeline filter"); pline_copied = TRUE; layout = &new_dset->shared->layout; if (H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve layout"); layout_copied = TRUE; fill = &new_dset->shared->dcpl_cache.fill; if (H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve fill value info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve fill value info"); fill_copied = TRUE; efl = &new_dset->shared->dcpl_cache.efl; if (H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, efl) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve external file list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't retrieve external file list"); efl_copied = TRUE; if (FALSE == ignore_filters) { /* Check that chunked layout is used if filters are enabled */ if (pline->nused > 0 && H5D_CHUNKED != layout->type) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout"); } /* Check if the alloc_time is the default and error out */ if (fill->alloc_time == H5D_ALLOC_TIME_DEFAULT) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "invalid space allocation state") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "invalid space allocation state"); /* Don't allow compact datasets to allocate space later */ if (layout->type == H5D_COMPACT && fill->alloc_time != H5D_ALLOC_TIME_EARLY) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "compact dataset must have early space allocation") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "compact dataset must have early space allocation"); } /* end if */ /* Set the version for the I/O pipeline message */ if (H5O_pline_set_version(file, &new_dset->shared->dcpl_cache.pline) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline"); /* Set the version for the fill message */ if (H5O_fill_set_version(file, &new_dset->shared->dcpl_cache.fill) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value"); /* Set the latest version for the layout message */ if (H5D__layout_set_version(file, &new_dset->shared->layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of layout"); if (new_dset->shared->layout.version >= H5O_LAYOUT_VERSION_4) { /* Use latest indexing type for layout message version >= 4 */ if (H5D__layout_set_latest_indexing(&new_dset->shared->layout, new_dset->shared->space, &new_dset->shared->dcpl_cache) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest indexing") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest indexing"); } /* end if */ /* Check if the file driver would like to force early space allocation */ @@ -1288,37 +1288,37 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, hid_t /* Set the dataset's I/O operations */ if (H5D__layout_set_io_ops(new_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations"); /* Create the layout information for the new dataset */ if (new_dset->shared->layout.ops->construct && (new_dset->shared->layout.ops->construct)(file, new_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to construct layout information"); /* Update the dataset's object header info. */ if (H5D__update_oh_info(file, new_dset, new_dset->shared->dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update the metadata cache") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't update the metadata cache"); /* Indicate that the layout information was initialized */ layout_init = TRUE; /* Set up append flush parameters for the dataset */ if (H5D__append_flush_setup(new_dset, new_dset->shared->dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set up flush append property") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to set up flush append property"); /* Set the external file prefix */ if (H5D__build_file_prefix(new_dset, H5F_PREFIX_EFILE, &new_dset->shared->extfile_prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix"); /* Set the VDS file prefix */ if (H5D__build_file_prefix(new_dset, H5F_PREFIX_VDS, &new_dset->shared->vds_prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize VDS prefix") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize VDS prefix"); /* Add the dataset to the list of opened objects in the file */ if (H5FO_top_incr(new_dset->oloc.file, new_dset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't incr object ref. count") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't incr object ref. count"); if (H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects"); new_dset->shared->fo_count = 1; /* Success */ @@ -1415,18 +1415,18 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id) /* Find the dataset object */ if (H5G_loc_find(loc, name, &dset_loc) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found") + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); loc_found = TRUE; /* Check that the object found is the correct type */ if (H5O_obj_type(&oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get object type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get object type"); if (obj_type != H5O_TYPE_DATASET) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, NULL, "not a dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, NULL, "not a dataset"); /* Open the dataset */ if (NULL == (dset = H5D_open(&dset_loc, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "can't open dataset"); /* Set return value */ ret_value = dset; @@ -1466,23 +1466,23 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id) /* Allocate the dataset structure */ if (NULL == (dataset = H5FL_CALLOC(H5D_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Shallow copy (take ownership) of the object location object */ if (H5O_loc_copy_shallow(&(dataset->oloc), loc->oloc) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy object location") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy object location"); /* Shallow copy (take ownership) of the group hier. path */ if (H5G_name_copy(&(dataset->path), loc->path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy path") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy path"); /* Get the external file prefix */ if (H5D__build_file_prefix(dataset, H5F_PREFIX_EFILE, &extfile_prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize external file prefix"); /* Get the VDS prefix */ if (H5D__build_file_prefix(dataset, H5F_PREFIX_VDS, &vds_prefix) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize VDS prefix") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize VDS prefix"); /* Check if dataset was already open */ if (NULL == (shared_fo = (H5D_shared_t *)H5FO_opened(dataset->oloc.file, dataset->oloc.addr))) { @@ -1491,15 +1491,15 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id) /* Open the dataset object */ if (H5D__open_oid(dataset, dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found") + HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, NULL, "not found"); /* Add the dataset to the list of opened objects in the file */ if (H5FO_insert(dataset->oloc.file, dataset->oloc.addr, dataset->shared, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects"); /* Increment object count for the object in the top file */ if (H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count"); /* We're the first dataset to use the shared info */ dataset->shared->fo_count = 1; @@ -1529,25 +1529,25 @@ H5D_open(const H5G_loc_t *loc, hid_t dapl_id) if (HDstrcmp(extfile_prefix, dataset->shared->extfile_prefix) != 0) HGOTO_ERROR( H5E_DATASET, H5E_CANTOPENOBJ, NULL, - "new external file prefix does not match external file prefix of already open dataset") + "new external file prefix does not match external file prefix of already open dataset"); } else { if (extfile_prefix || dataset->shared->extfile_prefix) HGOTO_ERROR( H5E_DATASET, H5E_CANTOPENOBJ, NULL, - "new external file prefix does not match external file prefix of already open dataset") + "new external file prefix does not match external file prefix of already open dataset"); } /* Check if the object has been opened through the top file yet */ if (H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) { /* Open the object through this top file */ if (H5O_open(&(dataset->oloc)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open object header"); } /* end if */ /* Increment object count for the object in the top file */ if (H5FO_top_incr(dataset->oloc.file, dataset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't increment object count"); } /* end else */ /* Set the dataset to return */ @@ -1615,7 +1615,7 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id) /* Get append flush property */ if (H5P_get(dapl, H5D_ACS_APPEND_FLUSH_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get append flush info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get append flush info"); if (info.ndims > 0) { hsize_t curr_dims[H5S_MAX_RANK]; /* current dimension sizes */ hsize_t max_dims[H5S_MAX_RANK]; /* current dimension sizes */ @@ -1624,10 +1624,10 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id) /* Get dataset rank */ if ((rank = H5S_get_simple_extent_dims(dset->shared->space, curr_dims, max_dims)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions"); if (info.ndims != (unsigned)rank) HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, - "boundary dimension rank does not match dataset rank") + "boundary dimension rank does not match dataset rank"); /* Validate boundary sizes */ for (u = 0; u < info.ndims; u++) @@ -1638,7 +1638,7 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id) /* At least one boundary dimension is not extendible */ if (u != info.ndims) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "boundary dimension is not valid") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "boundary dimension is not valid"); /* Copy append flush settings */ dset->shared->append_flush.ndims = info.ndims; @@ -1678,37 +1678,37 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) /* (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))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Open the dataset object */ if (H5O_open(&(dataset->oloc)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open"); /* Get the type and space */ if (NULL == (dataset->shared->type = (H5T_t *)H5O_msg_read(&(dataset->oloc), H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load type info from dataset header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load type info from dataset header"); if (H5T_set_loc(dataset->shared->type, H5F_VOL_OBJ(dataset->oloc.file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); if (NULL == (dataset->shared->space = H5S_read(&(dataset->oloc)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header"); /* Cache the dataset's dataspace info */ if (H5D__cache_dataspace_info(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info"); /* Get a datatype ID for the dataset's datatype */ if ((dataset->shared->type_id = H5I_register(H5I_DATATYPE, dataset->shared->type, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register type"); /* Get dataset creation property list object */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dataset->shared->dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list"); /* Get the layout/pline/efl message information */ if (H5D__layout_oh_read(dataset, dapl_id, plist) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout/pline/efl info"); /* Indicate that the layout information was initialized */ layout_init = TRUE; @@ -1730,7 +1730,8 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, + "can't get number of elements in dataset's dataspace"); dset_data_size = (size_t)dset_nelemts * dset_type_size; @@ -1742,25 +1743,25 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) /* Set up flush append property */ if (H5D__append_flush_setup(dataset, dapl_id)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set up flush append property") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set up flush append property"); /* Point at dataset's copy, to cache it for later */ fill_prop = &dataset->shared->dcpl_cache.fill; /* Try to get the new fill value message from the object header */ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_NEW_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists"); if (msg_exists) { if (NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_NEW_ID, fill_prop)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message"); } /* end if */ else { /* For backward compatibility, try to retrieve the old fill value message */ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_FILL_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists"); if (msg_exists) { if (NULL == H5O_msg_read(&(dataset->oloc), H5O_FILL_ID, fill_prop)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message"); } /* end if */ else { /* Set the space allocation time appropriately, based on the type of dataset storage */ @@ -1784,7 +1785,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "not implemented yet") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "not implemented yet"); } /* end switch */ /*lint !e788 All appropriate cases are covered */ } /* end else */ @@ -1802,9 +1803,9 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) /* Set revised fill value properties, if they are different from the defaults */ if (H5P_fill_value_cmp(&H5D_def_dset.dcpl_cache.fill, fill_prop, sizeof(H5O_fill_t))) { if (H5P_set(plist, H5D_CRT_FILL_VALUE_NAME, fill_prop) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set fill value"); if (H5P_set(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set allocation time state") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set allocation time state"); } /* end if */ /* @@ -1816,7 +1817,7 @@ H5D__open_oid(H5D_t *dataset, hid_t dapl_id) !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) && H5F_HAS_FEATURE(dataset->oloc.file, H5FD_FEAT_ALLOCATE_EARLY)) if (H5D__alloc_storage(dataset, H5D_ALLOC_OPEN, FALSE, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage"); done: if (ret_value < 0) { @@ -1957,7 +1958,7 @@ H5D_close(H5D_t *dataset) default: assert("not implemented yet" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout"); #endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ @@ -2024,17 +2025,17 @@ H5D_close(H5D_t *dataset) else { /* Decrement the ref. count for this object in the top file */ if (H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object"); /* Check reference count for this object in the top file */ if (H5FO_top_count(dataset->oloc.file, dataset->oloc.addr) == 0) { if (H5O_close(&(dataset->oloc), NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to close") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to close"); } /* end if */ else /* Free object location (i.e. "unhold" the file if appropriate) */ if (H5O_loc_free(&(dataset->oloc)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "problem attempting to free location") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "problem attempting to free location"); } /* end else */ /* Release the dataset's path info */ @@ -2047,7 +2048,7 @@ H5D_close(H5D_t *dataset) /* Check if anything failed in the middle... */ if (free_failed) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "couldn't free a component of the dataset, but the dataset was freed anyway.") + "couldn't free a component of the dataset, but the dataset was freed anyway."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2071,7 +2072,7 @@ H5D_mult_refresh_close(hid_t dset_id) FUNC_ENTER_NOAPI(FAIL) if (NULL == (dataset = (H5D_t *)H5VL_object_verify(dset_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); /* check args */ assert(dataset); @@ -2121,13 +2122,13 @@ H5D_mult_refresh_close(hid_t dset_id) default: assert("not implemented yet" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout"); #endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ if (dataset->shared->layout.ops->dest && (dataset->shared->layout.ops->dest)(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy layout info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy layout info"); } /* end if */ done: @@ -2157,23 +2158,23 @@ H5D_mult_refresh_reopen(H5D_t *dataset) if (dataset->shared->fo_count > 1) { /* Release dataspace info */ if (H5S_close(dataset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to release dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to release dataspace"); /* Re-load dataspace info */ if (NULL == (dataset->shared->space = H5S_read(&(dataset->oloc)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to load dataspace info from dataset header"); /* Cache the dataset's dataspace info */ if (H5D__cache_dataspace_info(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't cache dataspace info"); /* Release layout info */ if (H5O_msg_reset(H5O_LAYOUT_ID, &dataset->shared->layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset layout info"); /* Re-load layout message info */ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message"); } /* end if */ done: @@ -2255,7 +2256,8 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr if (layout->storage.u.contig.size > 0) { /* Reserve space in the file for the entire array */ if (H5D__contig_alloc(f, &layout->storage.u.contig /*out*/) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, + "unable to initialize contiguous storage"); /* Indicate that we should initialize storage space */ must_init_space = TRUE; @@ -2272,7 +2274,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr if (!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) { /* Create the root of the index that manages chunked storage */ if (H5D__chunk_create(dset /*in,out*/) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); /* Indicate that we set the storage addr */ addr_set = TRUE; @@ -2301,7 +2303,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr if (NULL == (layout->storage.u.compact.buf = H5MM_malloc(layout->storage.u.compact.size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate memory for compact dataset") + "unable to allocate memory for compact dataset"); if (!full_overwrite) memset(layout->storage.u.compact.buf, 0, layout->storage.u.compact.size); layout->storage.u.compact.dirty = TRUE; @@ -2330,7 +2332,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr default: assert("not implemented yet" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout"); #endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ @@ -2350,14 +2352,14 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr time_alloc == H5D_ALLOC_WRITE)) if (H5D__init_storage(dset, full_overwrite, old_dim) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize dataset with fill value") + "unable to initialize dataset with fill value"); } /* end if */ else { H5D_fill_value_t fill_status; /* The fill value status */ /* Check the dataset's fill-value status */ if (H5P_is_fill_value_defined(&dset->shared->dcpl_cache.fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* If we are filling the dataset on allocation or "if set" and * the fill value _is_ set, do that now */ @@ -2366,7 +2368,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr fill_status == H5D_FILL_VALUE_USER_DEFINED)) if (H5D__init_storage(dset, full_overwrite, old_dim) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize dataset with fill value") + "unable to initialize dataset with fill value"); } /* end else */ } /* end if */ @@ -2380,7 +2382,7 @@ H5D__alloc_storage(H5D_t *dset, H5D_time_alloc_t time_alloc, hbool_t full_overwr if (time_alloc != H5D_ALLOC_CREATE && addr_set) /* Mark the layout as dirty, for later writing to the file */ if (H5D__mark(dset, H5D_MARK_LAYOUT) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty"); } /* end if */ done: @@ -2413,7 +2415,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[]) /* Fill the compact dataset storage */ if (H5D__compact_fill(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize compact dataset storage") + "unable to initialize compact dataset storage"); } /* end if */ break; @@ -2423,7 +2425,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[]) if ((dset->shared->dcpl_cache.efl.nused == 0 || dset->shared->dcpl_cache.fill.buf) && !full_overwrite) if (H5D__contig_fill(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset"); break; case H5D_CHUNKED: @@ -2439,7 +2441,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[]) old_dim = zero_dim; if (H5D__chunk_allocate(dset, full_overwrite, old_dim) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to allocate all chunks of dataset"); break; } /* end block */ @@ -2451,7 +2453,7 @@ H5D__init_storage(H5D_t *dset, hbool_t full_overwrite, hsize_t old_dim[]) default: assert("not implemented yet" && 0); #ifdef NDEBUG - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout"); #endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ @@ -2480,7 +2482,7 @@ H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size) if ((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) { if (H5D__chunk_allocated(dset, storage_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't retrieve chunked dataset allocated size") + "can't retrieve chunked dataset allocated size"); } /* end if */ else *storage_size = 0; @@ -2507,7 +2509,7 @@ H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset type"); } /*lint !e788 All appropriate cases are covered */ done: @@ -2554,7 +2556,7 @@ H5D__get_offset(const H5D_t *dset) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "unknown dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "unknown dataset layout type"); } done: @@ -2585,7 +2587,7 @@ H5D__vlen_get_buf_size_alloc(size_t size, void *info) if (size > vlen_bufsize_com->vl_tbuf_size) { if (NULL == (vlen_bufsize_com->vl_tbuf = H5FL_BLK_REALLOC(vlen_vl_buf, vlen_bufsize_com->vl_tbuf, size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't reallocate temporary VL data buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't reallocate temporary VL data buffer"); vlen_bufsize_com->vl_tbuf_size = size; } /* end if */ @@ -2625,7 +2627,7 @@ H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ /* Select point to read in */ if (H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5_ITER_ERROR, "can't select point") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, H5_ITER_ERROR, "can't select point"); { dset_info.dset = vlen_bufsize->dset; @@ -2636,7 +2638,7 @@ H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned H5_ /* Read in the point (with the custom VL memory allocator) */ if (H5D__read(1, &dset_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data"); } done: @@ -2680,35 +2682,35 @@ H5D__vlen_get_buf_size(H5D_t *dset, hid_t type_id, hid_t space_id, hsize_t *size /* Check args */ if (NULL == (type = (H5T_t *)H5I_object(type_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); if (NULL == (space = (H5S_t *)H5I_object(space_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set"); /* Save the dataset */ vlen_bufsize.dset = dset; /* Get a copy of the dataset's dataspace */ if (NULL == (fspace = H5S_copy(dset->shared->space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to get dataspace"); vlen_bufsize.fspace = fspace; /* Create a scalar for the memory dataspace */ if (NULL == (mspace = H5S_create(H5S_SCALAR))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace"); vlen_bufsize.mspace = mspace; /* Grab the temporary buffers required */ if (NULL == (vlen_bufsize.common.fl_tbuf = H5FL_BLK_MALLOC(vlen_fl_buf, H5T_get_size(type)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available"); if (NULL == (vlen_bufsize.common.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available"); vlen_bufsize.common.vl_tbuf_size = 1; /* Set the memory manager to the special allocation routine */ if (H5CX_set_vlen_alloc_info(H5D__vlen_get_buf_size_alloc, &vlen_bufsize.common, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VL data allocation routine") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VL data allocation routine"); /* Set the initial number of bytes required */ vlen_bufsize.common.size = 0; @@ -2774,22 +2776,22 @@ H5D__vlen_get_buf_size_gen_cb(void H5_ATTR_UNUSED *elem, hid_t type_id, unsigned /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object(type_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a datatype"); /* Make certain there is enough fixed-length buffer available */ if (NULL == (vlen_bufsize->common.fl_tbuf = H5FL_BLK_REALLOC(vlen_fl_buf, vlen_bufsize->common.fl_tbuf, H5T_get_size(dt)))) - HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't resize tbuf") + HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't resize tbuf"); /* Select point to read in */ if (H5S_select_elements(vlen_bufsize->fspace, H5S_SELECT_SET, (size_t)1, point) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't select point") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't select point"); /* Read in the point (with the custom VL memory allocator) */ if (H5VL_dataset_read(1, &vlen_bufsize->dset_vol_obj, &type_id, &vlen_bufsize->mspace_id, &vlen_bufsize->fspace_id, vlen_bufsize->dxpl_id, &vlen_bufsize->common.fl_tbuf, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read point") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read point"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2823,11 +2825,11 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id /* Check args */ if (NULL == (type = (H5T_t *)H5I_object(type_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not an valid datatype") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not an valid datatype"); if (NULL == (space = (H5S_t *)H5I_object(space_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid dataspace"); if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dataspace does not have extent set") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "dataspace does not have extent set"); /* Save the dataset */ vlen_bufsize.dset_vol_obj = (const H5VL_object_t *)vol_obj; @@ -2838,33 +2840,33 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id /* Get a copy of the dataset's dataspace */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace"); vlen_bufsize.fspace_id = vol_cb_args.args.get_space.space_id; if (NULL == (vlen_bufsize.fspace = (H5S_t *)H5I_object(vlen_bufsize.fspace_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataspace"); /* Create a scalar for the memory dataspace */ if (NULL == (mspace = H5S_create(H5S_SCALAR))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create dataspace"); if ((vlen_bufsize.mspace_id = H5I_register(H5I_DATASPACE, mspace, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); /* Grab the temporary buffers required */ if (NULL == (vlen_bufsize.common.fl_tbuf = H5FL_BLK_MALLOC(vlen_fl_buf, H5T_get_size(type)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "no temporary buffers available") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "no temporary buffers available"); if (NULL == (vlen_bufsize.common.vl_tbuf = H5FL_BLK_MALLOC(vlen_vl_buf, (size_t)1))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "no temporary buffers available") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "no temporary buffers available"); vlen_bufsize.common.vl_tbuf_size = 1; /* Set the VL allocation callbacks on a DXPL */ if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get default DXPL") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get default DXPL"); if ((vlen_bufsize.dxpl_id = H5P_copy_plist(dxpl, TRUE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy property list"); if (NULL == (dxpl = (H5P_genplist_t *)H5I_object(vlen_bufsize.dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get copied DXPL") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get copied DXPL"); if (H5P_set_vlen_mem_manager(dxpl, H5D__vlen_get_buf_size_alloc, &vlen_bufsize.common, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VL data allocation routine on DXPL") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VL data allocation routine on DXPL"); /* Set the initial number of bytes required */ vlen_bufsize.common.size = 0; @@ -2940,7 +2942,7 @@ H5D__check_filters(H5D_t *dataset) /* Retrieve the "defined" status of the fill value */ if (H5P_is_fill_value_defined(fill, &fill_status) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Couldn't retrieve fill value from dataset.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Couldn't retrieve fill value from dataset."); /* See if we can check the filter status */ if (fill_status == H5D_FILL_VALUE_DEFAULT || fill_status == H5D_FILL_VALUE_USER_DEFINED) { @@ -2948,7 +2950,7 @@ H5D__check_filters(H5D_t *dataset) (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) { /* Filters must have encoding enabled. Ensure that all filters can be applied */ if (H5Z_can_apply(dataset->shared->dcpl_id, dataset->shared->type_id) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters"); dataset->shared->checked_filters = TRUE; } /* end if */ @@ -2985,18 +2987,18 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) /* Check if we are allowed to modify this file */ if (0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Check if we are allowed to modify the space; only datasets with chunked and external storage are * allowed to be modified */ if (H5D_COMPACT == dset->shared->layout.type) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "dataset has compact storage"); if (H5D_CONTIGUOUS == dset->shared->layout.type && 0 == dset->shared->dcpl_cache.efl.nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "dataset has contiguous storage"); /* Check if the filters in the DCPL will need to encode, and if so, can they? */ if (H5D__check_filters(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters"); /* Keep the current dataspace dimensions for later */ HDcompile_assert(sizeof(curr_dims) == sizeof(dset->shared->curr_dims)); @@ -3004,7 +3006,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) /* Modify the size of the dataspace */ if ((changed = H5S_set_extent(dset->shared->space, size)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); /* Don't bother updating things, unless they've changed */ if (changed) { @@ -3026,7 +3028,8 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) /* Compute the scaled dimension size value */ if (dset->shared->layout.u.chunk.dim[dim_idx] == 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", dim_idx) + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk size must be > 0, dim = %u ", + dim_idx); scaled = size[dim_idx] / dset->shared->layout.u.chunk.dim[dim_idx]; @@ -3046,7 +3049,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) update_chunks = TRUE; if (!(scaled_power2up = H5VM_power2up(scaled))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2"); /* Check if the number of bits required to encode the scaled size value changed */ if (dset->shared->cache.chunk.scaled_power2up[dim_idx] != scaled_power2up) { @@ -3073,13 +3076,13 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) if (H5D_CHUNKED == dset->shared->layout.type) { /* Set the cached chunk info */ if (H5D__chunk_set_info(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks"); /* Check if updating the chunk cache indices is necessary */ if (update_chunks) /* Update the chunk cache indices */ if (H5D__chunk_update_cache(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices"); } /* end if */ /* Operations for virtual datasets */ @@ -3088,21 +3091,21 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) if (H5D_virtual_check_min_dims(dset) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual dataset dimensions not large enough to contain all limited dimensions " - "in all selections") + "in all selections"); /* Patch the virtual selection dataspaces */ for (u = 0; u < dset->shared->layout.storage.u.virt.list_nused; u++) { /* Patch extent */ if (H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].source_dset.virtual_select, size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); dset->shared->layout.storage.u.virt.list[u].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; /* Patch sub-source datasets */ for (v = 0; v < dset->shared->layout.storage.u.virt.list[u].sub_dset_nused; v++) if (H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].sub_dset[v].virtual_select, size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); } /* end for */ /* Mark virtual datasets as not fully initialized so internal @@ -3113,7 +3116,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) /* Allocate space for the new parts of the dataset, if appropriate */ if (expand && dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY) if (H5D__alloc_storage(dset, H5D_ALLOC_EXTEND, FALSE, curr_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset storage"); /*------------------------------------------------------------------------- * Remove chunk information in the case of chunked datasets @@ -3127,7 +3130,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) (*dset->shared->layout.ops->is_data_cached)(dset->shared)))) /* Remove excess chunks */ if (H5D__chunk_prune_by_extent(dset, curr_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks"); /* Update chunks that are no longer edge chunks as a result of * expansion */ @@ -3135,12 +3138,12 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) (dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) && (dset->shared->dcpl_cache.pline.nused > 0)) if (H5D__chunk_update_old_edge_chunks(dset, curr_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to do update old edge chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to do update old edge chunks"); } /* end if */ /* Mark the dataspace as dirty, for later writing to the file */ if (H5D__mark(dset, H5D_MARK_SPACE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty"); } /* end if */ done: @@ -3175,7 +3178,7 @@ H5D__flush_sieve_buf(H5D_t *dataset) if (H5F_shared_block_write( H5F_SHARED(dataset->oloc.file), H5FD_MEM_DRAW, dataset->shared->cache.contig.sieve_loc, dataset->shared->cache.contig.sieve_size, dataset->shared->cache.contig.sieve_buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "block write failed"); /* Reset sieve buffer dirty flag */ dataset->shared->cache.contig.sieve_dirty = FALSE; @@ -3209,7 +3212,7 @@ H5D__flush_real(H5D_t *dataset) if (!dataset->shared->closing) /* Flush cached raw data for each kind of dataset layout */ if (dataset->shared->layout.ops->flush && (dataset->shared->layout.ops->flush)(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -3238,15 +3241,15 @@ H5D__flush(H5D_t *dset, hid_t dset_id) /* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache. * Leave this situation for the future solution */ if (H5F_HAS_FEATURE(dset->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel"); /* Flush any dataset information still cached in memory */ if (H5D__flush_real(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush cached dataset info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush cached dataset info"); /* Flush object's metadata to file */ if (H5O_flush_common(&dset->oloc, dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset and object flush callback") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset and object flush callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3283,7 +3286,7 @@ H5D__format_convert(H5D_t *dataset) 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate buffer"); /* Set up the current index info */ idx_info.f = dataset->oloc.file; @@ -3311,7 +3314,7 @@ H5D__format_convert(H5D_t *dataset) if (new_idx_info.storage->ops->init && (new_idx_info.storage->ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information"); init_new_index = TRUE; /* If the current chunk index exists */ @@ -3319,30 +3322,30 @@ H5D__format_convert(H5D_t *dataset) /* Create v1 B-tree chunk index */ if ((new_idx_info.storage->ops->create)(&new_idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index"); /* Iterate over the chunks in the current index and insert the chunk addresses * into the version 1 B-tree chunk index */ if (H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate/convert chunk index") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate/convert chunk index"); } /* end if */ /* Delete the old "current" layout message */ if (H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message"); delete_old_layout = TRUE; /* Append the new layout message to the object header */ if (H5O_msg_create(&dataset->oloc, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, newlayout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout header message"); add_new_layout = TRUE; /* Release the old (current) chunk index */ if (idx_info.storage->ops->dest && (idx_info.storage->ops->dest)(&idx_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info"); /* Copy the new layout to the dataset's layout */ H5MM_memcpy(&dataset->shared->layout, newlayout, sizeof(H5O_layout_t)); @@ -3355,18 +3358,18 @@ H5D__format_convert(H5D_t *dataset) 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) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message"); break; case H5D_VIRTUAL: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "virtual dataset layout not supported") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "virtual dataset layout not supported"); case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type"); default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type"); } /* end switch */ done: @@ -3434,12 +3437,12 @@ H5D__mark(const H5D_t *dataset, unsigned flags) /* Pin the object header */ if (NULL == (oh = H5O_pin(&dataset->oloc))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header"); /* Update the layout on disk, if it's been changed */ if (flags & H5D_MARK_LAYOUT) { if (H5D__layout_oh_write(dataset, oh, update_flags) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout info") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout info"); /* Reset the "update the modification time" flag, so we only do it once */ update_flags = 0; @@ -3448,7 +3451,7 @@ H5D__mark(const H5D_t *dataset, unsigned flags) /* Update the dataspace on disk, if it's been changed */ if (flags & H5D_MARK_SPACE) { if (H5S_write(dataset->oloc.file, oh, update_flags, dataset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace"); /* Reset the "update the modification time" flag, so we only do it once */ update_flags = 0; @@ -3493,7 +3496,7 @@ H5D__flush_all_cb(void *_dataset, hid_t H5_ATTR_UNUSED id, void *_udata) if (f == dataset->oloc.file) /* Flush the dataset's information */ if (H5D__flush_real(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to flush cached dataset info") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to flush cached dataset info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3520,7 +3523,7 @@ H5D_flush_all(H5F_t *f) /* Iterate over all the open datasets */ if (H5I_iterate(H5I_DATASET, H5D__flush_all_cb, f, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to flush cached dataset info") + HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to flush cached dataset info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3552,21 +3555,21 @@ H5D_get_create_plist(const H5D_t *dset) /* Check args */ if (NULL == (dcpl_plist = (H5P_genplist_t *)H5I_object(dset->shared->dcpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list"); /* Copy the creation property list */ if ((new_dcpl_id = H5P_copy_plist(dcpl_plist, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to copy the creation property list"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dcpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list"); /* Retrieve any object creation properties */ if (H5O_get_create_plist(&dset->oloc, new_plist) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object creation info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object creation info"); /* Get the layout property */ if (H5P_peek(new_plist, H5D_CRT_LAYOUT_NAME, &copied_layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get layout"); /* Reset layout values set when dataset is created */ copied_layout.ops = NULL; @@ -3590,7 +3593,7 @@ H5D_get_create_plist(const H5D_t *dset) /* Reset address and pointer of the array struct for the chunked storage index */ if (H5D_chunk_idx_reset(&copied_layout.storage.u.chunk, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to reset chunked storage index in dest") + "unable to reset chunked storage index in dest"); /* Reset chunk index ops */ copied_layout.storage.u.chunk.ops = NULL; @@ -3609,11 +3612,11 @@ H5D_get_create_plist(const H5D_t *dset) /* Set back the (possibly modified) layout property to property list */ if (H5P_poke(new_plist, H5D_CRT_LAYOUT_NAME, &copied_layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set layout"); /* Get the fill value property */ if (H5P_peek(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fill value"); /* Check if there is a fill value, but no type yet */ if (copied_fill.buf != NULL && copied_fill.type == NULL) { @@ -3621,12 +3624,12 @@ H5D_get_create_plist(const H5D_t *dset) /* Copy the dataset type into the fill value message */ if (NULL == (copied_fill.type = H5T_copy(dset->shared->type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy dataset datatype for fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy dataset datatype for fill value"); /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(dset->shared->type, copied_fill.type))) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dest data types") + "unable to convert between src and dest data types"); /* Convert disk form of fill value into memory form */ if (!H5T_path_noop(tpath)) { @@ -3637,11 +3640,11 @@ H5D_get_create_plist(const H5D_t *dset) /* Wrap copies of types to convert */ dst_id = H5I_register(H5I_DATATYPE, H5T_copy(copied_fill.type, H5T_COPY_TRANSIENT), FALSE); if (dst_id < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy/register datatype"); src_id = H5I_register(H5I_DATATYPE, H5T_copy(dset->shared->type, H5T_COPY_ALL), FALSE); if (src_id < 0) { H5I_dec_ref(dst_id); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy/register datatype"); } /* end if */ /* Allocate a background buffer */ @@ -3649,7 +3652,7 @@ H5D_get_create_plist(const H5D_t *dset) if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) { H5I_dec_ref(src_id); H5I_dec_ref(dst_id); - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed"); } /* end if */ /* Convert fill value */ @@ -3659,14 +3662,14 @@ H5D_get_create_plist(const H5D_t *dset) H5I_dec_ref(dst_id); if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); } /* end if */ /* Release local resources */ if (H5I_dec_ref(src_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object"); if (H5I_dec_ref(dst_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to close temporary object"); if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); } /* end if */ @@ -3674,11 +3677,11 @@ H5D_get_create_plist(const H5D_t *dset) /* Set back the (possibly modified) fill value property to property list */ if (H5P_poke(new_plist, H5D_CRT_FILL_VALUE_NAME, &copied_fill) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set fill value"); /* Get the fill value property */ if (H5P_peek(new_plist, H5D_CRT_EXT_FILE_LIST_NAME, &copied_efl) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get external file list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get external file list"); /* Reset efl name_offset and heap_addr, these are the values when the dataset is created */ if (copied_efl.slot) { @@ -3691,7 +3694,7 @@ H5D_get_create_plist(const H5D_t *dset) /* Set back the (possibly modified) external file list property to property list */ if (H5P_poke(new_plist, H5D_CRT_EXT_FILE_LIST_NAME, &copied_efl) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set external file list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set external file list"); /* Set the return value */ ret_value = new_dcpl_id; @@ -3736,87 +3739,87 @@ H5D_get_access_plist(const H5D_t *dset) /* Make a copy of the dataset's dataset access property list */ if (NULL == (old_plist = (H5P_genplist_t *)H5I_object(dset->shared->dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list"); if ((new_dapl_id = H5P_copy_plist(old_plist, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy dataset access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy dataset access property list"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_dapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* If the dataset is chunked then copy the rdcc & append flush parameters. * Otherwise, use the default values. */ if (dset->shared->layout.type == H5D_CHUNKED) { if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(dset->shared->cache.chunk.nslots)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots"); if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(dset->shared->cache.chunk.nbytes_max)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size"); if (H5P_set(new_plist, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &(dset->shared->cache.chunk.w0)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks"); if (H5P_set(new_plist, H5D_ACS_APPEND_FLUSH_NAME, &dset->shared->append_flush) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set append flush property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set append flush property"); } else { /* Get the default FAPL */ if (NULL == (def_dapl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_ID_g))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a property list"); /* Set the data cache number of slots to the value of the default FAPL */ if (H5P_get(def_dapl, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &def_chunk_info.nslots) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data number of slots"); if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &def_chunk_info.nslots) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache number of slots") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache number of slots"); /* Set the data cache byte size to the value of the default FAPL */ if (H5P_get(def_dapl, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &def_chunk_info.nbytes_max) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data cache byte size"); if (H5P_set(new_plist, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, &def_chunk_info.nbytes_max) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache byte size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set data cache byte size"); /* Set the preempt read chunks property to the value of the default FAPL */ if (H5P_get(def_dapl, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &def_chunk_info.w0) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get preempt read chunks"); if (H5P_set(new_plist, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, &def_chunk_info.w0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set preempt read chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set preempt read chunks"); /* Set the append flush property to its default value */ if (H5P_set(new_plist, H5D_ACS_APPEND_FLUSH_NAME, &def_append_flush_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set append flush property") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set append flush property"); } /* end if-else */ /* If the dataset is virtual then copy the VDS view & printf gap options. * Otherwise, use the default values. */ if (dset->shared->layout.type == H5D_VIRTUAL) { if (H5P_set(new_plist, H5D_ACS_VDS_VIEW_NAME, &(dset->shared->layout.storage.u.virt.view)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VDS view") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VDS view"); if (H5P_set(new_plist, H5D_ACS_VDS_PRINTF_GAP_NAME, &(dset->shared->layout.storage.u.virt.printf_gap)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VDS printf gap") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VDS printf gap"); } else { /* Get the default FAPL if necessary */ if (!def_dapl && NULL == (def_dapl = (H5P_genplist_t *)H5I_object(H5P_LST_DATASET_ACCESS_ID_g))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a property list"); /* Set the data cache number of slots to the value of the default FAPL */ if (H5P_get(def_dapl, H5D_ACS_VDS_VIEW_NAME, &def_vds_view) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS view"); if (H5P_set(new_plist, H5D_ACS_VDS_VIEW_NAME, &def_vds_view) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VDS view") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VDS view"); /* Set the data cache byte size to the value of the default FAPL */ if (H5P_get(def_dapl, H5D_ACS_VDS_PRINTF_GAP_NAME, &def_vds_gap) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS printf gap"); if (H5P_set(new_plist, H5D_ACS_VDS_PRINTF_GAP_NAME, &def_vds_gap) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VDS printf gap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VDS printf gap"); } /* Set the vds prefix option */ if (H5P_set(new_plist, H5D_ACS_VDS_PREFIX_NAME, &(dset->shared->vds_prefix)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set vds prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set vds prefix"); /* Set the external file prefix option */ if (H5P_set(new_plist, H5D_ACS_EFILE_PREFIX_NAME, &(dset->shared->extfile_prefix)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set external file prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set external file prefix"); /* Set the return value */ ret_value = new_dapl_id; @@ -3850,15 +3853,15 @@ H5D__get_space(const H5D_t *dset) /* If the layout is virtual, update the extent */ if (dset->shared->layout.type == H5D_VIRTUAL) if (H5D__virtual_set_extent_unlim(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent"); /* Read the dataspace message and return a dataspace object */ if (NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace"); /* Create an ID */ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace"); done: if (ret_value < 0) @@ -3889,19 +3892,19 @@ H5D__get_type(const H5D_t *dset) /* Patch the datatype's "top level" file pointer */ if (H5T_patch_file(dset->shared->type, dset->oloc.file) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer"); /* Copy the dataset's datatype */ if (NULL == (dt = H5T_copy_reopen(dset->shared->type))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype"); /* Mark any datatypes as being in memory now */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); /* Lock copied type */ if (H5T_lock(dt, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to lock transient datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to lock transient datatype"); /* Create an ID */ if (H5T_is_named(dt)) { @@ -3910,10 +3913,10 @@ H5D__get_type(const H5D_t *dset) * returned datatype. */ if ((ret_value = H5VL_wrap_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype"); } /* end if */ else if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register datatype"); done: if (ret_value < 0) @@ -3948,17 +3951,17 @@ H5D__refresh(H5D_t *dset, hid_t dset_id) if (dset->shared->layout.type == H5D_VIRTUAL) { /* Hold open the source datasets' files */ if (H5D__virtual_hold_source_dset_files(dset, &head) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "unable to hold VDS source files open") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, FAIL, "unable to hold VDS source files open"); virt_dsets_held = TRUE; /* Refresh source datasets for virtual dataset */ if (H5D__virtual_refresh_source_dsets(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh VDS source datasets") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh VDS source datasets"); } /* end if */ /* Refresh dataset object */ if ((H5O_refresh_metadata(&dset->oloc, dset_id)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh dataset"); done: /* Release hold on (source) virtual datasets' files */ diff --git a/src/H5Dio.c b/src/H5Dio.c index 24c7be9..89afde5 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -109,12 +109,12 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Init io_info */ if (H5D__ioinfo_init(count, H5D_IO_OP_READ, dset_info, &io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info"); /* Allocate store buffer if necessary */ if (count > 1) if (NULL == (store = (H5D_storage_t *)H5MM_malloc(count * sizeof(H5D_storage_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset storage info array buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset storage info array buffer"); #ifdef H5_HAVE_PARALLEL /* Check for non-MPI-based VFD. Only need to check first dataset since all @@ -124,11 +124,11 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Get I/O transfer mode */ if (H5CX_get_io_xfer_mode(&io_xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Collective access is not permissible without a MPI based VFD */ if (io_xfer_mode == H5FD_MPIO_COLLECTIVE) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based drivers only") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based drivers only"); } /* end if */ #endif /*H5_HAVE_PARALLEL*/ @@ -138,29 +138,29 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* check args */ if (NULL == dset_info[i].dset) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); if (NULL == dset_info[i].dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* set metadata tagging with dset oheader addr */ H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag); /* Set up datatype info for operation */ if (H5D__typeinfo_init(&io_info, &(dset_info[i]), dset_info[i].mem_type_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info"); /* Make certain that the number of elements in each selection is the same, and cache nelmts in * dset_info */ dset_info[i].nelmts = H5S_GET_SELECT_NPOINTS(dset_info[i].mem_space); if (dset_info[i].nelmts != H5S_GET_SELECT_NPOINTS(dset_info[i].file_space)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "src and dest dataspaces have different number of elements selected") + "src and dest dataspaces have different number of elements selected"); /* Check for a NULL buffer */ if (NULL == dset_info[i].buf.vp) { /* Check for any elements selected (which is invalid) */ if (dset_info[i].nelmts > 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer"); /* If the buffer is nil, and 0 element is selected, make a fake buffer. * This is for some MPI package like ChaMPIon on NCSA's tungsten which @@ -171,9 +171,9 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Make sure that both selections have their extents set */ if (!(H5S_has_extent(dset_info[i].file_space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set"); if (!(H5S_has_extent(dset_info[i].mem_space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set"); /* H5S_select_shape_same() has been modified to accept topologically identical * selections with different rank as having the same shape (if the most @@ -199,7 +199,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Allocate buffer */ if (NULL == (orig_mem_space = (H5S_t **)H5MM_calloc(count * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate original memory space array buffer") + "couldn't allocate original memory space array buffer"); } else /* Use local buffer */ @@ -214,7 +214,8 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) if (H5S_select_construct_projection(orig_mem_space[i], &dset_info[i].mem_space, (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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to construct projected memory dataspace"); assert(dset_info[i].mem_space); /* Adjust the buffer by the given amount */ @@ -236,14 +237,14 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Retrieve dataset's fill-value properties */ if (H5P_is_fill_value_defined(&dset_info[i].dset->shared->dcpl_cache.fill, &fill_status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* Should be impossible, but check anyway... */ if (fill_status == H5D_FILL_VALUE_UNDEFINED && (dset_info[i].dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC || dset_info[i].dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET)) HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, - "read failed: dataset doesn't exist, no data can be read") + "read failed: dataset doesn't exist, no data can be read"); /* If we're never going to fill this dataset, just leave the junk in the user's buffer */ if (dset_info[i].dset->shared->dcpl_cache.fill.fill_time != H5D_FILL_TIME_NEVER) @@ -251,7 +252,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) if (H5D__fill(dset_info[i].dset->shared->dcpl_cache.fill.buf, dset_info[i].dset->shared->type, dset_info[i].buf.vp, dset_info[i].type_info.mem_type, dset_info[i].mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed"); /* No need to perform any more I/O for this dataset */ dset_info[i].skip_io = TRUE; @@ -260,7 +261,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) else { /* Set up I/O operation */ if (H5D__dset_ioinfo_init(dset_info[i].dset, &(dset_info[i]), &(store[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation"); /* Sanity check that space is allocated, if there are elements */ if (dset_info[i].nelmts > 0) @@ -275,7 +276,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Call storage method's I/O initialization routine */ if (dset_info[i].layout_ops.io_init && (dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info"); dset_info[i].skip_io = FALSE; io_op_init++; @@ -292,18 +293,18 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Perform second phase of type info initialization */ if (H5D__typeinfo_init_phase2(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (second phase)") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (second phase)"); #ifdef H5_HAVE_PARALLEL /* Adjust I/O info for any parallel or selection I/O */ if (H5D__ioinfo_adjust(&io_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to adjust I/O info for parallel or selection I/O") + "unable to adjust I/O info for parallel or selection I/O"); #endif /* H5_HAVE_PARALLEL */ /* Perform third phase of type info initialization */ if (H5D__typeinfo_init_phase3(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (third phase)") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (third phase)"); H5CX_set_no_selection_io_cause(io_info.no_selection_io_cause); @@ -318,7 +319,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Allocate sel_pieces array */ if (NULL == (io_info.sel_pieces = H5MM_malloc(io_info.piece_count * sizeof(io_info.sel_pieces[0])))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate array of selected pieces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate array of selected pieces"); } /* MDIO-specific second phase initialization */ @@ -331,7 +332,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Make second phase IO init call */ if ((dset_info[i].layout_ops.mdio_init)(&io_info, &(dset_info[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't populate array of selected pieces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't populate array of selected pieces"); /* Reset metadata tagging */ H5AC_tag(prev_tag, NULL); @@ -339,7 +340,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Invoke correct "high level" I/O routine */ if ((*io_info.md_io_ops.multi_read_md)(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data"); } /* end if */ else { haddr_t prev_tag = HADDR_UNDEF; @@ -348,23 +349,24 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) if (!H5D_LAYOUT_CB_PERFORM_IO(&io_info) && io_info.piece_count > 0) { if (NULL == (io_info.mem_spaces = H5MM_malloc(io_info.piece_count * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for memory space list") + "memory allocation failed for memory space list"); if (NULL == (io_info.file_spaces = H5MM_malloc(io_info.piece_count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for file space list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "memory allocation failed for file space list"); if (NULL == (io_info.addrs = H5MM_malloc(io_info.piece_count * sizeof(haddr_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for piece address list") + "memory allocation failed for piece address list"); if (NULL == (io_info.element_sizes = H5MM_malloc(io_info.piece_count * sizeof(size_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for element size list") + "memory allocation failed for element size list"); if (NULL == (io_info.rbufs = H5MM_malloc(io_info.piece_count * sizeof(void *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for read buffer list") + "memory allocation failed for read buffer list"); if (io_info.max_tconv_type_size > 0) if (NULL == (io_info.sel_pieces = H5MM_malloc(io_info.piece_count * sizeof(io_info.sel_pieces[0])))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to allocate array of selected pieces") + "unable to allocate array of selected pieces"); } /* Loop with serial & single-dset read IO path */ @@ -378,7 +380,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Invoke correct "high level" I/O routine */ if ((*dset_info[i].io_ops.multi_read)(&io_info, &dset_info[i]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data"); /* Reset metadata tagging */ H5AC_tag(prev_tag, NULL); @@ -391,7 +393,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) if (io_info.max_tconv_type_size > 0) { /* Type conversion pathway */ if (H5D__scatgath_read_select(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "type conversion selection read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "type conversion selection read failed"); } else { /* Call selection I/O directly */ @@ -399,7 +401,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) if (H5F_shared_select_read(io_info.f_sh, H5FD_MEM_DRAW, (uint32_t)io_info.pieces_added, io_info.mem_spaces, io_info.file_spaces, io_info.addrs, io_info.element_sizes, io_info.rbufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read failed"); } } @@ -410,7 +412,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info) /* Get the parallel I/O transfer mode */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Only report the collective I/O mode if we're actually performing collective I/O */ if (xfer_mode == H5FD_MPIO_COLLECTIVE) @@ -506,12 +508,12 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Init io_info */ if (H5D__ioinfo_init(count, H5D_IO_OP_WRITE, dset_info, &io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info"); /* Allocate store buffer if necessary */ if (count > 1) if (NULL == (store = (H5D_storage_t *)H5MM_malloc(count * sizeof(H5D_storage_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset storage info array buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset storage info array buffer"); /* iterate over all dsets and construct I/O information */ for (i = 0; i < count; i++) { @@ -520,9 +522,9 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* check args */ if (NULL == dset_info[i].dset) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); if (NULL == dset_info[i].dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* set metadata tagging with dset oheader addr */ H5AC_tag(dset_info[i].dset->oloc.addr, &prev_tag); @@ -530,18 +532,18 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* All filters in the DCPL must have encoding enabled. */ if (!dset_info[i].dset->shared->checked_filters) { if (H5Z_can_apply(dset_info[i].dset->shared->dcpl_id, dset_info[i].dset->shared->type_id) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters"); dset_info[i].dset->shared->checked_filters = TRUE; } /* end if */ /* Check if we are allowed to write to this file */ if (0 == (H5F_INTENT(dset_info[i].dset->oloc.file) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Set up datatype info for operation */ if (H5D__typeinfo_init(&io_info, &(dset_info[i]), dset_info[i].mem_type_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info"); /* Various MPI based checks */ #ifdef H5_HAVE_PARALLEL @@ -551,18 +553,19 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* support parallel access of that yet */ if (H5T_is_vl_storage(dset_info[i].type_info.mem_type) > 0) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "Parallel IO does not support writing VL or region reference datatypes yet") + "Parallel IO does not support writing VL or region reference datatypes yet"); } /* end if */ else { H5FD_mpio_xfer_t io_xfer_mode; /* MPI I/O transfer mode */ /* Get I/O transfer mode */ if (H5CX_get_io_xfer_mode(&io_xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Collective access is not permissible without a MPI based VFD */ if (io_xfer_mode == H5FD_MPIO_COLLECTIVE) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access for MPI-based driver only") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, + "collective access for MPI-based driver only"); } /* end else */ #endif /*H5_HAVE_PARALLEL*/ @@ -571,13 +574,13 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) dset_info[i].nelmts = H5S_GET_SELECT_NPOINTS(dset_info[i].mem_space); if (dset_info[i].nelmts != H5S_GET_SELECT_NPOINTS(dset_info[i].file_space)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "src and dest dataspaces have different number of elements selected") + "src and dest dataspaces have different number of elements selected"); /* Check for a NULL buffer */ if (NULL == dset_info[i].buf.cvp) { /* Check for any elements selected (which is invalid) */ if (dset_info[i].nelmts > 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer"); /* If the buffer is nil, and 0 element is selected, make a fake buffer. * This is for some MPI package like ChaMPIon on NCSA's tungsten which @@ -588,9 +591,9 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Make sure that both selections have their extents set */ if (!(H5S_has_extent(dset_info[i].file_space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file dataspace does not have extent set"); if (!(H5S_has_extent(dset_info[i].mem_space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memory dataspace does not have extent set"); /* H5S_select_shape_same() has been modified to accept topologically * identical selections with different rank as having the same shape @@ -616,7 +619,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Allocate buffer */ if (NULL == (orig_mem_space = (H5S_t **)H5MM_calloc(count * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate original memory space array buffer") + "couldn't allocate original memory space array buffer"); } else /* Use local buffer */ @@ -631,7 +634,8 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) if (H5S_select_construct_projection(orig_mem_space[i], &dset_info[i].mem_space, (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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to construct projected memory dataspace"); assert(dset_info[i].mem_space); /* Adjust the buffer by the given amount */ @@ -643,7 +647,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Set up I/O operation */ if (H5D__dset_ioinfo_init(dset_info[i].dset, &(dset_info[i]), &(store[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation"); /* Allocate dataspace and initialize it if it hasn't been. */ should_alloc_space = dset_info[i].dset->shared->dcpl_cache.efl.nused == 0 && @@ -667,7 +671,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Get the number of elements in file dataset's dataspace */ if ((file_nelmts = H5S_GET_EXTENT_NPOINTS(dset_info[i].file_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, - "can't retrieve number of elements in file dataset") + "can't retrieve number of elements in file dataset"); /* Always allow fill values to be written if the dataset has a VL datatype */ if (H5T_detect_class(dset_info[i].dset->shared->type, H5T_VLEN, FALSE)) @@ -677,14 +681,14 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Allocate storage */ if (H5D__alloc_storage(dset_info[i].dset, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage"); } /* end if */ /* Call storage method's I/O initialization routine */ /* Init io_info.dset_info[] and generate piece_info in skip list */ if (dset_info[i].layout_ops.io_init && (*dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info"); dset_info[i].skip_io = FALSE; io_op_init++; @@ -696,18 +700,18 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Perform second phase of type info initialization */ if (H5D__typeinfo_init_phase2(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (second phase)") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (second phase)"); #ifdef H5_HAVE_PARALLEL /* Adjust I/O info for any parallel or selection I/O */ if (H5D__ioinfo_adjust(&io_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to adjust I/O info for parallel or selection I/O") + "unable to adjust I/O info for parallel or selection I/O"); #endif /* H5_HAVE_PARALLEL */ /* Perform third phase of type info initialization */ if (H5D__typeinfo_init_phase3(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (third phase)") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info (third phase)"); H5CX_set_no_selection_io_cause(io_info.no_selection_io_cause); @@ -722,7 +726,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Allocate sel_pieces array */ if (NULL == (io_info.sel_pieces = H5MM_malloc(io_info.piece_count * sizeof(io_info.sel_pieces[0])))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate array of selected pieces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate array of selected pieces"); } /* MDIO-specific second phase initialization */ @@ -735,7 +739,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Make second phase IO init call */ if ((dset_info[i].layout_ops.mdio_init)(&io_info, &(dset_info[i])) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't populate array of selected pieces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't populate array of selected pieces"); /* Reset metadata tagging */ H5AC_tag(prev_tag, NULL); @@ -743,7 +747,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Invoke correct "high level" I/O routine */ if ((*io_info.md_io_ops.multi_write_md)(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data"); } /* end if */ else { haddr_t prev_tag = HADDR_UNDEF; @@ -752,23 +756,24 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) if (!H5D_LAYOUT_CB_PERFORM_IO(&io_info) && io_info.piece_count > 0) { if (NULL == (io_info.mem_spaces = H5MM_malloc(io_info.piece_count * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for memory space list") + "memory allocation failed for memory space list"); if (NULL == (io_info.file_spaces = H5MM_malloc(io_info.piece_count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for file space list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "memory allocation failed for file space list"); if (NULL == (io_info.addrs = H5MM_malloc(io_info.piece_count * sizeof(haddr_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for piece address list") + "memory allocation failed for piece address list"); if (NULL == (io_info.element_sizes = H5MM_malloc(io_info.piece_count * sizeof(size_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for element size list") + "memory allocation failed for element size list"); if (NULL == (io_info.wbufs = H5MM_malloc(io_info.piece_count * sizeof(const void *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for write buffer list") + "memory allocation failed for write buffer list"); if (io_info.max_tconv_type_size > 0) if (NULL == (io_info.sel_pieces = H5MM_malloc(io_info.piece_count * sizeof(io_info.sel_pieces[0])))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to allocate array of selected pieces") + "unable to allocate array of selected pieces"); } /* loop with serial & single-dset write IO path */ @@ -780,7 +785,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Invoke correct "high level" I/O routine */ if ((*dset_info[i].io_ops.multi_write)(&io_info, &dset_info[i]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data"); /* Reset metadata tagging */ H5AC_tag(prev_tag, NULL); @@ -793,7 +798,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) if (io_info.max_tconv_type_size > 0) { /* Type conversion pathway */ if (H5D__scatgath_write_select(&io_info) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "type conversion selection write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "type conversion selection write failed"); } else { /* Call selection I/O directly */ @@ -801,7 +806,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) if (H5F_shared_select_write(io_info.f_sh, H5FD_MEM_DRAW, (uint32_t)io_info.pieces_added, io_info.mem_spaces, io_info.file_spaces, io_info.addrs, io_info.element_sizes, io_info.wbufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "selection write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "selection write failed"); } } @@ -812,7 +817,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info) /* Get the parallel I/O transfer mode */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Only report the collective I/O mode if we're actually performing collective I/O */ if (xfer_mode == H5FD_MPIO_COLLECTIVE) { @@ -1021,14 +1026,14 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t /* 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer"); /* Initialize type info safely */ 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))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); type_info->dset_type = dset->shared->type; if (io_info->op_type == H5D_IO_OP_WRITE) { @@ -1052,11 +1057,11 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t * turns off background preservation. */ if (NULL == (type_info->tpath = H5T_path_find(src_type, dst_type))) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype"); /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); /* Precompute some useful information */ type_info->src_type_size = H5T_get_size(src_type); @@ -1072,7 +1077,7 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t /* Get info from API context */ if (H5CX_get_bkgr_buf_type(&bkgr_buf_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve background buffer type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve background buffer type"); /* Check if the datatypes are compound subsets of one another */ type_info->cmpd_subset = H5T_path_compound_subset(type_info->tpath); @@ -1168,7 +1173,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info) /* Get max temp buffer size from API context */ if (H5CX_get_max_temp_buf(&max_temp_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size"); /* Check if the needed type conversion or background buffer size is too big */ if (io_info->tconv_buf_size > max_temp_buf) { @@ -1234,15 +1239,15 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info) /* Get the original state of parallel I/O transfer mode */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* Get MPI communicator */ if (MPI_COMM_NULL == (io_info->comm = H5F_mpi_get_comm(dset0->oloc.file))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator"); /* Check if we can set direct MPI-IO read/write functions */ if ((opt = H5D__mpio_opt_possible(io_info)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace "); /* Check if we can use the optimized parallel I/O routines */ if (opt == TRUE) { @@ -1262,12 +1267,12 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info) if (io_info->op_type == H5D_IO_OP_WRITE) { hbool_t mpi_file_sync_required = FALSE; if (H5F_shared_get_mpi_file_sync_required(io_info->f_sh, &mpi_file_sync_required) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI file_sync_required flag") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI file_sync_required flag"); if (mpi_file_sync_required) HGOTO_ERROR( H5E_DATASET, H5E_NO_INDEPENDENT, FAIL, - "Can't perform independent write when MPI_File_sync is required by ROMIO driver.") + "Can't perform independent write when MPI_File_sync is required by ROMIO driver."); } /* Check if there are any filters in the pipeline. If there are, @@ -1289,7 +1294,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info) /* Retrieve size of MPI communicator used for file */ if ((comm_size = H5F_shared_mpi_get_size(io_info->f_sh)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator size"); if (comm_size > 1) { char local_no_coll_cause_string[512]; @@ -1298,7 +1303,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info) if (H5D__mpio_get_no_coll_cause_strings(local_no_coll_cause_string, 512, global_no_coll_cause_string, 512) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't get reasons for breaking collective I/O") + "can't get reasons for breaking collective I/O"); HGOTO_ERROR(H5E_IO, H5E_NO_INDEPENDENT, FAIL, "Can't perform independent write with filters in pipeline.\n" @@ -1316,7 +1321,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info) if (xfer_mode == H5FD_MPIO_COLLECTIVE) { /* Change the xfer_mode to independent for handling the I/O */ if (H5CX_set_io_xfer_mode(H5FD_MPIO_INDEPENDENT) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O transfer mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O transfer mode"); } /* end if */ } /* end else */ } /* end if */ @@ -1355,9 +1360,10 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) /* Get provided buffers from API context */ if (H5CX_get_tconv_buf(&tconv_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve temp. conversion buffer pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve temp. conversion buffer pointer"); if (H5CX_get_bkgr_buf(&bkgr_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve background conversion buffer pointer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, + "can't retrieve background conversion buffer pointer"); /* Check if we're doing selection I/O */ if (io_info->use_select_io == H5D_SELECTION_IO_MODE_ON) { @@ -1371,7 +1377,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) if (io_info->tconv_buf_size > 0) { if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, io_info->tconv_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); io_info->tconv_buf_allocated = TRUE; } @@ -1379,7 +1385,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) if (io_info->bkg_buf_size > 0) { if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, io_info->bkg_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); io_info->bkg_buf_allocated = TRUE; } } @@ -1394,7 +1400,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) /* Get max buffer size from API context */ if (H5CX_get_max_temp_buf(&max_temp_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve max. temp. buf size"); /* Set up datatype conversion/background buffers */ target_size = max_temp_buf; @@ -1414,7 +1420,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) target_size = io_info->max_tconv_type_size; else /* Don't get bigger than the application has requested */ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "temporary buffer max size is too small") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "temporary buffer max size is too small"); } /* end if */ /* Get a temporary buffer for type conversion unless the app has already @@ -1425,7 +1431,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) /* Allocate temporary buffer */ if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); io_info->tconv_buf_allocated = TRUE; } /* end if */ @@ -1446,7 +1452,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info) * tconv element size is max(src, dst) and the bkg element size is dst */ if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, target_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for background conversion") + "memory allocation failed for background conversion"); io_info->bkg_buf_allocated = TRUE; } } diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 21f52a4..225c48a 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -119,7 +119,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset) case H5D_CHUNK_IDX_NTYPES: default: assert(0 && "Unknown chunk index method!"); - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown chunk index method") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown chunk index method"); } /* end switch */ break; @@ -134,7 +134,7 @@ H5D__layout_set_io_ops(const H5D_t *dataset) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown storage method") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown storage method"); } /* end switch */ /*lint !e788 All appropriate cases are covered */ done: @@ -215,7 +215,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ switch (layout->u.chunk.idx_type) { case H5D_CHUNK_IDX_BTREE: HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, 0, - "v1 B-tree index type found for layout message >v3") + "v1 B-tree index type found for layout message >v3"); case H5D_CHUNK_IDX_NONE: /* nothing */ @@ -246,7 +246,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ case H5D_CHUNK_IDX_NTYPES: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, 0, "Invalid chunk index type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, 0, "Invalid chunk index type"); } /* end switch */ /* Chunk index address */ @@ -262,7 +262,7 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, 0, "Invalid layout class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, 0, "Invalid layout class"); } /* end switch */ done: @@ -294,7 +294,7 @@ H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout) /* Version bounds check */ if (version > H5O_layout_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "layout version out of bounds") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "layout version out of bounds"); /* Set the message version */ layout->version = version; @@ -331,7 +331,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const /* Query the dimensionality of the dataspace */ if ((sndims = H5S_GET_EXTENT_NDIMS(space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "invalid dataspace rank") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "invalid dataspace rank"); ndims = (unsigned)sndims; /* Avoid scalar/null dataspace */ @@ -344,7 +344,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const /* Query the dataspace's dimensions */ if (H5S_get_simple_extent_dims(space, cur_dims, max_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace max. dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace max. dimensions"); /* Spin through the max. dimensions, looking for unlimited dimensions */ for (u = 0; u < ndims; u++) { @@ -460,12 +460,12 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) pline = &dset->shared->dcpl_cache.pline; if (pline->nused > 0 && H5O_msg_append_oh(file, oh, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, pline) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update filter header message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update filter header message"); } /* end if */ /* Initialize the layout information for the new dataset */ if (dset->shared->layout.ops->init && (dset->shared->layout.ops->init)(file, dset, dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information"); /* Indicate that the layout information was initialized */ layout_init = TRUE; @@ -476,7 +476,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) */ if (fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY) if (H5D__alloc_storage(dset, H5D_ALLOC_CREATE, FALSE, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage"); /* Update external storage message, if it's used */ if (dset->shared->dcpl_cache.efl.nused > 0) { @@ -492,16 +492,16 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) /* Create the heap for the EFL file names */ if (H5HL_create(file, heap_size, &efl->heap_addr /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create EFL file name heap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create EFL file name heap"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(file, efl->heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect EFL file name heap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect EFL file name heap"); /* Insert "empty" name first */ if (H5HL_insert(file, heap, (size_t)1, "", &name_offset) < 0) { H5HL_unprotect(heap); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap"); } for (u = 0; u < efl->nused; ++u) { @@ -509,7 +509,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) if (H5HL_insert(file, heap, HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name, &name_offset) < 0) { H5HL_unprotect(heap); - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap"); } /* Store EFL file name offset */ @@ -518,12 +518,12 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) /* Release the heap */ if (H5HL_unprotect(heap) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect EFL file name heap") + HGOTO_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect EFL file name heap"); heap = NULL; /* Insert EFL message into dataset object header */ if (H5O_msg_append_oh(file, oh, H5O_EFL_ID, H5O_MSG_FLAG_CONSTANT, 0, efl) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update external file list message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update external file list message"); } /* end if */ /* Create layout message */ @@ -539,11 +539,11 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id) /* Store VDS info in global heap */ if (H5D_VIRTUAL == layout->type) if (H5D__virtual_store_layout(file, layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to store VDS info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to store VDS info"); /* Create layout message */ if (H5O_msg_append_oh(file, oh, H5O_LAYOUT_ID, layout_mesg_flags, 0, layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout"); done: /* Error cleanup */ @@ -583,15 +583,15 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist) /* Get the optional filters message */ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists"); if (msg_exists) { /* Retrieve the I/O pipeline message */ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_PLINE_ID, &dataset->shared->dcpl_cache.pline)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message"); pline_copied = TRUE; /* Set the I/O pipeline info in the property list */ if (H5P_set(plist, H5O_CRT_PIPELINE_NAME, &dataset->shared->dcpl_cache.pline) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set pipeline"); } /* end if */ /* @@ -601,21 +601,21 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist) * them. */ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_LAYOUT_ID, &(dataset->shared->layout))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read data layout message"); layout_copied = TRUE; /* Check for external file list message (which might not exist) */ if ((msg_exists = H5O_msg_exists(&(dataset->oloc), H5O_EFL_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't check if message exists"); if (msg_exists) { /* Retrieve the EFL message */ if (NULL == H5O_msg_read(&(dataset->oloc), H5O_EFL_ID, &dataset->shared->dcpl_cache.efl)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve message"); efl_copied = TRUE; /* Set the EFL info in the property list */ if (H5P_set(plist, H5D_CRT_EXT_FILE_LIST_NAME, &dataset->shared->dcpl_cache.efl) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set external file list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set external file list"); /* Set the dataset's I/O operations */ dataset->shared->layout.ops = H5D_LOPS_EFL; @@ -627,7 +627,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist) /* Initialize the layout information for the dataset */ if (dataset->shared->layout.ops->init && (dataset->shared->layout.ops->init)(dataset->oloc.file, dataset, dapl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information"); /* Adjust chunk dimensions to omit datatype size (in last dimension) for creation property */ if (H5D_CHUNKED == dataset->shared->layout.type) @@ -635,12 +635,12 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dapl_id, H5P_genplist_t *plist) /* Copy layout to the DCPL */ if (H5P_set(plist, H5D_CRT_LAYOUT_NAME, &dataset->shared->layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout"); /* Set chunk sizes */ if (H5D_CHUNKED == dataset->shared->layout.type) if (H5D__chunk_set_sizes(dataset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to set chunk sizes"); done: if (ret_value < 0) { @@ -681,12 +681,12 @@ H5D__layout_oh_write(const H5D_t *dataset, H5O_t *oh, unsigned update_flags) /* 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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to check if layout message exists") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to check if layout message exists"); if (msg_exists) { /* Write the layout message to the dataset's header */ if (H5O_msg_write_oh(dataset->oloc.file, oh, H5O_LAYOUT_ID, 0, update_flags, &dataset->shared->layout) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout message") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout message"); } /* end if */ done: diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index be76c42..4b4c6ed 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -812,9 +812,9 @@ H5D__mpio_get_no_coll_cause_strings(char *local_cause, size_t local_cause_len, c /* Retrieve the local and global cause flags from the API context */ if (H5CX_get_mpio_local_no_coll_cause(&local_no_coll_cause) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get local no collective cause value") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get local no collective cause value"); if (H5CX_get_mpio_global_no_coll_cause(&global_no_coll_cause) < 0) - HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get global no collective cause value") + HGOTO_ERROR(H5E_CONTEXT, H5E_CANTGET, FAIL, "unable to get global no collective cause value"); /* * Append each of the "reason for breaking collective I/O" @@ -946,7 +946,7 @@ H5D__mpio_select_read(const H5D_io_info_t *io_info, hsize_t mpi_buf_count, H5S_t H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t); if (H5F_shared_block_read(io_info->f_sh, H5FD_MEM_DRAW, io_info->store_faddr, (size_t)mpi_buf_count, rbuf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't finish collective parallel read") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "can't finish collective parallel read"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -980,7 +980,7 @@ H5D__mpio_select_write(const H5D_io_info_t *io_info, hsize_t mpi_buf_count, H5S_ H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t); if (H5F_shared_block_write(io_info->f_sh, H5FD_MEM_DRAW, io_info->store_faddr, (size_t)mpi_buf_count, wbuf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't finish collective parallel write") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "can't finish collective parallel write"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1114,14 +1114,14 @@ H5D__piece_io(H5D_io_info_t *io_info) /* 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) - HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank") + HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank"); if ((mpi_size = H5F_mpi_get_size(io_info->dsets_info[0].dset->oloc.file)) < 0) - HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI size") + HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI size"); #ifdef H5Dmpio_DEBUG /* Initialize file-level debugging if not initialized */ if (!H5D_mpio_debug_inited && H5D__mpio_debug_init() < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize H5Dmpio debugging") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize H5Dmpio debugging"); /* Open file for debugging if necessary */ log_file_flag = H5D_mpio_debug_flags_s[(int)'f']; @@ -1132,7 +1132,7 @@ 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 = fopen(debug_log_filename, "a"))) - HGOTO_ERROR(H5E_IO, H5E_OPENERROR, FAIL, "couldn't open debugging log file") + 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); @@ -1146,7 +1146,7 @@ H5D__piece_io(H5D_io_info_t *io_info) * Only set here if it's a static option, if it needs to be calculated using the * number of chunks per process delay that calculation until later. */ if (H5CX_get_mpio_chunk_opt_mode(&chunk_opt_mode) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get chunk optimization option") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get chunk optimization option"); if (H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode) io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/ @@ -1173,7 +1173,7 @@ H5D__piece_io(H5D_io_info_t *io_info) /* Get the chunk optimization option threshold */ if (H5CX_get_mpio_chunk_opt_num(&one_link_chunk_io_threshold) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "couldn't get chunk optimization option threshold value") + "couldn't get chunk optimization option threshold value"); /* If the threshold is 0, no need to check number of chunks */ if (one_link_chunk_io_threshold > 0) { @@ -1198,13 +1198,13 @@ H5D__piece_io(H5D_io_info_t *io_info) /*** Set collective chunk user-input optimization API. ***/ if (H5D_ONE_LINK_CHUNK_IO == io_option) { if (H5CX_test_set_mpio_coll_chunk_link_hard(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } /* end if */ #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ /* Perform unfiltered link chunk collective IO */ if (H5D__link_piece_collective_io(io_info, mpi_rank) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO"); } } @@ -1221,7 +1221,7 @@ H5D__piece_io(H5D_io_info_t *io_info) if (H5D__inter_collective_io(io_info, &io_info->dsets_info[i], io_info->dsets_info[i].file_space, io_info->dsets_info[i].mem_space) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO"); /* Set the actual I/O mode property. internal_collective_io will not break to * independent I/O, so we set it here. @@ -1237,7 +1237,7 @@ H5D__piece_io(H5D_io_info_t *io_info) /* Get the chunk optimization option threshold */ if (H5CX_get_mpio_chunk_opt_num(&one_link_chunk_io_threshold) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "couldn't get chunk optimization option threshold value") + "couldn't get chunk optimization option threshold value"); /* If the threshold is 0, no need to check number of chunks */ if (one_link_chunk_io_threshold == 0) { @@ -1269,7 +1269,7 @@ H5D__piece_io(H5D_io_info_t *io_info) if (H5D__link_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i], mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, - "couldn't finish filtered linked chunk MPI-IO") + "couldn't finish filtered linked chunk MPI-IO"); } /* end if */ else { /* If there is more than one dataset we cannot make the multi dataset call here, @@ -1281,13 +1281,13 @@ H5D__piece_io(H5D_io_info_t *io_info) if (H5D__multi_chunk_collective_io(io_info, &io_info->dsets_info[i], mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, - "couldn't finish optimized multiple chunk MPI-IO") + "couldn't finish optimized multiple chunk MPI-IO"); } else { /* Perform unfiltered link chunk collective IO */ if (H5D__link_piece_collective_io(io_info, mpi_rank) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, - "couldn't finish linked chunk MPI-IO") + "couldn't finish linked chunk MPI-IO"); } } @@ -1300,14 +1300,14 @@ H5D__piece_io(H5D_io_info_t *io_info) if (H5D__multi_chunk_filtered_collective_io(io_info, &io_info->dsets_info[i], mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, - "couldn't finish optimized multiple filtered chunk MPI-IO") + "couldn't finish optimized multiple filtered chunk MPI-IO"); } /* end if */ else { /* Perform unfiltered multi chunk collective IO */ if (H5D__multi_chunk_collective_io(io_info, &io_info->dsets_info[i], mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, - "couldn't finish optimized multiple chunk MPI-IO") + "couldn't finish optimized multiple chunk MPI-IO"); } break; @@ -1318,19 +1318,19 @@ H5D__piece_io(H5D_io_info_t *io_info) /*** Set collective chunk user-input optimization APIs. ***/ if (H5D_ONE_LINK_CHUNK_IO == io_option) { if (H5CX_test_set_mpio_coll_chunk_link_hard(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } /* end if */ else if (H5D_MULTI_CHUNK_IO == io_option) { if (H5CX_test_set_mpio_coll_chunk_multi_hard(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } /* end else-if */ else if (H5D_ONE_LINK_CHUNK_IO_MORE_OPT == io_option) { if (H5CX_test_set_mpio_coll_chunk_link_num_true(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } /* end if */ else if (H5D_MULTI_CHUNK_IO_MORE_OPT == io_option) { if (H5CX_test_set_mpio_coll_chunk_link_num_false(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } /* end if */ } #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ @@ -1371,7 +1371,7 @@ H5D__collective_read(H5D_io_info_t *io_info) /* Call generic selection operation */ if (H5D__piece_io(io_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") + HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1396,7 +1396,7 @@ H5D__collective_write(H5D_io_info_t *io_info) /* Call generic selection operation */ if (H5D__piece_io(io_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") + HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1455,7 +1455,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran else if (io_info->dsets_info[i].layout->type == H5D_CONTIGUOUS) actual_io_mode |= H5D_MPIO_CONTIGUOUS_COLLECTIVE; else - HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") + HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout"); } /* Set the actual-chunk-opt-mode property. */ @@ -1507,25 +1507,25 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran /* Allocate chunking information */ if (NULL == (chunk_mtype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk memory datatype buffer") + "couldn't allocate chunk memory datatype buffer"); if (NULL == (chunk_ftype = (MPI_Datatype *)H5MM_malloc(num_chunk * sizeof(MPI_Datatype)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file datatype buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file datatype buffer"); if (NULL == (chunk_file_disp_array = (MPI_Aint *)H5MM_malloc(num_chunk * sizeof(MPI_Aint)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk file displacement buffer") + "couldn't allocate chunk file displacement buffer"); if (NULL == (chunk_mem_disp_array = (MPI_Aint *)H5MM_calloc(num_chunk * sizeof(MPI_Aint)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk memory displacement buffer") + "couldn't allocate chunk memory displacement buffer"); if (NULL == (chunk_mpi_mem_counts = (int *)H5MM_calloc(num_chunk * sizeof(int)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory counts buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk memory counts buffer"); if (NULL == (chunk_mpi_file_counts = (int *)H5MM_calloc(num_chunk * sizeof(int)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file counts buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate chunk file counts buffer"); if (NULL == (chunk_mbt_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk memory is derived datatype flags buffer") + "couldn't allocate chunk memory is derived datatype flags buffer"); if (NULL == (chunk_mft_is_derived_array = (hbool_t *)H5MM_calloc(num_chunk * sizeof(hbool_t)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk file is derived datatype flags buffer") + "couldn't allocate chunk file is derived datatype flags buffer"); /* save lowest file address */ ctg_store.contig.dset_addr = io_info->sel_pieces[0]->faddr; @@ -1568,7 +1568,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran selected in case they are out of order */ &is_permuted /* OUT */) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type"); /* Sanity check */ if (is_permuted) @@ -1589,7 +1589,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran and applied to the memory selection */ &is_permuted /* IN */) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buf type"); /* Sanity check */ if (is_permuted) assert(!permute_map); @@ -1665,7 +1665,7 @@ H5D__link_piece_collective_io(H5D_io_info_t *io_info, int H5_ATTR_UNUSED mpi_ran /* Perform final collective I/O operation */ if (H5D__final_collective_io(io_info, mpi_buf_count, chunk_final_ftype, chunk_final_mtype) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish MPI-IO"); } done: @@ -1799,12 +1799,13 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_ H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE); /* Build a list of selected chunks in the collective io operation */ + if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_info, mpi_rank, &chunk_list) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list"); if (io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */ if (H5D__mpio_collective_filtered_chunk_read(&chunk_list, io_info, dset_info, mpi_rank) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks"); } else { /* Filtered collective write */ H5D_chk_idx_info_t index_info; @@ -1815,13 +1816,13 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_ /* Redistribute shared chunks being written to */ if (H5D__mpio_redistribute_shared_chunks(&chunk_list, io_info, mpi_rank, mpi_size, &rank_chunks_assigned_map) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks"); /* Send any chunk modification messages for chunks this rank no longer owns */ if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, dset_info, mpi_rank, mpi_size, &chunk_msg_bufs, &chunk_msg_bufs_len) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "unable to send chunk modification data between MPI ranks") + "unable to send chunk modification data between MPI ranks"); /* Make sure the local chunk list was updated correctly */ assert(chunk_list.num_chunk_infos == rank_chunks_assigned_map[mpi_rank]); @@ -1834,7 +1835,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_ */ if (H5D__mpio_collective_filtered_chunk_update(&chunk_list, chunk_msg_bufs, chunk_msg_bufs_len, io_info, dset_info, mpi_rank) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks"); /* Free up resources used by chunk hash table now that we're done updating chunks */ HASH_CLEAR(hh, chunk_list.chunk_hash_table); @@ -1843,11 +1844,11 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_ if (H5D__mpio_collective_filtered_chunk_reallocate(&chunk_list, rank_chunks_assigned_map, io_info, &index_info, mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "couldn't collectively re-allocate file space for chunks") + "couldn't collectively re-allocate file space for chunks"); /* Perform vector I/O on chunks */ if (H5D__mpio_collective_filtered_vec_io(&chunk_list, io_info->f_sh, io_info->op_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't perform vector I/O on filtered chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't perform vector I/O on filtered chunks"); /* Free up resources in anticipation of following collective operation */ for (size_t i = 0; i < chunk_list.num_chunk_infos; i++) { @@ -1863,7 +1864,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_ if (H5D__mpio_collective_filtered_chunk_reinsert(&chunk_list, rank_chunks_assigned_map, io_info, dset_info, &index_info, mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "couldn't collectively re-insert modified chunks into chunk index") + "couldn't collectively re-insert modified chunks into chunk index"); } done: @@ -1937,7 +1938,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* 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) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property"); /* Set the actual chunk opt mode property */ H5CX_set_mpio_actual_chunk_opt(H5D_MPIO_MULTI_CHUNK); @@ -1956,7 +1957,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Obtain IO option for each chunk */ if (H5D__obtain_mpio_mode(io_info, dset_info, chunk_io_option, chunk_addr, mpi_rank, mpi_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "unable to obtain MPIO mode") + HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "unable to obtain MPIO mode"); /* Set memory buffers */ io_info->base_maddr = dset_info->buf; @@ -1972,9 +1973,9 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ * stored in index order and since we're iterating in index order we can * just check for each chunk being selected in order */ if (NULL == (piece_node = H5SL_first(dset_info->layout_io_info.chunk_map->dset_sel_pieces))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece node from skip list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece node from skip list"); if (NULL == (next_chunk_info = (H5D_piece_info_t *)H5SL_item(piece_node))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from skip list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from skip list"); } /* Loop over _all_ the chunks */ @@ -2001,9 +2002,9 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Advance next chunk to next node in skip list, if there are more chunks selected */ if (num_chunk) { if (NULL == (piece_node = H5SL_next(piece_node))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk skip list terminated early") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk skip list terminated early"); if (NULL == (next_chunk_info = (H5D_piece_info_t *)H5SL_item(piece_node))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from skip list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get piece info from skip list"); } /* Pass in chunk's coordinates in a union. */ @@ -2043,7 +2044,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Switch back to collective I/O */ if (last_coll_opt_mode != H5FD_MPIO_COLLECTIVE_IO) { if (H5CX_set_mpio_coll_opt(H5FD_MPIO_COLLECTIVE_IO) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't switch to collective I/O") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't switch to collective I/O"); last_coll_opt_mode = H5FD_MPIO_COLLECTIVE_IO; } /* end if */ @@ -2052,7 +2053,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Perform the I/O */ if (H5D__inter_collective_io(io_info, dset_info, fspace, mspace) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO"); } /* end if */ else { /* possible independent IO for this chunk */ #ifdef H5Dmpio_DEBUG @@ -2077,7 +2078,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Using independent I/O with file setview.*/ if (last_coll_opt_mode != H5FD_MPIO_INDIVIDUAL_IO) { if (H5CX_set_mpio_coll_opt(H5FD_MPIO_INDIVIDUAL_IO) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't switch to individual I/O") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't switch to individual I/O"); last_coll_opt_mode = H5FD_MPIO_INDIVIDUAL_IO; } /* end if */ @@ -2086,7 +2087,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_ /* Perform the I/O */ if (H5D__inter_collective_io(io_info, dset_info, fspace, mspace) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO"); #ifdef H5Dmpio_DEBUG H5D_MPIO_DEBUG(mpi_rank, "after inter collective IO"); #endif @@ -2221,7 +2222,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info /* Build a list of selected chunks in the collective IO operation */ if (H5D__mpio_collective_filtered_chunk_io_setup(io_info, dset_info, mpi_rank, &chunk_list) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list"); /* Retrieve the maximum number of chunks selected for any rank */ if (MPI_SUCCESS != (mpi_code = MPI_Allreduce(&chunk_list.num_chunk_infos, &max_num_chunks, 1, @@ -2256,7 +2257,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info if (H5D__mpio_collective_filtered_chunk_read(&single_chunk_list, io_info, dset_info, mpi_rank) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't read filtered chunks"); if (have_chunk_to_process && chunk_list.chunk_infos[i].buf) { H5MM_free(chunk_list.chunk_infos[i].buf); @@ -2273,13 +2274,13 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info if (mpi_size > 1) { /* Redistribute shared chunks being written to */ if (H5D__mpio_redistribute_shared_chunks(&chunk_list, io_info, mpi_rank, mpi_size, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to redistribute shared chunks"); /* Send any chunk modification messages for chunks this rank no longer owns */ if (H5D__mpio_share_chunk_modification_data(&chunk_list, io_info, dset_info, mpi_rank, mpi_size, &chunk_msg_bufs, &chunk_msg_bufs_len) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "unable to send chunk modification data between MPI ranks") + "unable to send chunk modification data between MPI ranks"); } /* Iterate over the max number of chunks among all ranks, as this rank could @@ -2317,18 +2318,18 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info */ if (H5D__mpio_collective_filtered_chunk_update( &single_chunk_list, chunk_msg_bufs, chunk_msg_bufs_len, io_info, dset_info, mpi_rank) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't update modified chunks"); /* All ranks now collectively re-allocate file space for all chunks */ if (H5D__mpio_collective_filtered_chunk_reallocate(&single_chunk_list, NULL, io_info, &index_info, mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "couldn't collectively re-allocate file space for chunks") + "couldn't collectively re-allocate file space for chunks"); /* Perform vector I/O on chunks */ if (H5D__mpio_collective_filtered_vec_io(&single_chunk_list, io_info->f_sh, io_info->op_type) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "couldn't perform vector I/O on filtered chunks") + "couldn't perform vector I/O on filtered chunks"); /* Free up resources in anticipation of following collective operation */ if (have_chunk_to_process && chunk_list.chunk_infos[i].buf) { @@ -2342,7 +2343,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, H5D_dset_io_info if (H5D__mpio_collective_filtered_chunk_reinsert(&single_chunk_list, NULL, io_info, dset_info, &index_info, mpi_rank, mpi_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "couldn't collectively re-insert modified chunks into chunk index") + "couldn't collectively re-insert modified chunks into chunk index"); } /* end for */ } @@ -2404,7 +2405,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H H5D_MPIO_TRACE_ENTER(mpi_rank); H5D_MPIO_TIME_START(mpi_rank, "Inter collective I/O"); if (mpi_rank < 0) - HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank") + HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank"); #endif assert(io_info); @@ -2436,7 +2437,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H case they are out of order */ &is_permuted /* OUT */) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI file type"); /* Sanity check */ if (is_permuted) assert(permute_map); @@ -2455,7 +2456,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H memory selection */ , &is_permuted /* IN */) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buffer type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create MPI buffer type"); /* Sanity check */ if (is_permuted) assert(!permute_map); @@ -2475,7 +2476,7 @@ H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *di, H /* Perform final collective I/O operation */ if (H5D__final_collective_io(io_info, (hsize_t)mpi_buf_count, mpi_file_type, mpi_buf_type) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish collective MPI-IO") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish collective MPI-IO"); done: /* Free the MPI buf and file types, if they were derived */ @@ -2518,20 +2519,20 @@ H5D__final_collective_io(H5D_io_info_t *io_info, hsize_t mpi_buf_count, MPI_Data H5D_MPIO_TRACE_ENTER(mpi_rank); H5D_MPIO_TIME_START(mpi_rank, "Final collective I/O"); if (mpi_rank < 0) - HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank") + HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain MPI rank"); #endif /* Pass buf type, file type to the file driver. */ if (H5CX_set_mpi_coll_datatypes(mpi_buf_type, mpi_file_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O collective I/O datatypes") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set MPI-I/O collective I/O datatypes"); if (io_info->op_type == H5D_IO_OP_WRITE) { if ((io_info->md_io_ops.single_write_md)(io_info, mpi_buf_count, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed"); } /* end if */ else { if ((io_info->md_io_ops.single_read_md)(io_info, mpi_buf_count, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "optimized read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "optimized read failed"); } /* end else */ done: @@ -2790,7 +2791,7 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as /* Setup parameters */ H5_CHECKED_ASSIGN(total_chunks, size_t, di->layout->u.chunk.nchunks, hsize_t); if (H5CX_get_mpio_chunk_opt_ratio(&percent_nproc_per_chunk) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get percent nproc per chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't get percent nproc per chunk"); /* if ratio is 0, perform collective io */ if (0 == percent_nproc_per_chunk) { if (H5D__chunk_addrmap(di->dset, chunk_addr) < 0) @@ -2805,13 +2806,13 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as /* Allocate memory */ if (NULL == (io_mode_info = (uint8_t *)H5MM_calloc(total_chunks))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate I/O mode info buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate I/O mode info buffer"); if (NULL == (mergebuf = (uint8_t *)H5MM_malloc((sizeof(haddr_t) + 1) * total_chunks))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate mergebuf buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate mergebuf buffer"); tempbuf = mergebuf + total_chunks; if (mpi_rank == root) if (NULL == (recv_io_mode_info = (uint8_t *)H5MM_malloc(total_chunks * (size_t)mpi_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate recv I/O mode info buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate recv I/O mode info buffer"); /* Obtain the regularity and selection information for all chunks in this process. */ chunk_node = H5SL_first(di->layout_io_info.chunk_map->dset_sel_pieces); @@ -2849,12 +2850,12 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as /* pre-computing: calculate number of processes and regularity of the selection occupied in each chunk */ if (NULL == (nproc_per_chunk = (unsigned *)H5MM_calloc(total_chunks * sizeof(unsigned)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate nproc_per_chunk buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate nproc_per_chunk buffer"); /* calculating the chunk address */ if (H5D__chunk_addrmap(di->dset, chunk_addr) < 0) { H5MM_free(nproc_per_chunk); - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address"); } /* end if */ /* checking for number of process per chunk and regularity of the selection*/ @@ -2885,7 +2886,7 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as /* Broadcasting the MPI_IO option info. and chunk address info. */ if ((sizeof(haddr_t) + 1) * total_chunks > INT_MAX) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "result overflow") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "result overflow"); if (MPI_SUCCESS != (mpi_code = MPI_Bcast(mergebuf, (int)((sizeof(haddr_t) + 1) * total_chunks), MPI_BYTE, root, comm))) HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code) @@ -2900,14 +2901,14 @@ H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_dset_io_info_t *di, uint8_t as for (ic = 0; ic < total_chunks; ic++) if (assign_io_mode[ic] == H5D_CHUNK_IO_MODE_COL) { if (H5CX_test_set_mpio_coll_chunk_multi_ratio_coll(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); coll_op = TRUE; break; } /* end if */ if (!coll_op) if (H5CX_test_set_mpio_coll_chunk_multi_ratio_ind(0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set property value"); } #endif @@ -2978,7 +2979,7 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const !(di->dset->shared->layout.u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS); if (NULL == (local_info_array = H5MM_malloc(num_chunks_selected * sizeof(*local_info_array)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate local io info array buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate local io info array buffer"); chunk_node = H5SL_first(di->layout_io_info.chunk_map->dset_sel_pieces); for (size_t i = 0; chunk_node; i++) { @@ -2986,7 +2987,7 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const /* Obtain this chunk's address */ if (H5D__chunk_lookup(di->dset, chunk_info->scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); /* Initialize rank-local chunk info */ local_info_array[i].chunk_info = chunk_info; @@ -3124,7 +3125,7 @@ H5D__mpio_collective_filtered_chunk_io_setup(const H5D_io_info_t *io_info, const * in a more natural way, but this hack should suffice for now. */ if (H5D__chunk_lookup(di->dset, scaled, &udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address"); } chunk_list->chunk_infos = local_info_array; @@ -3197,7 +3198,7 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li * MPI communication. */ if (NULL == (num_chunks_map = H5MM_malloc((size_t)mpi_size * sizeof(*num_chunks_map)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate assigned chunks array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate assigned chunks array"); /* Perform initial Allgather to determine the collective chunk list size */ if (MPI_SUCCESS != (mpi_code = MPI_Allgather(&chunk_list->num_chunk_infos, 1, H5_SIZE_T_AS_MPI_TYPE, @@ -3218,7 +3219,7 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li if (H5D__mpio_redistribute_shared_chunks_int(chunk_list, num_chunks_map, redistribute_on_all_ranks, io_info, mpi_rank, mpi_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREDISTRIBUTE, FAIL, "can't redistribute shared chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREDISTRIBUTE, FAIL, "can't redistribute shared chunks"); /* * If the caller provided a pointer for the mapping from @@ -3383,14 +3384,14 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun if (H5D__mpio_get_chunk_redistribute_info_types(&packed_type, &packed_type_derived, &struct_type, &struct_type_derived) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't create derived datatypes for chunk redistribution info") + "can't create derived datatypes for chunk redistribution info"); /* Perform gather operation */ if (H5_mpio_gatherv_alloc(chunk_list->chunk_infos, num_chunks_int, struct_type, counts_ptr, displacements_ptr, packed_type, all_ranks_involved, 0, io_info->comm, mpi_rank, mpi_size, &coll_chunk_list, &coll_chunk_list_num_entries) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, - "can't gather chunk redistribution info to involved ranks") + "can't gather chunk redistribution info to involved ranks"); /* * If all ranks are redistributing shared chunks, we no @@ -3702,7 +3703,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk if (chunk_list->num_chunk_infos > 0) { /* Allocate a selection iterator for iterating over chunk dataspaces */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator"); /* * Allocate send buffer and MPI_Request arrays for non-blocking @@ -3711,10 +3712,10 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk send_bufs_nalloc = H5D_CHUNK_NUM_SEND_MSGS_INIT; if (NULL == (msg_send_bufs = H5MM_malloc(send_bufs_nalloc * sizeof(*msg_send_bufs)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk modification message buffer array") + "couldn't allocate chunk modification message buffer array"); if (NULL == (send_requests = H5MM_malloc(send_bufs_nalloc * sizeof(*send_requests)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate send requests array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate send requests array"); } /* @@ -3771,7 +3772,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk /* Determine size of serialized chunk file dataspace */ if (H5S_encode(chunk_info->fspace, &mod_data_p, &space_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get encoded dataspace size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get encoded dataspace size"); mod_data_size += space_size; /* Determine size of data being written */ @@ -3782,7 +3783,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk if (NULL == (msg_send_bufs[num_send_requests] = H5MM_malloc(mod_data_size))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk modification message buffer") + "couldn't allocate chunk modification message buffer"); mod_data_p = msg_send_bufs[num_send_requests]; @@ -3792,18 +3793,18 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk /* Serialize the chunk's file dataspace into the buffer */ if (H5S_encode(chunk_info->fspace, &mod_data_p, &mod_data_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to encode dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "unable to encode dataspace"); /* Initialize iterator for memory selection */ if (H5S_select_iter_init(mem_iter, chunk_info->mspace, dset_info->type_info.src_type_size, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); mem_iter_init = TRUE; /* Collect the modification data into the buffer */ if (0 == H5D__gather_mem(dset_info->buf.cvp, mem_iter, (size_t)iter_nelmts, mod_data_p)) - HGOTO_ERROR(H5E_IO, H5E_CANTGATHER, FAIL, "couldn't gather from write buffer") + HGOTO_ERROR(H5E_IO, H5E_CANTGATHER, FAIL, "couldn't gather from write buffer"); /* * Ensure that the size of the chunk data being sent can be @@ -3834,17 +3835,17 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk if (NULL == (tmp_alloc = H5MM_realloc(msg_send_bufs, send_bufs_nalloc * sizeof(*msg_send_bufs)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't resize chunk modification message buffer array") + "couldn't resize chunk modification message buffer array"); msg_send_bufs = tmp_alloc; if (NULL == (tmp_alloc = H5MM_realloc(send_requests, send_bufs_nalloc * sizeof(*send_requests)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't resize send requests array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't resize send requests array"); send_requests = tmp_alloc; } if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release memory selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release memory selection iterator"); mem_iter_init = FALSE; } } @@ -3852,7 +3853,7 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk /* Check if the number of send or receive requests will overflow an int (MPI requirement) */ if (num_send_requests > INT_MAX || num_msgs_incoming > INT_MAX) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, - "too many shared chunks in parallel filtered write operation") + "too many shared chunks in parallel filtered write operation"); H5_CHECK_OVERFLOW(num_send_requests, size_t, int); H5_CHECK_OVERFLOW(num_msgs_incoming, size_t, int); @@ -3864,10 +3865,10 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk if (num_msgs_incoming) { if (NULL == (msg_recv_bufs = H5MM_malloc(num_msgs_incoming * sizeof(*msg_recv_bufs)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "couldn't allocate chunk modification message buffer array") + "couldn't allocate chunk modification message buffer array"); if (NULL == (recv_requests = H5MM_malloc(num_msgs_incoming * sizeof(*recv_requests)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate receive requests array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate receive requests array"); } /* Process any incoming messages until everyone is done */ @@ -3900,13 +3901,13 @@ H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk #endif if (msg_size <= 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "invalid chunk modification message size") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "invalid chunk modification message size"); 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, - "couldn't allocate chunk modification message receive buffer") + "couldn't allocate chunk modification message receive buffer"); if (MPI_SUCCESS != (mpi_code = MPI_Irecv(msg_recv_bufs[num_recv_requests], (int)msg_size, MPI_BYTE, status.MPI_SOURCE, H5D_CHUNK_MOD_DATA_TAG, @@ -4105,9 +4106,9 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun if (chunk_list->num_chunk_infos) { /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function"); /* Set size of full chunks in dataset */ file_chunk_size = di->dset->shared->layout.u.chunk.size; @@ -4182,7 +4183,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun /* Get a dataspace for filling chunk memory buffers */ if (NULL == (fill_space = H5S_create_simple(di->dset->shared->layout.u.chunk.ndims - 1, chunk_dims, NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create chunk fill dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create chunk fill dataspace"); /* Initialize fill value buffer */ if (H5D__fill_init( @@ -4190,7 +4191,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun (void *)&di->dset->shared->dcpl_cache.pline, (H5MM_free_t)H5D__chunk_mem_free, (void *)&di->dset->shared->dcpl_cache.pline, &di->dset->shared->dcpl_cache.fill, di->dset->shared->type, di->dset->shared->type_id, 0, file_chunk_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill value buffer"); fb_info_init = TRUE; } @@ -4199,7 +4200,8 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun assert(fb_info.fill_buf); if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_entry->buf, di->type_info.mem_type, fill_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't fill chunk buffer with fill value") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "couldn't fill chunk buffer with fill value"); } } } @@ -4212,12 +4214,12 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun index_empty = FALSE; if (di->dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR) if (H5D__chunk_index_empty(di->dset, &index_empty) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty"); if (!index_empty) { /* Perform collective vector read */ if (H5D__mpio_collective_filtered_vec_io(chunk_list, io_info->f_sh, H5D_IO_OP_READ) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks"); } /* @@ -4234,7 +4236,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun &(chunk_entry->index_info.filter_mask), err_detect, filter_cb, (size_t *)&chunk_entry->chunk_new.length, &chunk_entry->chunk_buf_size, &chunk_entry->buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "couldn't unfilter chunk for modifying") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "couldn't unfilter chunk for modifying"); } /* Scatter the chunk data to the read buffer */ @@ -4242,7 +4244,7 @@ H5D__mpio_collective_filtered_chunk_read(H5D_filtered_collective_io_info_t *chun if (H5D_select_io_mem(di->buf.vp, chunk_info->mspace, chunk_entry->buf, chunk_info->fspace, di->type_info.src_type_size, (size_t)iter_nelmts) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't copy chunk data to read buffer") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't copy chunk data to read buffer"); } done: @@ -4322,9 +4324,9 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch if (chunk_list->num_chunk_infos > 0) { /* Retrieve filter settings from API context */ if (H5CX_get_err_detect(&err_detect) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get error detection info"); if (H5CX_get_filter_cb(&filter_cb) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get I/O filter callback function"); /* Set size of full chunks in dataset */ file_chunk_size = di->dset->shared->layout.u.chunk.size; @@ -4418,7 +4420,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch if (NULL == (fill_space = H5S_create_simple( di->dset->shared->layout.u.chunk.ndims - 1, chunk_dims, NULL))) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to create chunk fill dataspace") + "unable to create chunk fill dataspace"); /* Initialize fill value buffer */ if (H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc, @@ -4427,7 +4429,8 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch (void *)&di->dset->shared->dcpl_cache.pline, &di->dset->shared->dcpl_cache.fill, di->dset->shared->type, di->dset->shared->type_id, 0, file_chunk_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill value buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "can't initialize fill value buffer"); fb_info_init = TRUE; } @@ -4437,7 +4440,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch if (H5D__fill(fb_info.fill_buf, di->dset->shared->type, chunk_entry->buf, type_info->mem_type, fill_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "couldn't fill chunk buffer with fill value") + "couldn't fill chunk buffer with fill value"); } } } @@ -4453,12 +4456,12 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch index_empty = FALSE; if (di->dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_INCR) if (H5D__chunk_index_empty(di->dset, &index_empty) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "couldn't determine if chunk index is empty"); if (!index_empty) { /* Perform collective vector read */ if (H5D__mpio_collective_filtered_vec_io(chunk_list, io_info->f_sh, H5D_IO_OP_READ) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't perform vector I/O on filtered chunks"); } /* @@ -4482,19 +4485,19 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch &(chunk_entry->index_info.filter_mask), err_detect, filter_cb, (size_t *)&chunk_entry->chunk_new.length, &chunk_entry->chunk_buf_size, &chunk_entry->buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "couldn't unfilter chunk for modifying") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFILTER, FAIL, "couldn't unfilter chunk for modifying"); } iter_nelmts = H5S_GET_SELECT_NPOINTS(chunk_info->mspace); if (H5D_select_io_mem(chunk_entry->buf, chunk_info->fspace, di->buf.cvp, chunk_info->mspace, type_info->dst_type_size, (size_t)iter_nelmts) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't copy chunk data to write buffer") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't copy chunk data to write buffer"); } /* Allocate iterator for memory selection */ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate memory iterator"); /* Now process all received chunk message buffers */ for (i = 0; i < (size_t)chunk_msg_bufs_len; i++) { @@ -4510,9 +4513,9 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch /* Find the chunk entry according to its chunk index */ HASH_FIND(hh, chunk_list->chunk_hash_table, &chunk_idx, sizeof(hsize_t), chunk_entry); if (chunk_entry == NULL) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find chunk entry") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFIND, FAIL, "unable to find chunk entry"); if (mpi_rank != chunk_entry->new_owner) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk owner set to incorrect MPI rank") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk owner set to incorrect MPI rank"); /* * Only process the chunk if its data buffer is allocated. @@ -4525,27 +4528,27 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch else { /* Decode the chunk file dataspace from the message */ if (NULL == (dataspace = H5S_decode(&msg_ptr))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDECODE, FAIL, "unable to decode dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDECODE, FAIL, "unable to decode dataspace"); if (H5S_select_iter_init(sel_iter, dataspace, type_info->dst_type_size, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); sel_iter_init = TRUE; iter_nelmts = H5S_GET_SELECT_NPOINTS(dataspace); /* Update the chunk data with the received modification data */ if (H5D__scatter_mem(msg_ptr, sel_iter, (size_t)iter_nelmts, chunk_entry->buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't scatter to write buffer") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't scatter to write buffer"); if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "couldn't release selection iterator"); sel_iter_init = FALSE; if (dataspace) { if (H5S_close(dataspace) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace"); dataspace = NULL; } @@ -4562,13 +4565,13 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch &(chunk_list->chunk_infos[i].index_info.filter_mask), err_detect, filter_cb, (size_t *)&chunk_list->chunk_infos[i].chunk_new.length, &chunk_list->chunk_infos[i].chunk_buf_size, &chunk_list->chunk_infos[i].buf) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed"); } #if H5_SIZEOF_SIZE_T > 4 /* Check for the chunk expanding too much to encode in a 32-bit value */ if (chunk_list->chunk_infos[i].chunk_new.length > ((size_t)0xffffffff)) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length"); #endif } @@ -4661,7 +4664,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t if (H5D__mpio_get_chunk_alloc_info_types(&recv_type, &recv_type_derived, &send_type, &send_type_derived) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't create derived datatypes for chunk file space info") + "can't create derived datatypes for chunk file space info"); /* * Gather the new chunk sizes to all ranks for a collective reallocation @@ -4698,7 +4701,8 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t if (H5_mpio_gatherv_alloc(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type, counts_ptr, displacements_ptr, recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size, &gathered_array, &collective_num_entries) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "can't gather chunk file space info to/from ranks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, + "can't gather chunk file space info to/from ranks"); } else { /* @@ -4711,7 +4715,8 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t if (H5_mpio_gatherv_alloc_simple(chunk_list->chunk_infos, (int)chunk_list->num_chunk_infos, send_type, recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size, &gathered_array, &collective_num_entries) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "can't gather chunk file space info to/from ranks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, + "can't gather chunk file space info to/from ranks"); } /* Collectively re-allocate the modified chunks (from each rank) in the file */ @@ -4723,7 +4728,7 @@ H5D__mpio_collective_filtered_chunk_reallocate(H5D_filtered_collective_io_info_t if (H5D__chunk_file_alloc(idx_info, &coll_entry->chunk_current, &coll_entry->chunk_new, &need_insert, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk"); /* * If we just re-allocated a chunk that is local to this @@ -4856,7 +4861,7 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t * if (H5D__mpio_get_chunk_insert_info_types(&recv_type, &recv_type_derived, &send_type, &send_type_derived) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't create derived datatypes for chunk re-insertion info") + "can't create derived datatypes for chunk re-insertion info"); /* * Gather information to all ranks for a collective re-insertion @@ -4894,7 +4899,7 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t * counts_ptr, displacements_ptr, recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size, &gathered_array, &collective_num_entries) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, - "can't gather chunk index re-insertion info to/from ranks") + "can't gather chunk index re-insertion info to/from ranks"); } else { /* @@ -4908,7 +4913,7 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t * recv_type, TRUE, 0, io_info->comm, mpi_rank, mpi_size, &gathered_array, &collective_num_entries) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, - "can't gather chunk index re-insertion info to/from ranks") + "can't gather chunk index re-insertion info to/from ranks"); } /* Initialize static chunk udata fields from chunk index info */ @@ -4979,7 +4984,7 @@ H5D__mpio_collective_filtered_chunk_reinsert(H5D_filtered_collective_io_info_t * #endif if ((idx_info->storage->ops->insert)(idx_info, &chunk_ud, di->dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk address into index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk address into index"); } done: @@ -5054,7 +5059,7 @@ H5D__mpio_get_chunk_redistribute_info_types(MPI_Datatype *contig_type, hbool_t * /* Create struct type for the inner H5F_block_t structure */ if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description"); field_count = 5; assert(field_count == (sizeof(types) / sizeof(MPI_Datatype))); @@ -5195,7 +5200,7 @@ H5D__mpio_get_chunk_alloc_info_types(MPI_Datatype *contig_type, hbool_t *contig_ /* Create struct type for the inner H5F_block_t structure */ if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description"); field_count = 3; assert(field_count == (sizeof(types) / sizeof(MPI_Datatype))); @@ -5326,7 +5331,7 @@ H5D__mpio_get_chunk_insert_info_types(MPI_Datatype *contig_type, hbool_t *contig /* Create struct type for an H5F_block_t structure */ if (H5F_mpi_get_file_block_type(FALSE, &chunk_block_type, &chunk_block_type_derived) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't create derived type for chunk file description"); field_count = 4; assert(field_count == (sizeof(types) / sizeof(MPI_Datatype))); @@ -5454,22 +5459,23 @@ H5D__mpio_collective_filtered_vec_io(const H5D_filtered_collective_io_info_t *ch if (iovec_count > 0) { if (chunk_list->num_chunk_infos > UINT32_MAX) HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, - "number of chunk entries in I/O operation exceeds UINT32_MAX") + "number of chunk entries in I/O operation exceeds UINT32_MAX"); if (NULL == (io_addrs = H5MM_malloc(iovec_count * sizeof(*io_addrs)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate space for I/O addresses vector") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "couldn't allocate space for I/O addresses vector"); if (NULL == (io_sizes = H5MM_malloc(iovec_count * sizeof(*io_sizes)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate space for I/O sizes vector") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't allocate space for I/O sizes vector"); if (op_type == H5D_IO_OP_WRITE) { if (NULL == (io_wbufs = H5MM_malloc(iovec_count * sizeof(*io_wbufs)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "couldn't allocate space for I/O buffers vector") + "couldn't allocate space for I/O buffers vector"); } else { if (NULL == (io_rbufs = H5MM_malloc(iovec_count * sizeof(*io_rbufs)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "couldn't allocate space for I/O buffers vector") + "couldn't allocate space for I/O buffers vector"); } /* @@ -5526,11 +5532,11 @@ H5D__mpio_collective_filtered_vec_io(const H5D_filtered_collective_io_info_t *ch if (op_type == H5D_IO_OP_WRITE) { if (H5F_shared_vector_write(f_sh, iovec_count, io_types, io_addrs, io_sizes, io_wbufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "vector write call failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "vector write call failed"); } else { if (H5F_shared_vector_read(f_sh, iovec_count, io_types, io_addrs, io_sizes, io_rbufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "vector read call failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "vector read call failed"); } done: diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 3ade6ee..181016d 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -131,7 +131,7 @@ H5D__none_idx_create(const H5D_chk_idx_info_t *idx_info) /* Allocate space for max dataset chunks */ addr = H5MF_alloc(idx_info->f, H5FD_MEM_DRAW, nbytes); if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed"); /* This is the address of the dataset chunks */ idx_info->storage->idx_addr = addr; @@ -251,7 +251,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t ch /* Make "generic chunk" callback */ if ((ret_value = (*chunk_cb)(&chunk_rec, chunk_udata)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CALLBACK, H5_ITER_ERROR, - "failure in generic chunk iterator callback") + "failure in generic chunk iterator callback"); /* Update coordinates of chunk in dataset */ curr_dim = (int)(ndims - 1); @@ -328,7 +328,7 @@ H5D__none_idx_delete(const H5D_chk_idx_info_t *idx_info) /* chunk size * max # of chunks */ nbytes = idx_info->layout->max_nchunks * idx_info->layout->size; if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, idx_info->storage->idx_addr, nbytes) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free dataset chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free dataset chunks"); idx_info->storage->idx_addr = HADDR_UNDEF; @@ -374,7 +374,7 @@ H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_inf /* Allocate dataset chunks in the dest. file */ if (H5D__none_idx_create(idx_info_dst) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); /* Reset metadata tag */ H5_END_TAG diff --git a/src/H5Doh.c b/src/H5Doh.c index 30d43fa..f4a9934 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -99,7 +99,7 @@ H5O__dset_get_copy_file_udata(void) /* Allocate space for the 'copy file' user data for copying datasets */ if (NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -169,13 +169,13 @@ H5O__dset_isa(const H5O_t *oh) /* Datatype */ if ((exists = H5O_msg_exists_oh(oh, H5O_DTYPE_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header"); else if (!exists) HGOTO_DONE(FALSE); /* Layout */ if ((exists = H5O_msg_exists_oh(oh, H5O_SDSPACE_ID)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header"); else if (!exists) HGOTO_DONE(FALSE); @@ -220,9 +220,9 @@ H5O__dset_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* Check class of LAPL from API context */ if ((is_lapl = H5P_isa_class(dapl_id, H5P_LINK_ACCESS)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "unable to get LAPL status") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "unable to get LAPL status"); if ((is_dapl = H5P_isa_class(dapl_id, H5P_DATASET_ACCESS)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "unable to get DAPL status") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "unable to get DAPL status"); /* Switch to default DAPL if not an actual DAPL in the API context */ if (!is_dapl && is_lapl) @@ -231,7 +231,7 @@ H5O__dset_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* Open the dataset */ if (NULL == (dset = H5D_open(obj_loc, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open dataset"); ret_value = (void *)dset; @@ -270,13 +270,13 @@ H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc) /* Create the dataset */ if (NULL == (dset = H5D__create(f, crt_info->type_id, crt_info->space, crt_info->dcpl_id, crt_info->dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset"); /* Set up the new dataset's location */ if (NULL == (obj_loc->oloc = H5D_oloc(dset))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of dataset"); if (NULL == (obj_loc->path = H5D_nameof(dset))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of dataset"); /* Set the return value */ ret_value = dset; @@ -309,11 +309,11 @@ H5O__dset_get_oloc(hid_t obj_id) /* Get the dataset */ if (NULL == (dset = (H5D_t *)H5VL_object(obj_id))) - HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID") + HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID"); /* Get the dataset's object header location */ if (NULL == (ret_value = H5D_oloc(dset))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -351,14 +351,14 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Get the layout message from the object header */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_LAYOUT_ID, &layout)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message"); layout_read = TRUE; /* Check for chunked dataset storage */ if (layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) { /* Get size of chunk index */ if (H5D__chunk_bh_info(loc, oh, &layout, &(bh_info->index_size)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info"); } /* end if */ else if (layout.type == H5D_VIRTUAL && (layout.storage.u.virt.serial_list_hobjid.addr != HADDR_UNDEF)) { size_t virtual_heap_size; @@ -366,7 +366,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Get size of global heap object for virtual dataset */ if (H5HG_get_obj_size(loc->file, &(layout.storage.u.virt.serial_list_hobjid), &virtual_heap_size) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "can't get global heap size for virtual dataset mapping") + "can't get global heap size for virtual dataset mapping"); /* Return heap size */ bh_info->heap_size = (hsize_t)virtual_heap_size; @@ -374,7 +374,7 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Check for External File List message in the object header */ if ((exists = H5O_msg_exists_oh(oh, H5O_EFL_ID)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message"); if (exists && H5D__efl_is_space_alloc(&layout.storage)) { /* Start with clean EFL info */ @@ -382,12 +382,12 @@ H5O__dset_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Get External File List message from the object header */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_EFL_ID, &efl)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message"); efl_read = TRUE; /* Get size of local heap for EFL message's file list */ if (H5D__efl_bh_info(loc->file, &efl, &(bh_info->heap_size)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine EFL heap info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine EFL heap info"); } /* end if */ done: @@ -424,9 +424,9 @@ H5O__dset_flush(void *_obj_ptr) /* Check that the object found is the correct type */ if (H5O_obj_type(&dset->oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type"); if (obj_type != H5O_TYPE_DATASET) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset"); if (H5D__flush_real(dset) < 0) HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info"); diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 4a23fe7..67dfb83 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -92,7 +92,7 @@ \ /* Check if the space is contiguous */ \ if (H5S_select_contig_block((PIECE_INFO)->mspace, &is_contig, &sel_off, NULL) < 0) \ - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't check if dataspace is contiguous") \ + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't check if dataspace is contiguous"); \ \ /* If the first sequence includes all the elements selected in this piece, it it contiguous \ */ \ diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index e5743eb..59b5944 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -119,7 +119,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -127,15 +127,15 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); /* Loop until all elements are written */ while (nelmts > 0) { /* Get list of sequences for selection to write */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, vec_size, nelmts, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Reset the current sequence information */ mem_curr_seq = dset_curr_seq = 0; @@ -145,7 +145,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset /* Write sequence list out */ if ((*tmp_dset_info.layout_ops.writevv)(&tmp_io_info, &tmp_dset_info, nseq, &dset_curr_seq, len, off, (size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") + HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); /* Update buffer */ tmp_dset_info.buf.cvp = (const uint8_t *)tmp_dset_info.buf.cvp + orig_mem_len; @@ -220,7 +220,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_ /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -228,15 +228,15 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_ else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O offset vector array"); /* Loop until all elements are read */ while (nelmts > 0) { /* Get list of sequences for selection to read */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, vec_size, nelmts, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Reset the current sequence information */ mem_curr_seq = dset_curr_seq = 0; @@ -246,7 +246,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info, const H5D_dset_io_info_t *_dset_ /* Read sequence list in */ if ((*tmp_dset_info.layout_ops.readvv)(&tmp_io_info, &tmp_dset_info, nseq, &dset_curr_seq, len, off, (size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, 0, "read error") + HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, 0, "read error"); /* Update buffer */ tmp_dset_info.buf.vp = (uint8_t *)tmp_dset_info.buf.vp + orig_mem_len; @@ -302,7 +302,7 @@ H5D__scatter_mem(const void *_tscat_buf, H5S_sel_iter_t *iter, size_t nelmts, vo /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -310,15 +310,15 @@ H5D__scatter_mem(const void *_tscat_buf, H5S_sel_iter_t *iter, size_t nelmts, vo else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); /* Loop until all elements are written */ while (nelmts > 0) { /* Get list of sequences for selection to write */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, vec_size, nelmts, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Loop, while sequences left to process */ for (curr_seq = 0; curr_seq < nseq; curr_seq++) { @@ -384,7 +384,7 @@ H5D__gather_mem(const void *_buf, H5S_sel_iter_t *iter, size_t nelmts, void *_tg /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -392,15 +392,15 @@ H5D__gather_mem(const void *_buf, H5S_sel_iter_t *iter, size_t nelmts, void *_tg else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, 0, "can't allocate I/O offset vector array"); /* Loop until all elements are written */ while (nelmts > 0) { /* Get list of sequences for selection to write */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, vec_size, nelmts, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Loop, while sequences left to process */ for (curr_seq = 0; curr_seq < nseq; curr_seq++) { @@ -468,22 +468,22 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ /* Allocate the iterators */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator"); if (NULL == (bkg_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate background iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate background iterator"); if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator"); /* Figure out the strip mine size. */ if (H5S_select_iter_init(file_iter, dset_info->file_space, dset_info->type_info.src_type_size, H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information"); file_iter_init = TRUE; /*file selection iteration info has been initialized */ if (H5S_select_iter_init(mem_iter, dset_info->mem_space, dset_info->type_info.dst_type_size, 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information"); mem_iter_init = TRUE; /*file selection iteration info has been initialized */ if (H5S_select_iter_init(bkg_iter, dset_info->mem_space, dset_info->type_info.dst_type_size, 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information"); bkg_iter_init = TRUE; /*file selection iteration info has been initialized */ /* Start strip mining... */ @@ -505,7 +505,7 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ */ n = H5D__gather_file(io_info, dset_info, file_iter, smine_nelmts, io_info->tconv_buf /*out*/); if (n != smine_nelmts) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed"); /* If the source and destination are compound types and subset of each other * and no conversion is needed, copy the data directly into user's buffer and @@ -515,13 +515,13 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ H5T_SUBSET_FALSE != dset_info->type_info.cmpd_subset->subset) { if (H5D__compound_opt_read(smine_nelmts, mem_iter, &dset_info->type_info, io_info->tconv_buf, buf /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed"); } /* end if */ else { if (H5T_BKG_YES == dset_info->type_info.need_bkg) { n = H5D__gather_mem(buf, bkg_iter, smine_nelmts, io_info->bkg_buf /*out*/); if (n != smine_nelmts) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed"); } /* end if */ /* @@ -530,7 +530,7 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ if (H5T_convert(dset_info->type_info.tpath, dset_info->type_info.src_type_id, dset_info->type_info.dst_type_id, smine_nelmts, (size_t)0, (size_t)0, io_info->tconv_buf, io_info->bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Do the data transform after the conversion (since we're using type mem_type) */ if (!dset_info->type_info.is_xform_noop) { @@ -538,16 +538,16 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_ /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); if (H5Z_xform_eval(data_transform, io_info->tconv_buf, smine_nelmts, dset_info->type_info.mem_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform"); } /* Scatter the data into memory */ if (H5D__scatter_mem(io_info->tconv_buf, mem_iter, smine_nelmts, buf /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed"); } /* end else */ } /* end for */ @@ -610,23 +610,23 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset /* Allocate the iterators */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator"); if (NULL == (bkg_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate background iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate background iterator"); if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator"); /* Figure out the strip mine size. */ if (H5S_select_iter_init(file_iter, dset_info->file_space, dset_info->type_info.dst_type_size, H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file selection information"); file_iter_init = TRUE; /*file selection iteration info has been initialized */ if (H5S_select_iter_init(mem_iter, dset_info->mem_space, dset_info->type_info.src_type_size, 0) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information"); mem_iter_init = TRUE; /*file selection iteration info has been initialized */ if (H5S_select_iter_init(bkg_iter, dset_info->file_space, dset_info->type_info.dst_type_size, H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize background selection information"); bkg_iter_init = TRUE; /*file selection iteration info has been initialized */ /* Start strip mining... */ @@ -644,7 +644,7 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset */ n = H5D__gather_mem(buf, mem_iter, smine_nelmts, io_info->tconv_buf /*out*/); if (n != smine_nelmts) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed"); /* If the source and destination are compound types and the destination is * is a subset of the source and no conversion is needed, copy the data @@ -655,13 +655,13 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset if (dset_info->type_info.cmpd_subset && H5T_SUBSET_DST == dset_info->type_info.cmpd_subset->subset && dset_info->type_info.dst_type_size == dset_info->type_info.cmpd_subset->copy_size) { if (H5D__compound_opt_write(smine_nelmts, &dset_info->type_info, io_info->tconv_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed"); } /* end if */ else { if (H5T_BKG_YES == dset_info->type_info.need_bkg) { n = H5D__gather_file(io_info, dset_info, bkg_iter, smine_nelmts, io_info->bkg_buf /*out*/); if (n != smine_nelmts) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed"); } /* end if */ /* Do the data transform before the type conversion (since @@ -671,11 +671,11 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); if (H5Z_xform_eval(data_transform, io_info->tconv_buf, smine_nelmts, dset_info->type_info.mem_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform"); } /* @@ -684,14 +684,14 @@ H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset if (H5T_convert(dset_info->type_info.tpath, dset_info->type_info.src_type_id, dset_info->type_info.dst_type_id, smine_nelmts, (size_t)0, (size_t)0, io_info->tconv_buf, io_info->bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); } /* end else */ /* * Scatter the data out to the file. */ if (H5D__scatter_file(io_info, dset_info, file_iter, smine_nelmts, io_info->tconv_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed"); } /* end for */ done: @@ -747,18 +747,18 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) /* Allocate list of buffers (within the tconv buf) */ if (NULL == (tmp_bufs = H5MM_malloc(io_info->pieces_added * sizeof(void *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary buffer list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary buffer list"); /* Allocate the iterator */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator"); /* Allocate list of block memory spaces */ /*!FIXME delay doing this until we find the first mem space that is non-contiguous or doesn't start at 0 */ if (NULL == (tmp_mem_spaces = H5MM_malloc(io_info->pieces_added * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for temporary memory space list") + "memory allocation failed for temporary memory space list"); /* Build read operation to tconv buffer */ for (i = 0; i < io_info->pieces_added; i++) { @@ -777,7 +777,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) if (NULL == (tmp_mem_spaces[i] = H5S_create_simple(1, &io_info->sel_pieces[i]->piece_points, NULL))) { 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace"); } /* Check for in-place type conversion */ @@ -813,19 +813,19 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) 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, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */ if ((size_t)io_info->sel_pieces[i]->piece_points != H5D__gather_mem(io_info->rbufs[i], mem_iter, (size_t)io_info->sel_pieces[i]->piece_points, tmp_bkg_buf /*out*/)) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed"); /* Reset selection iterator */ assert(mem_iter_init); if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator"); mem_iter_init = FALSE; } } @@ -837,7 +837,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) H5_CHECK_OVERFLOW(io_info->pieces_added, size_t, uint32_t); if (H5F_shared_select_read(io_info->f_sh, H5FD_MEM_DRAW, (uint32_t)io_info->pieces_added, tmp_mem_spaces, io_info->file_spaces, io_info->addrs, io_info->element_sizes, tmp_bufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read failed"); /* Reset bkg_bytes_used */ bkg_bytes_used = 0; @@ -857,7 +857,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) 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, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */ /* If the source and destination are compound types and subset of each other @@ -867,7 +867,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) if (H5D__SCATGATH_USE_CMPD_OPT_READ(dset_info, io_info->sel_pieces[i])) { if (H5D__compound_opt_read((size_t)io_info->sel_pieces[i]->piece_points, mem_iter, &dset_info->type_info, tmp_bufs[i], io_info->rbufs[i] /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed"); } else { /* Check for background buffer */ @@ -888,7 +888,7 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) dset_info->type_info.dst_type_id, (size_t)io_info->sel_pieces[i]->piece_points, (size_t)0, (size_t)0, tmp_bufs[i], tmp_bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Do the data transform after the conversion (since we're using type mem_type) */ if (!dset_info->type_info.is_xform_noop) { @@ -896,25 +896,25 @@ H5D__scatgath_read_select(H5D_io_info_t *io_info) /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); if (H5Z_xform_eval(data_transform, tmp_bufs[i], (size_t)io_info->sel_pieces[i]->piece_points, dset_info->type_info.mem_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform"); } /* Scatter the data into memory if this was not an in-place conversion */ if (!io_info->sel_pieces[i]->in_place_tconv) if (H5D__scatter_mem(tmp_bufs[i], mem_iter, (size_t)io_info->sel_pieces[i]->piece_points, io_info->rbufs[i] /*out*/) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed"); } /* Release selection iterator */ assert(mem_iter_init); if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator"); mem_iter_init = FALSE; } } @@ -984,18 +984,18 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) /* Allocate list of buffers (within the tconv buf) */ if (NULL == (write_bufs = (const void **)H5MM_malloc(io_info->pieces_added * sizeof(const void *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary buffer list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary buffer list"); /* Allocate the iterator */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator"); /* Allocate list of block memory spaces */ /*!FIXME delay doing this until we find the first mem space that is non-contiguous or doesn't start at 0 */ if (NULL == (write_mem_spaces = H5MM_malloc(io_info->pieces_added * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for temporary memory space list") + "memory allocation failed for temporary memory space list"); /* Build operations to read data to background buffer and to write data */ for (i = 0; i < io_info->pieces_added; i++) { @@ -1021,13 +1021,13 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) 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, - "unable to initialize memory selection information") + "unable to initialize memory selection information"); mem_iter_init = TRUE; /* Memory selection iteration info has been initialized */ /* Create block memory space */ if (NULL == (write_mem_spaces[i] = H5S_create_simple(1, &io_info->sel_pieces[i]->piece_points, NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace"); spaces_added++; /* Check for in-place type conversion */ @@ -1052,7 +1052,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) if ((size_t)io_info->sel_pieces[i]->piece_points != H5D__gather_mem(io_info->wbufs[i], mem_iter, (size_t)io_info->sel_pieces[i]->piece_points, tmp_write_buf /*out*/)) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed"); } /* Set buffer for writing to disk (from type conversion buffer) */ @@ -1070,7 +1070,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) !io_info->sel_pieces[i]->in_place_tconv) { if (H5D__compound_opt_write((size_t)io_info->sel_pieces[i]->piece_points, &dset_info->type_info, tmp_write_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* No background buffer necessary, prevent this element from being considered in the second * loop */ @@ -1098,19 +1098,19 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) 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") + "memory allocation failed for memory space list"); if (NULL == (bkg_file_spaces = H5MM_malloc(io_info->pieces_added * sizeof(H5S_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for file space list") + "memory allocation failed for file space list"); if (NULL == (bkg_addrs = H5MM_malloc(io_info->pieces_added * sizeof(haddr_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for piece address list") + "memory allocation failed for piece address list"); if (NULL == (bkg_element_sizes = H5MM_malloc(io_info->pieces_added * sizeof(size_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for element size list") + "memory allocation failed for element size list"); if (NULL == (bkg_bufs = H5MM_malloc(io_info->pieces_added * sizeof(const void *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for write buffer list") + "memory allocation failed for write buffer list"); } /* Use same (block) memory space, file space, address, and element size as write operation @@ -1137,12 +1137,12 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); if (H5Z_xform_eval(data_transform, tmp_write_buf, (size_t)io_info->sel_pieces[i]->piece_points, dset_info->type_info.mem_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform"); } /* @@ -1152,14 +1152,14 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) dset_info->type_info.dst_type_id, (size_t)io_info->sel_pieces[i]->piece_points, (size_t)0, (size_t)0, tmp_write_buf, tmp_bkg_buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); } } /* Release selection iterator */ assert(mem_iter_init); if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator"); mem_iter_init = FALSE; } } @@ -1174,7 +1174,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) H5_CHECK_OVERFLOW(bkg_pieces, size_t, uint32_t); if (H5F_shared_select_read(io_info->f_sh, H5FD_MEM_DRAW, (uint32_t)bkg_pieces, bkg_mem_spaces, bkg_file_spaces, bkg_addrs, bkg_element_sizes, bkg_bufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read to background buffer failed") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "selection read to background buffer failed"); /* Perform type conversion on pieces with background buffers that were just read */ for (i = 0; i < io_info->pieces_added; i++) { @@ -1195,12 +1195,12 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) /* Retrieve info from API context */ if (H5CX_get_data_transform(&data_transform) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info"); if (H5Z_xform_eval(data_transform, tmp_write_buf, (size_t)io_info->sel_pieces[i]->piece_points, dset_info->type_info.mem_type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "Error performing data transform"); } /* @@ -1211,7 +1211,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) dset_info->type_info.dst_type_id, (size_t)io_info->sel_pieces[i]->piece_points, (size_t)0, (size_t)0, tmp_write_buf, bkg_bufs[j]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Advance to next background buffer */ j++; @@ -1226,7 +1226,7 @@ H5D__scatgath_write_select(H5D_io_info_t *io_info) if (H5F_shared_select_write(io_info->f_sh, H5FD_MEM_DRAW, (uint32_t)io_info->pieces_added, write_mem_spaces, io_info->file_spaces, io_info->addrs, io_info->element_sizes, write_bufs) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "selection write failed") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "selection write failed"); done: /* Release and free selection iterator */ @@ -1320,7 +1320,7 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_ /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -1328,9 +1328,9 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_ else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); /* Get source & destination strides */ src_stride = type_info->src_type_size; @@ -1348,7 +1348,7 @@ H5D__compound_opt_read(size_t nelmts, H5S_sel_iter_t *iter, const H5D_type_info_ /* Get list of sequences for selection to write */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, vec_size, nelmts, &nseq, &elmtno, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Loop, while sequences left to process */ for (curr_seq = 0; curr_seq < nseq; curr_seq++) { diff --git a/src/H5Dselect.c b/src/H5Dselect.c index 11e2e32..06bb696 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -101,7 +101,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info assert(dset_info->buf.vp); if (elmt_size == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0"); /* Initialize nelmts */ nelmts = dset_info->nelmts; @@ -115,9 +115,9 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info /* Get offset of first element in selections */ if (H5S_SELECT_OFFSET(dset_info->file_space, &single_file_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve file selection offset") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve file selection offset"); if (H5S_SELECT_OFFSET(dset_info->mem_space, &single_mem_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve memory selection offset") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve memory selection offset"); /* Set up necessary information for I/O operation */ file_nseq = mem_nseq = 1; @@ -131,14 +131,14 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info if ((tmp_file_len = (*dset_info->layout_ops.readvv)( 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") + HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error"); } /* end if */ else { 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") + HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); } /* end else */ /* Decrement number of elements left to process */ @@ -150,7 +150,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -158,29 +158,29 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info else vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); if (NULL == (file_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); /* Allocate the iterators */ if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator"); if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator"); /* Initialize file iterator */ if (H5S_select_iter_init(file_iter, dset_info->file_space, elmt_size, H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); file_iter_init = 1; /* File selection iteration info has been initialized */ /* Initialize memory iterator */ if (H5S_select_iter_init(mem_iter, dset_info->mem_space, elmt_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); mem_iter_init = 1; /* Memory selection iteration info has been initialized */ /* Initialize sequence counts */ @@ -194,7 +194,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info /* Get sequences for file selection */ if (H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, vec_size, nelmts, &file_nseq, &file_nelem, file_off, file_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Start at the beginning of the sequences again */ curr_file_seq = 0; @@ -205,7 +205,7 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info /* Get sequences for memory selection */ if (H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, vec_size, nelmts, &mem_nseq, &mem_nelem, mem_off, mem_len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Start at the beginning of the sequences again */ curr_mem_seq = 0; @@ -216,14 +216,14 @@ H5D__select_io(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info if ((tmp_file_len = (*dset_info->layout_ops.readvv)( io_info, dset_info, file_nseq, &curr_file_seq, file_len, file_off, mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") + HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error"); } /* end if */ else { 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") + HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); } /* end else */ /* Decrement number of elements left to process */ @@ -301,7 +301,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s assert(src_space); if (elmt_size == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "invalid elmt_size of 0"); /* Check for only one element in selection */ if (nelmts == 1) { @@ -312,9 +312,9 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s /* Get offset of first element in selections */ if (H5S_SELECT_OFFSET(dst_space, &single_dst_off) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve destination selection offset") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve destination selection offset"); if (H5S_SELECT_OFFSET(src_space, &single_src_off) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve source selection offset") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve source selection offset"); /* Set up necessary information for I/O operation */ dst_nseq = src_nseq = 1; @@ -327,7 +327,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s if ((bytes_copied = H5VM_memcpyvv(dst_buf, dst_nseq, &curr_dst_seq, &single_dst_len, &single_dst_off, src_buf, src_nseq, &curr_src_seq, &single_src_len, &single_src_off)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); assert(((size_t)bytes_copied % elmt_size) == 0); } @@ -338,7 +338,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s /* Get info from API context */ if (H5CX_get_vec_size(&dxpl_vec_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't retrieve I/O vector size"); /* Allocate the vector I/O arrays */ if (dxpl_vec_size > H5D_IO_VECTOR_SIZE) @@ -347,28 +347,28 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s vec_size = H5D_IO_VECTOR_SIZE; if (NULL == (dst_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (dst_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); if (NULL == (src_len = H5FL_SEQ_MALLOC(size_t, vec_size))) - HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array") + HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array"); if (NULL == (src_off = H5FL_SEQ_MALLOC(hsize_t, vec_size))) - HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array") + HGOTO_ERROR(H5E_IO, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array"); /* Allocate the dataspace selection iterators */ if (NULL == (dst_sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate destination selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate destination selection iterator"); if (NULL == (src_sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate source selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate source selection iterator"); /* Initialize destination selection iterator */ if (H5S_select_iter_init(dst_sel_iter, dst_space, elmt_size, sel_iter_flags) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); dst_sel_iter_init = TRUE; /* Destination selection iteration info has been initialized */ /* Initialize source selection iterator */ if (H5S_select_iter_init(src_sel_iter, src_space, elmt_size, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); src_sel_iter_init = TRUE; /* Source selection iteration info has been initialized */ /* Initialize sequence counts */ @@ -382,7 +382,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s /* Get sequences for destination selection */ if (H5S_SELECT_ITER_GET_SEQ_LIST(dst_sel_iter, vec_size, nelmts, &dst_nseq, &dst_nelem, dst_off, dst_len) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed"); /* Start at the beginning of the sequences again */ curr_dst_seq = 0; @@ -393,7 +393,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s /* Get sequences for source selection */ if (H5S_SELECT_ITER_GET_SEQ_LIST(src_sel_iter, vec_size, nelmts, &src_nseq, &src_nelem, src_off, src_len) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed"); /* Start at the beginning of the sequences again */ curr_src_seq = 0; @@ -402,7 +402,7 @@ H5D_select_io_mem(void *dst_buf, H5S_t *dst_space, const void *src_buf, H5S_t *s /* Perform vectorized memcpy from src_buf to dst_buf */ if ((bytes_copied = H5VM_memcpyvv(dst_buf, dst_nseq, &curr_dst_seq, dst_len, dst_off, src_buf, src_nseq, &curr_src_seq, src_len, src_off)) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vectorized memcpy failed"); /* Decrement number of elements left to process */ assert(((size_t)bytes_copied % elmt_size) == 0); @@ -456,7 +456,7 @@ H5D__select_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_in /* Call generic selection operation */ if (H5D__select_io(io_info, dset_info, dset_info->type_info.src_type_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error") + HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -480,7 +480,7 @@ H5D__select_write(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_i /* Call generic selection operation */ if (H5D__select_io(io_info, dset_info, dset_info->type_info.dst_type_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error") + HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index 12c776d..926c78a 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -224,7 +224,7 @@ H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata if (dset->shared->dcpl_cache.fill.alloc_time != H5D_ALLOC_TIME_EARLY || idx_info->pline->nused > 0) /* Mark the layout dirty so that the address of the single chunk will be flushed later */ if (H5D__mark(dset, H5D_MARK_LAYOUT) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark layout as dirty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark layout as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -348,7 +348,7 @@ H5D__single_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t nbytes = idx_info->layout->size; if (H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, idx_info->storage->idx_addr, nbytes) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free dataset chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, H5_ITER_ERROR, "unable to free dataset chunks"); idx_info->storage->idx_addr = HADDR_UNDEF; @@ -424,7 +424,7 @@ H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_i /* Set up information at the destination file */ if (H5D__single_idx_create(idx_info_dst) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize chunked storage"); /* Reset metadata tag */ H5_END_TAG diff --git a/src/H5Dtest.c b/src/H5Dtest.c index faeb03c..0038d98 100644 --- a/src/H5Dtest.c +++ b/src/H5Dtest.c @@ -79,7 +79,7 @@ H5D__layout_version_test(hid_t did, unsigned *version) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset"); if (version) *version = dset->shared->layout.version; @@ -117,7 +117,7 @@ H5D__layout_contig_size_test(hid_t did, hsize_t *size) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset"); if (size) { assert(dset->shared->layout.type == H5D_CONTIGUOUS); @@ -157,7 +157,7 @@ H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset"); if (dirty) { assert(dset->shared->layout.type == H5D_COMPACT); @@ -199,7 +199,7 @@ H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); if (layout_type) *layout_type = dset->shared->layout.type; @@ -237,9 +237,9 @@ H5D__layout_idx_type_test(hid_t did, H5D_chunk_index_t *idx_type) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); if (dset->shared->layout.type != H5D_CHUNKED) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not chunked") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not chunked"); if (idx_type) *idx_type = dset->shared->layout.u.chunk.idx_type; @@ -277,7 +277,7 @@ H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused) /* Check args */ if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); if (nbytes_used) { assert(dset->shared->layout.type == H5D_CHUNKED); diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index cc24698..64f1bfe 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -162,15 +162,15 @@ H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space, /* Check for point selections (currently unsupported) */ if (H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(vspace))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type"); if (select_type == H5S_SEL_POINTS) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "point selections not currently supported with virtual datasets") + "point selections not currently supported with virtual datasets"); if (H5S_SEL_ERROR == (select_type = H5S_GET_SELECT_TYPE(src_space))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get selection type"); if (select_type == H5S_SEL_POINTS) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "point selections not currently supported with virtual datasets") + "point selections not currently supported with virtual datasets"); /* Get number of elements in spaces */ nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(vspace); @@ -190,14 +190,14 @@ H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space, */ if (H5S_get_select_num_elem_non_unlim(vspace, &nenu_vs) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, - "can't get number of elements in non-unlimited dimension") + "can't get number of elements in non-unlimited dimension"); if (H5S_get_select_num_elem_non_unlim(src_space, &nenu_ss) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, - "can't get number of elements in non-unlimited dimension") + "can't get number of elements in non-unlimited dimension"); if (nenu_vs != nenu_ss) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "numbers of elements in the non-unlimited dimensions is different for source and " - "virtual spaces") + "virtual spaces"); } /* end if */ /* We will handle the printf case after parsing the source names */ } /* end if */ @@ -205,7 +205,7 @@ H5D_virtual_check_mapping_pre(const H5S_t *vspace, const H5S_t *src_space, /* Limited selections. Check number of points is the same. */ if (nelmts_vs != nelmts_ss) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "virtual and source space selections have different numbers of elements") + "virtual and source space selections have different numbers of elements"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -242,12 +242,12 @@ H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent) if ((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unlimited virtual selection, limited source selection, and no printf specifiers in " - "source names") + "source names"); /* Make sure virtual space uses hyperslab selection */ if (H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select) != H5S_SEL_HYPERSLABS) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, - "virtual selection with printf mapping must be hyperslab") + "virtual selection with printf mapping must be hyperslab"); /* Check that the number of elements in one block in the virtual * selection matches the total number of elements in the source @@ -256,14 +256,14 @@ H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent) if (ent->source_space_status != H5O_VIRTUAL_STATUS_INVALID) { /* Get first block in virtual selection */ if (NULL == (tmp_space = H5S_hyper_get_unlim_block(ent->source_dset.virtual_select, (hsize_t)0))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get first block in virtual selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get first block in virtual selection"); /* Check number of points */ nelmts_vs = (hsize_t)H5S_GET_SELECT_NPOINTS(tmp_space); if (nelmts_vs != nelmts_ss) HGOTO_ERROR( H5E_ARGS, H5E_BADVALUE, FAIL, - "virtual (single block) and source space selections have different numbers of elements") + "virtual (single block) and source space selections have different numbers of elements"); } /* end if */ } /* end if */ else @@ -271,7 +271,7 @@ H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent) if ((ent->psfn_nsubs > 0) || (ent->psdn_nsubs > 0)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "printf specifier(s) in source name(s) without an unlimited virtual selection and " - "limited source selection") + "limited source selection"); done: /* Free temporary space */ @@ -314,7 +314,7 @@ H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) /* Get type of selection */ if (H5S_SEL_ERROR == (sel_type = H5S_GET_SELECT_TYPE(ent->source_dset.virtual_select))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection type") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection type"); /* Do not update min_dims for "all" or "none" selections */ if ((sel_type == H5S_SEL_ALL) || (sel_type == H5S_SEL_NONE)) @@ -322,11 +322,11 @@ H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx) /* Get rank of vspace */ if ((rank = H5S_GET_EXTENT_NDIMS(ent->source_dset.virtual_select)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions"); /* Get selection bounds */ if (H5S_SELECT_BOUNDS(ent->source_dset.virtual_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds"); /* Update min_dims */ for (i = 0; i < rank; i++) @@ -364,18 +364,18 @@ H5D_virtual_check_min_dims(const H5D_t *dset) /* Get rank of dataspace */ if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions"); /* Get VDS dimensions */ if (H5S_get_simple_extent_dims(dset->shared->space, dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions"); /* Verify that dimensions are larger than min_dims */ for (i = 0; i < rank; i++) if (dims[i] < dset->shared->layout.storage.u.virt.min_dims[i]) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "virtual dataset dimensions not large enough to contain all limited dimensions in " - "all selections") + "all selections"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -423,7 +423,7 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Allocate array for caching results of strlen */ if (NULL == (str_size = (size_t *)H5MM_malloc(2 * virt->list_nused * sizeof(size_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array") + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate string length array"); /* * Calculate heap block size @@ -452,12 +452,12 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Source selection */ if ((select_serial_size = H5S_SELECT_SERIAL_SIZE(ent->source_select)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size"); block_size += (size_t)select_serial_size; /* Virtual dataset selection */ if ((select_serial_size = H5S_SELECT_SERIAL_SIZE(ent->source_dset.virtual_select)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to check dataspace selection size"); block_size += (size_t)select_serial_size; } /* end for */ @@ -466,7 +466,7 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Allocate heap block */ if (NULL == (heap_block = (uint8_t *)H5MM_malloc(block_size))) - HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate heap block") + HGOTO_ERROR(H5E_OHDR, H5E_RESOURCE, FAIL, "unable to allocate heap block"); /* * Encode heap block @@ -493,11 +493,11 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Source selection */ if (H5S_SELECT_SERIALIZE(ent->source_select, &heap_block_p) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize source selection"); /* Virtual selection */ if (H5S_SELECT_SERIALIZE(ent->source_dset.virtual_select, &heap_block_p) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to serialize virtual selection"); } /* end for */ /* Checksum */ @@ -506,7 +506,7 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout) /* Insert block into global heap */ if (H5HG_insert(f, block_size, heap_block, &(virt->serial_list_hobjid)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block"); } /* end if */ done: @@ -560,7 +560,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Allocate memory for the list */ if (NULL == (virt->list = H5MM_calloc(virt->list_nused * sizeof(virt->list[0])))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, - "unable to allocate memory for virtual dataset entry list") + "unable to allocate memory for virtual dataset entry list"); virt->list_nalloc = virt->list_nused; /* Copy the list entries, though set source_dset.dset and sub_dset to @@ -571,17 +571,17 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Copy virtual selection */ if (NULL == (ent->source_dset.virtual_select = H5S_copy(orig_list[i].source_dset.virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); /* Copy original source names */ if (NULL == (ent->source_file_name = H5MM_strdup(orig_list[i].source_file_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name"); if (NULL == (ent->source_dset_name = H5MM_strdup(orig_list[i].source_dset_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name"); /* Copy source selection */ if (NULL == (ent->source_select = H5S_copy(orig_list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection"); /* Initialize clipped selections */ if (orig_list[i].unlim_dim_virtual < 0) { @@ -592,12 +592,12 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Copy parsed names */ if (H5D__virtual_copy_parsed_name(&ent->parsed_source_file_name, orig_list[i].parsed_source_file_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source file name") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source file name"); ent->psfn_static_strlen = orig_list[i].psfn_static_strlen; ent->psfn_nsubs = orig_list[i].psfn_nsubs; if (H5D__virtual_copy_parsed_name(&ent->parsed_source_dset_name, orig_list[i].parsed_source_dset_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source dataset name") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy parsed source dataset name"); ent->psdn_static_strlen = orig_list[i].psdn_static_strlen; ent->psdn_nsubs = orig_list[i].psdn_nsubs; @@ -615,7 +615,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) } /* end if */ else if (NULL == (ent->source_dset.file_name = H5MM_strdup(orig_list[i].source_dset.file_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name") + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source file name"); } /* end if */ if (orig_list[i].source_dset.dset_name) { if (orig_list[i].source_dset.dset_name == orig_list[i].source_dset_name) @@ -629,7 +629,7 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) } /* end if */ else if (NULL == (ent->source_dset.dset_name = H5MM_strdup(orig_list[i].source_dset.dset_name))) - HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name") + HGOTO_ERROR(H5E_DATASET, H5E_RESOURCE, FAIL, "unable to duplicate source dataset name"); } /* end if */ /* Copy other fields in entry */ @@ -652,15 +652,15 @@ H5D__virtual_copy_layout(H5O_layout_t *layout) /* Copy property lists */ if (orig_source_fapl >= 0) { if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_fapl, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if ((virt->source_fapl = H5P_copy_plist(plist, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy fapl") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy fapl"); } /* end if */ if (orig_source_dapl >= 0) { if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(orig_source_dapl, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if ((virt->source_dapl = H5P_copy_plist(plist, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl"); } /* end if */ /* New layout is not fully initialized */ @@ -778,7 +778,7 @@ H5D__virtual_copy(H5F_t *f_dst, H5O_layout_t *layout_dst) if (f_dst == f_src) { /* Increase reference count on global heap object */ if ((heap_rc = H5HG_link(f_dst, (H5HG_t *)&(layout_dst->u.virt.serial_list_hobjid), 1)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap reference count") + HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap reference count"); } /* end if */ else #endif /* NOT_YET */ @@ -789,7 +789,7 @@ H5D__virtual_copy(H5F_t *f_dst, H5O_layout_t *layout_dst) /* Write the VDS data to destination file's heap */ if (H5D__virtual_store_layout(f_dst, layout_dst) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to store VDS info") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to store VDS info"); } /* end block/else */ done: @@ -825,12 +825,12 @@ H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) #ifdef NOT_YET /* Unlink the global heap block */ if ((heap_rc = H5HG_link(f, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap reference count") + HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap reference count"); if (heap_rc == 0) #endif /* NOT_YET */ /* Delete the global heap block */ if (H5HG_remove(f, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object"); } /* end if */ /* Clear global heap ID in storage */ @@ -895,9 +895,9 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir /* Set up the root group in the destination file */ if (NULL == (src_root_loc.oloc = H5G_oloc(H5G_rootof(src_file)))) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (src_root_loc.path = H5G_nameof(H5G_rootof(src_file)))) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Try opening the source dataset */ source_dset->dset = H5D__open_name(&src_root_loc, source_dset->dset_name, @@ -917,7 +917,7 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir /* Patch the source selection if necessary */ if (virtual_ent->source_space_status != H5O_VIRTUAL_STATUS_CORRECT) { if (H5S_extent_copy(virtual_ent->source_select, source_dset->dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent"); virtual_ent->source_space_status = H5O_VIRTUAL_STATUS_CORRECT; } /* end if */ } /* end else */ @@ -1043,7 +1043,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s /* Allocate buffer */ if (NULL == (*buf = (char *)H5MM_malloc(src_len + (size_t)1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct"); *buf_size = src_len + (size_t)1; *p = *buf; } /* end if */ @@ -1060,7 +1060,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s /* Reallocate buffer */ if (NULL == (tmp_buf = (char *)H5MM_realloc(*buf, tmp_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to reallocate name segment buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to reallocate name segment buffer"); *buf = tmp_buf; *buf_size = tmp_buf_size; *p = *buf + p_offset; @@ -1126,7 +1126,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Allocate name segment struct if necessary */ if (!*tmp_parsed_name_p) if (NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct"); /* Check for type of format specifier */ if (pct[1] == 'b') { @@ -1135,7 +1135,7 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Append string to name segment */ if (H5D__virtual_str_append(p, (size_t)(pct - p), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment"); /* Update other variables */ tmp_parsed_name_p = &(*tmp_parsed_name_p)->next; @@ -1148,13 +1148,13 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Append string to name segment (include first '%') */ if (H5D__virtual_str_append(p, (size_t)(pct - p) + (size_t)1, &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment"); /* Update other variables */ tmp_static_strlen -= 1; } /* end else */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid format specifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid format specifier"); p = pct + 2; } /* end while */ @@ -1171,12 +1171,12 @@ H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_ /* Allocate name segment struct if necessary */ if (!*tmp_parsed_name_p) if (NULL == (*tmp_parsed_name_p = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct"); /* Append string to name segment */ if (H5D__virtual_str_append(p, tmp_strlen - (size_t)(p - source_name), &name_seg_p, &(*tmp_parsed_name_p)->name_segment, &name_seg_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to append name segment"); } /* end else */ } /* end if */ @@ -1221,12 +1221,12 @@ H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_ while (p_src) { /* Allocate name segment struct */ if (NULL == (*p_dst = H5FL_CALLOC(H5O_storage_virtual_name_seg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name segment struct"); /* Duplicate name segment */ if (p_src->name_segment) { if (NULL == ((*p_dst)->name_segment = H5MM_strdup(p_src->name_segment))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to duplicate name segment"); } /* end if */ /* Advance pointers */ @@ -1329,7 +1329,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name /* Allocate name buffer */ if (NULL == (tmp_name = (char *)H5MM_malloc(name_len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate name buffer"); p = tmp_name; /* Build name */ @@ -1348,7 +1348,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name if (nsubs_rem > 0) { 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") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write block number to string"); name_len_rem -= blockno_len; p += blockno_len; nsubs_rem--; @@ -1406,7 +1406,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Get rank of VDS */ if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions"); /* Initialize new_dims to HSIZE_UNDEF */ for (i = 0; i < (size_t)rank; i++) @@ -1423,7 +1423,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (!storage->list[i].source_dset.dset) if (H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset"); /* Check if source dataset is open */ if (storage->list[i].source_dset.dset) { @@ -1431,11 +1431,11 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) */ if (H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent"); /* Get source space dimensions */ if (H5S_get_simple_extent_dims(storage->list[i].source_select, curr_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions"); /* Check if the source extent in the unlimited dimension * changed since the last time the VDS extent/mapping @@ -1468,20 +1468,20 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) 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") + "unable to release clipped virtual dataspace"); } /* end if */ /* Copy virtual selection */ if (NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy( storage->list[i].source_dset.virtual_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, - "unable to copy virtual selection") + "unable to copy virtual selection"); /* Clip virtual selection */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, clip_size)) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "failed to clip unlimited selection") + "failed to clip unlimited selection"); } /* end if */ /* Close previous clipped source selection, if any @@ -1491,20 +1491,20 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) 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") + "unable to release clipped source dataspace"); } /* end if */ /* Copy source selection */ if (NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, - "unable to copy source selection") + "unable to copy source selection"); /* Clip source selection */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, curr_dims[storage->list[i].unlim_dim_source])) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "failed to clip unlimited selection") + "failed to clip unlimited selection"); } /* end if */ /* Update cached values unlim_extent_source and @@ -1532,7 +1532,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc( H5D_VIRTUAL_DEF_SUB_DSET_SIZE * sizeof(H5O_storage_virtual_srcdset_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to allocate sub dataset array") + "unable to allocate sub dataset array"); storage->list[i].sub_dset_nalloc = H5D_VIRTUAL_DEF_SUB_DSET_SIZE; } /* end if */ else { @@ -1544,7 +1544,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) storage->list[i].sub_dset, 2 * storage->list[i].sub_dset_nalloc * sizeof(H5O_storage_virtual_srcdset_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to extend sub dataset array") + "unable to extend sub dataset array"); storage->list[i].sub_dset = tmp_sub_dset; /* Clear new space in sub_dset */ @@ -1569,7 +1569,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to build source file name") + "unable to build source file name"); /* Resolve dset name */ if (!storage->list[i].sub_dset[j].dset_name) @@ -1579,7 +1579,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to build source dataset name") + "unable to build source dataset name"); /* Resolve virtual selection for block */ if (!storage->list[i].sub_dset[j].virtual_select) @@ -1587,7 +1587,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block( storage->list[i].source_dset.virtual_select, j))) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to get block in unlimited selection") + "unable to get block in unlimited selection"); /* Initialize clipped selections */ if (!storage->list[i].sub_dset[j].clipped_source_select) @@ -1600,7 +1600,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Open source dataset */ 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset"); if (storage->list[i].sub_dset[j].dset) { /* Update first_missing */ @@ -1636,7 +1636,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (H5S_SELECT_BOUNDS( storage->list[i].sub_dset[first_missing - (hsize_t)1].virtual_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds"); /* Set clip_size to bounds_end in unlimited * dimension */ @@ -1647,7 +1647,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) */ if (H5S_SELECT_BOUNDS(storage->list[i].sub_dset[first_missing].virtual_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds"); /* Set clip_size to bounds_start in unlimited * dimension */ @@ -1671,7 +1671,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Get current VDS dimensions */ if (H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions"); /* Calculate new extent */ for (i = 0; i < (size_t)rank; i++) { @@ -1687,12 +1687,12 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (changed) { /* Update VDS extent */ if (H5S_set_extent(dset->shared->space, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); /* Mark the space as dirty, for later writing to the file */ if (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR) if (H5D__mark(dset, H5D_MARK_SPACE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty"); } /* end if */ /* If we did not change the VDS dimensions, there is nothing more to update @@ -1716,18 +1716,18 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) 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") + "unable to release clipped virtual dataspace"); } /* end if */ /* Copy virtual selection */ if (NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); /* Clip space to virtual extent */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, new_dims[storage->list[i].unlim_dim_source])) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection"); /* Get size that source selection will be clipped to to * match size of virtual selection */ @@ -1743,18 +1743,19 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) 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") + "unable to release clipped source dataspace"); } /* end if */ /* Copy source selection */ if (NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection"); /* Clip source selection */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, + "failed to clip unlimited selection"); /* Update cached value clip_size_source */ storage->list[i].clip_size_source = clip_size; @@ -1779,7 +1780,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (storage->list[i].sub_dset[j].clipped_source_select) if (H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, - "unable to release clipped source dataspace") + "unable to release clipped source dataspace"); /* Initialize clipped source selection to point to * base source selection */ @@ -1793,7 +1794,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) if (storage->list[i].sub_dset[j].clipped_virtual_select) if (H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, - "unable to release clipped virtual dataspace") + "unable to release clipped virtual dataspace"); /* Initialize clipped virtual selection to point to * unclipped virtual selection */ @@ -1822,24 +1823,25 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset) /* Update top level virtual_select and clipped_virtual_select * extents */ if (H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); if ((storage->list[i].source_dset.clipped_virtual_select != storage->list[i].source_dset.virtual_select) && storage->list[i].source_dset.clipped_virtual_select) if (H5S_set_extent(storage->list[i].source_dset.clipped_virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); /* Update sub dataset virtual_select and clipped_virtual_select * extents */ for (j = 0; j < storage->list[i].sub_dset_nalloc; j++) if (storage->list[i].sub_dset[j].virtual_select) { if (H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace"); if ((storage->list[i].sub_dset[j].clipped_virtual_select != storage->list[i].sub_dset[j].virtual_select) && storage->list[i].sub_dset[j].clipped_virtual_select) if (H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, new_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to modify size of dataspace"); } /* end if */ else assert(!storage->list[i].sub_dset[j].clipped_virtual_select); @@ -1885,7 +1887,7 @@ H5D__virtual_init_all(const H5D_t *dset) /* Get current VDS dimensions */ if (H5S_get_simple_extent_dims(dset->shared->space, virtual_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions"); /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) @@ -1898,7 +1900,7 @@ H5D__virtual_init_all(const H5D_t *dset) if (!storage->list[i].source_dset.dset) if (H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset"); /* Check if source dataset is open */ if (storage->list[i].source_dset.dset) { @@ -1906,11 +1908,11 @@ H5D__virtual_init_all(const H5D_t *dset) */ if (H5S_extent_copy(storage->list[i].source_select, storage->list[i].source_dset.dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy source dataspace extent"); /* Get source space dimensions */ if (H5S_get_simple_extent_dims(storage->list[i].source_select, source_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get source space dimensions"); /* Get size that source selection would be clipped to to * match size of virtual selection */ @@ -1924,13 +1926,13 @@ H5D__virtual_init_all(const H5D_t *dset) 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") + "unable to release clipped virtual dataspace"); } /* end if */ /* Copy virtual selection */ if (NULL == (storage->list[i].source_dset.clipped_virtual_select = H5S_copy(storage->list[i].source_dset.virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); /* Close previous clipped source selection, if any */ if (storage->list[i].source_dset.clipped_source_select) { @@ -1938,13 +1940,13 @@ H5D__virtual_init_all(const H5D_t *dset) 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") + "unable to release clipped source dataspace"); } /* end if */ /* Copy source selection */ if (NULL == (storage->list[i].source_dset.clipped_source_select = H5S_copy(storage->list[i].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy source selection"); /* Check if the clip size is within the current extent of * the source dataset */ @@ -1952,12 +1954,14 @@ H5D__virtual_init_all(const H5D_t *dset) /* Clip virtual selection to extent */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, virtual_dims[storage->list[i].unlim_dim_virtual])) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, + "failed to clip unlimited selection"); /* Clip source selection to clip_size */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, + "failed to clip unlimited selection"); } /* end if */ else { /* Get size that virtual selection will be clipped to to @@ -1970,12 +1974,14 @@ H5D__virtual_init_all(const H5D_t *dset) /* Clip virtual selection to clip_size */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_virtual_select, clip_size)) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, + "failed to clip unlimited selection"); /* Clip source selection to extent */ if (H5S_hyper_clip_unlim(storage->list[i].source_dset.clipped_source_select, source_dims[storage->list[i].unlim_dim_source])) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, + "failed to clip unlimited selection"); } /* end else */ } /* end if */ else { @@ -2000,7 +2006,8 @@ H5D__virtual_init_all(const H5D_t *dset) /* Allocate sub_dset array */ if (NULL == (storage->list[i].sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_calloc( sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate sub dataset array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "unable to allocate sub dataset array"); /* Update sub_dset_nalloc */ storage->list[i].sub_dset_nalloc = sub_dset_max; @@ -2012,7 +2019,7 @@ H5D__virtual_init_all(const H5D_t *dset) if (NULL == (tmp_sub_dset = (H5O_storage_virtual_srcdset_t *)H5MM_realloc( storage->list[i].sub_dset, sub_dset_max * sizeof(H5O_storage_virtual_srcdset_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend sub dataset array"); storage->list[i].sub_dset = tmp_sub_dset; /* Clear new space in sub_dset */ @@ -2032,7 +2039,7 @@ H5D__virtual_init_all(const H5D_t *dset) storage->list[i].source_file_name, storage->list[i].parsed_source_file_name, storage->list[i].psfn_static_strlen, storage->list[i].psfn_nsubs, j, &storage->list[i].sub_dset[j].file_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source file name"); /* Resolve dset name */ if (!storage->list[i].sub_dset[j].dset_name) @@ -2040,14 +2047,15 @@ H5D__virtual_init_all(const H5D_t *dset) storage->list[i].source_dset_name, storage->list[i].parsed_source_dset_name, storage->list[i].psdn_static_strlen, storage->list[i].psdn_nsubs, j, &storage->list[i].sub_dset[j].dset_name) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to build source dataset name") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, + "unable to build source dataset name"); /* Resolve virtual selection for block */ if (!storage->list[i].sub_dset[j].virtual_select) if (NULL == (storage->list[i].sub_dset[j].virtual_select = H5S_hyper_get_unlim_block( storage->list[i].source_dset.virtual_select, j))) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to get block in unlimited selection") + "unable to get block in unlimited selection"); /* Close previous clipped source selection, if any */ if (storage->list[i].sub_dset[j].clipped_source_select != @@ -2055,7 +2063,7 @@ H5D__virtual_init_all(const H5D_t *dset) if (storage->list[i].sub_dset[j].clipped_source_select) if (H5S_close(storage->list[i].sub_dset[j].clipped_source_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, - "unable to release clipped source dataspace") + "unable to release clipped source dataspace"); /* Initialize clipped source selection to point to base * source selection */ @@ -2068,7 +2076,7 @@ H5D__virtual_init_all(const H5D_t *dset) if (storage->list[i].sub_dset[j].clipped_virtual_select) if (H5S_close(storage->list[i].sub_dset[j].clipped_virtual_select) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, - "unable to release clipped virtual dataspace") + "unable to release clipped virtual dataspace"); /* Initialize clipped virtual selection to point to * unclipped virtual selection */ @@ -2135,9 +2143,9 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) /* Check that the dimensions of the VDS are large enough */ if (H5D_virtual_check_min_dims(dset) < 0) - HGOTO_ERROR( - H5E_ARGS, H5E_BADVALUE, FAIL, - "virtual dataset dimensions not large enough to contain all limited dimensions in all selections") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "virtual dataset dimensions not large enough to contain all limited dimensions in all " + "selections"); /* Patch the virtual selection dataspaces. Note we always patch the space * status because this layout could be from an old version held in the @@ -2152,7 +2160,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) /* Patch extent */ if (H5S_extent_copy(storage->list[i].source_dset.virtual_select, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy virtual dataspace extent"); storage->list[i].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT; /* Mark source extent as invalid */ @@ -2160,23 +2168,23 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) /* Normalize offsets, toss out old offset values */ if (H5S_hyper_normalize_offset(storage->list[i].source_dset.virtual_select, old_offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset"); if (H5S_hyper_normalize_offset(storage->list[i].source_select, old_offset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset"); } /* end for */ /* Get dataset access property list */ if (NULL == (dapl = (H5P_genplist_t *)H5I_object(dapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for dapl ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for dapl ID"); /* Get view option */ if (H5P_get(dapl, H5D_ACS_VDS_VIEW_NAME, &storage->view) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual view option") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual view option"); /* Get printf gap if view is H5D_VDS_LAST_AVAILABLE, otherwise set to 0 */ if (storage->view == H5D_VDS_LAST_AVAILABLE) { if (H5P_get(dapl, H5D_ACS_VDS_PRINTF_GAP_NAME, &storage->printf_gap) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual printf gap") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get virtual printf gap"); } /* end if */ else storage->printf_gap = (hsize_t)0; @@ -2187,15 +2195,15 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) H5F_close_degree_t close_degree = H5F_CLOSE_WEAK; /* Close degree for source files */ if ((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get fapl"); /* Get property list pointer */ if (NULL == (source_fapl = (H5P_genplist_t *)H5I_object(storage->source_fapl))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Source files must always be opened with H5F_CLOSE_WEAK close degree */ if (H5P_set(source_fapl, H5F_ACS_CLOSE_DEGREE_NAME, &close_degree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree"); } /* end if */ #ifndef NDEBUG else { @@ -2204,11 +2212,11 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) /* Get property list pointer */ if (NULL == (source_fapl = (H5P_genplist_t *)H5I_object(storage->source_fapl))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Verify H5F_CLOSE_WEAK close degree is set */ 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree"); assert(close_degree == H5F_CLOSE_WEAK); } /* end else */ @@ -2217,7 +2225,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) /* Copy DAPL to layout */ if (storage->source_dapl <= 0) if ((storage->source_dapl = H5P_copy_plist(dapl, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dapl"); /* Mark layout as not fully initialized (must be done prior to I/O for * unlimited/printf selections) */ @@ -2357,7 +2365,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag /* Initialize layout if necessary */ if (!storage->init) if (H5D__virtual_init_all(dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize virtual layout") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize virtual layout"); /* Initialize tot_nelmts */ *tot_nelmts = 0; @@ -2377,11 +2385,11 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag if (!bounds_init) { /* Get rank of VDS */ if ((rank = H5S_GET_EXTENT_NDIMS(dset->shared->space)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get number of dimensions"); /* Get selection bounds */ if (H5S_SELECT_BOUNDS(file_space, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds"); /* Adjust bounds_end to represent the extent just enclosing them * (add 1) */ @@ -2420,7 +2428,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset"); } /* end if */ /* If we obtained a valid source space, we must create @@ -2435,7 +2443,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag /* Get bounds of virtual selection */ if (H5S_SELECT_BOUNDS(storage->list[i].sub_dset[j].virtual_select, tmp_dims, vbounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get selection bounds"); assert(bounds_init); @@ -2445,22 +2453,23 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag /* Temporarily set extent of virtual selection to bounds */ if (H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, vbounds_end) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to modify size of dataspace"); /* Get current VDS dimensions */ if (H5S_get_simple_extent_dims(dset->shared->space, tmp_dims, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions"); /* Copy virtual selection */ if (NULL == (storage->list[i].sub_dset[j].clipped_virtual_select = H5S_copy(storage->list[i].sub_dset[j].virtual_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); /* Clip virtual selection to real virtual extent */ (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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "unable to clip hyperslab"); /* Project intersection of virtual space and clipped * virtual space onto source space (create @@ -2470,14 +2479,16 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].clipped_source_select, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "can't project virtual intersection onto memory space") + "can't project virtual intersection onto memory space"); /* Set extents of virtual_select and * clipped_virtual_select to virtual extent */ if (H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, tmp_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to modify size of dataspace"); if (H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, tmp_dims) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to modify size of dataspace"); } /* end if */ } /* end if */ @@ -2490,13 +2501,13 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag file_space, mem_space, storage->list[i].sub_dset[j].clipped_virtual_select, &storage->list[i].sub_dset[j].projected_mem_space, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "can't project virtual intersection onto memory space") + "can't project virtual intersection onto memory space"); /* Check number of elements selected */ if ((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS( storage->list[i].sub_dset[j].projected_mem_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, - "unable to get number of elements in selection") + "unable to get number of elements in selection"); /* Check if anything is selected */ if (select_nelmts > (hssize_t)0) { @@ -2506,7 +2517,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag 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") + "unable to open source dataset"); /* If the source dataset is not open, mark the selected * elements as zero so projected_mem_space is freed */ @@ -2519,7 +2530,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag if (select_nelmts == (hssize_t)0) { if (H5S_close(storage->list[i].sub_dset[j].projected_mem_space) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, - "can't close projected memory space") + "can't close projected memory space"); storage->list[i].sub_dset[j].projected_mem_space = NULL; } /* end if */ else @@ -2535,13 +2546,13 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag file_space, mem_space, storage->list[i].source_dset.clipped_virtual_select, &storage->list[i].source_dset.projected_mem_space, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "can't project virtual intersection onto memory space") + "can't project virtual intersection onto memory space"); /* Check number of elements selected, add to tot_nelmts */ if ((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS( storage->list[i].source_dset.projected_mem_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, - "unable to get number of elements in selection") + "unable to get number of elements in selection"); /* Check if anything is selected */ if (select_nelmts > (hssize_t)0) { @@ -2550,7 +2561,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag /* Try to open dataset */ if (H5D__virtual_open_source_dset(dset, &storage->list[i], &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open source dataset"); /* If the source dataset is not open, mark the selected elements * as zero so projected_mem_space is freed */ @@ -2562,7 +2573,7 @@ H5D__virtual_pre_io(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_t *storag * projected_mem_space, otherwise update tot_nelmts */ if (select_nelmts == (hssize_t)0) { if (H5S_close(storage->list[i].source_dset.projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space") + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected memory space"); storage->list[i].source_dset.projected_mem_space = NULL; } /* end if */ else @@ -2663,7 +2674,7 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset source_dset->clipped_source_select, dset_info->file_space, &projected_src_space, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "can't project virtual intersection onto source space") + "can't project virtual intersection onto source space"); { /* Initialize source_dinfo */ @@ -2675,12 +2686,12 @@ H5D__virtual_read_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdset /* Read in the point (with the custom VL memory allocator) */ if (H5D__read(1, &source_dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset"); } /* Close projected_src_space */ if (H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space"); projected_src_space = NULL; } /* end if */ @@ -2732,12 +2743,12 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info #ifdef H5_HAVE_PARALLEL /* Parallel reads are not supported (yet) */ if (H5F_HAS_FEATURE(dset_info->dset->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel reads not supported on virtual datasets") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel reads not supported on virtual datasets"); #endif /* H5_HAVE_PARALLEL */ /* Prepare for I/O operation */ if (H5D__virtual_pre_io(dset_info, storage, dset_info->file_space, dset_info->mem_space, &tot_nelmts) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation"); /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) { @@ -2749,12 +2760,12 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info /* Iterate over sub-source dsets */ for (j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) if (H5D__virtual_read_one(dset_info, &storage->list[i].sub_dset[j]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset"); } /* end if */ else /* Read from source dataset */ if (H5D__virtual_read_one(dset_info, &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset"); } /* end for */ /* Fill unmapped part of buffer with fill value */ @@ -2763,13 +2774,13 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info /* Check the fill value status */ if (H5P_is_fill_value_defined(&dset_info->dset->shared->dcpl_cache.fill, &fill_status) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if fill value defined") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if fill value defined"); /* Always write fill value to memory buffer unless it is undefined */ if (fill_status != H5D_FILL_VALUE_UNDEFINED) { /* Start with fill space equal to memory space */ if (NULL == (fill_space = H5S_copy(dset_info->mem_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory selection"); /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) @@ -2780,17 +2791,17 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info if (storage->list[i].sub_dset[j].projected_mem_space) if (H5S_select_subtract(fill_space, storage->list[i].sub_dset[j].projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection"); } /* end if */ else if (storage->list[i].source_dset.projected_mem_space) /* Subtract projected memory space from fill space */ if (H5S_select_subtract(fill_space, storage->list[i].source_dset.projected_mem_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to clip fill selection"); /* Write fill values to memory buffer */ if (H5D__fill(dset_info->dset->shared->dcpl_cache.fill.buf, dset_info->dset->shared->type, dset_info->buf.vp, dset_info->type_info.mem_type, fill_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "filling buf failed"); #ifndef NDEBUG /* Make sure the total number of elements written (including fill @@ -2801,7 +2812,7 @@ H5D__virtual_read(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_info /* Get number of elements in fill dataspace */ if ((select_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(fill_space)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, - "unable to get number of elements in selection") + "unable to get number of elements in selection"); /* Verify number of elements is correct. Note that since we * don't check for overlap we can't assert that these are equal @@ -2860,7 +2871,7 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse source_dset->clipped_source_select, dset_info->file_space, &projected_src_space, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, - "can't project virtual intersection onto source space") + "can't project virtual intersection onto source space"); { /* Initialize source_dinfo */ @@ -2872,12 +2883,12 @@ H5D__virtual_write_one(H5D_dset_io_info_t *dset_info, H5O_storage_virtual_srcdse /* Read in the point (with the custom VL memory allocator) */ if (H5D__write(1, &source_dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read source dataset"); } /* Close projected_src_space */ if (H5S_close(projected_src_space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space") + HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close projected source space"); projected_src_space = NULL; } /* end if */ @@ -2928,18 +2939,18 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf #ifdef H5_HAVE_PARALLEL /* Parallel writes are not supported (yet) */ if (H5F_HAS_FEATURE(dset_info->dset->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel writes not supported on virtual datasets") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "parallel writes not supported on virtual datasets"); #endif /* H5_HAVE_PARALLEL */ /* Prepare for I/O operation */ if (H5D__virtual_pre_io(dset_info, storage, dset_info->file_space, dset_info->mem_space, &tot_nelmts) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "unable to prepare for I/O operation"); /* Fail if there are unmapped parts of the selection as they would not be * written */ if (tot_nelmts != nelmts) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "write requested to unmapped portion of virtual dataset") + "write requested to unmapped portion of virtual dataset"); /* Iterate over mappings */ for (i = 0; i < storage->list_nused; i++) { @@ -2951,12 +2962,12 @@ H5D__virtual_write(H5D_io_info_t H5_ATTR_NDEBUG_UNUSED *io_info, H5D_dset_io_inf /* Iterate over sub-source dsets */ for (j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++) if (H5D__virtual_write_one(dset_info, &storage->list[i].sub_dset[j]) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset"); } /* end if */ else /* Write to source dataset */ if (H5D__virtual_write_one(dset_info, &storage->list[i].source_dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset"); } /* end for */ done: @@ -2999,12 +3010,12 @@ H5D__virtual_flush(H5D_t *dset) if (storage->list[i].sub_dset[j].dset) /* Flush source dataset */ if (H5D__flush_real(storage->list[i].sub_dset[j].dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush source dataset"); } /* end if */ else if (storage->list[i].source_dset.dset) /* Flush source dataset */ if (H5D__flush_real(storage->list[i].source_dset.dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to flush source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to flush source dataset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3050,7 +3061,7 @@ H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t * /* Allocate a node for this file */ if (NULL == (tmp = H5FL_MALLOC(H5D_virtual_held_file_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate held file node") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate held file node"); /* Set up node & connect to list */ tmp->file = storage->list[i].sub_dset[j].dset->oloc.file; @@ -3064,7 +3075,7 @@ H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t * /* Allocate a node for this file */ if (NULL == (tmp = H5FL_MALLOC(H5D_virtual_held_file_t))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate held file node") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate held file node"); /* Set up node & connect to list */ tmp->file = storage->list[i].source_dset.dset->oloc.file; @@ -3104,17 +3115,17 @@ H5D__virtual_refresh_source_dset(H5D_t **dset) /* Get a temporary identifier for this source dataset */ if ((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "can't register (temporary) source dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "can't register (temporary) source dataset ID"); /* Refresh source dataset */ if (H5D__refresh(*dset, temp_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset"); /* Discard the identifier & replace the dataset */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_remove(temp_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "can't unregister source dataset ID") + HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "can't unregister source dataset ID"); if (NULL == (*dset = (H5D_t *)H5VL_object_unwrap(vol_obj))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve library object from VOL object") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve library object from VOL object"); vol_obj->data = NULL; done: @@ -3160,14 +3171,14 @@ H5D__virtual_refresh_source_dsets(H5D_t *dset) if (storage->list[i].sub_dset[j].dset) /* Refresh sub-source dataset */ if (H5D__virtual_refresh_source_dset(&storage->list[i].sub_dset[j].dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset"); } /* end if */ else /* Check if source dataset is open */ if (storage->list[i].source_dset.dset) /* Refresh source dataset */ if (H5D__virtual_refresh_source_dset(&storage->list[i].source_dset.dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3202,7 +3213,7 @@ H5D__virtual_release_source_dset_files(H5D_virtual_held_file_t *head) * opened through an API routine -QAK) */ if (H5F_try_close(head->file, NULL) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close"); /* Delete node */ (void)H5FL_FREE(H5D_virtual_held_file_t, head); diff --git a/src/H5E.c b/src/H5E.c index c89e494..ea6f201 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -153,15 +153,15 @@ H5E_init(void) /* Initialize the ID group for the error class IDs */ if (H5I_register_type(H5I_ERRCLS_CLS) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group"); /* Initialize the ID group for the major error IDs */ if (H5I_register_type(H5I_ERRMSG_CLS) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group"); /* Initialize the ID group for the error stacks */ if (H5I_register_type(H5I_ERRSTK_CLS) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group"); #ifndef H5_HAVE_THREADSAFE H5E_stack_g[0].nused = 0; @@ -173,9 +173,9 @@ H5E_init(void) 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))) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "class initialization failed") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "class initialization failed"); if ((H5E_ERR_CLS_g = H5I_register(H5I_ERROR_CLASS, cls, FALSE)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error class"); /* Include the automatically generated error code initialization */ #include "H5Einit.h" @@ -394,15 +394,15 @@ H5Eregister_class(const char *cls_name, const char *lib_name, const char *versio /* Check arguments */ if (cls_name == NULL || lib_name == NULL || version == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid string"); /* Create the new error class object */ if (NULL == (cls = H5E__register_class(cls_name, lib_name, version))) - HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error class"); /* Register the new error class to get an ID for it */ if ((ret_value = H5I_register(H5I_ERROR_CLASS, cls, TRUE)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error class"); done: FUNC_LEAVE_API(ret_value) @@ -433,15 +433,15 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers /* Allocate space for new error class */ if (NULL == (cls = H5FL_CALLOC(H5E_cls_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Duplicate string information */ if (NULL == (cls->cls_name = H5MM_xstrdup(cls_name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (cls->lib_name = H5MM_xstrdup(lib_name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (cls->lib_vers = H5MM_xstrdup(version))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set the return value */ ret_value = cls; @@ -473,14 +473,14 @@ H5Eunregister_class(hid_t class_id) /* Check arguments */ if (H5I_ERROR_CLASS != H5I_get_type(class_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class"); /* * Decrement the counter on the dataset. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(class_id) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class"); done: FUNC_LEAVE_API(ret_value) @@ -507,11 +507,11 @@ H5E__unregister_class(H5E_cls_t *cls, void H5_ATTR_UNUSED **request) /* 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) - HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class") + HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class"); /* Free error class structure */ if (H5E__free_class(cls) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -538,11 +538,11 @@ H5Eget_class_name(hid_t class_id, char *name /*out*/, size_t size) /* Get the error class */ if (NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error class ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error class ID"); /* Retrieve the class name */ if ((ret_value = H5E__get_class_name(cls, name, size)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error class name") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error class name"); done: FUNC_LEAVE_API(ret_value) @@ -608,9 +608,9 @@ H5E__close_msg_cb(void *obj_ptr, hid_t obj_id, void *udata) /* Close the message if it is in the class being closed */ if (err_msg->cls == cls) { if (H5E__close_msg(err_msg, NULL) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTCLOSEOBJ, H5_ITER_ERROR, "unable to close error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTCLOSEOBJ, H5_ITER_ERROR, "unable to close error message"); if (NULL == H5I_remove(obj_id)) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREMOVE, H5_ITER_ERROR, "unable to remove error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREMOVE, H5_ITER_ERROR, "unable to remove error message"); } /* end if */ done: @@ -636,11 +636,11 @@ H5Eclose_msg(hid_t err_id) /* Check arguments */ if (H5I_ERROR_MSG != H5I_get_type(err_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an error class"); /* Decrement the counter. It will be freed if the count reaches zero. */ if (H5I_dec_app_ref(err_id) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message"); done: FUNC_LEAVE_API(ret_value) @@ -693,21 +693,21 @@ H5Ecreate_msg(hid_t class_id, H5E_type_t msg_type, const char *msg_str) /* Check arguments */ if (msg_type != H5E_MAJOR && msg_type != H5E_MINOR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "not a valid message type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "not a valid message type"); if (msg_str == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "message is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "message is NULL"); /* Get the error class */ if (NULL == (cls = (H5E_cls_t *)H5I_object_verify(class_id, H5I_ERROR_CLASS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an error class ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an error class ID"); /* Create the new error message object */ if (NULL == (msg = H5E__create_msg(cls, msg_type, msg_str))) - HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error message"); /* Register the new error class to get an ID for it */ if ((ret_value = H5I_register(H5I_ERROR_MSG, msg, TRUE)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register error message"); done: FUNC_LEAVE_API(ret_value) @@ -738,13 +738,13 @@ H5E__create_msg(H5E_cls_t *cls, H5E_type_t msg_type, const char *msg_str) /* Allocate new message object */ if (NULL == (msg = H5FL_MALLOC(H5E_msg_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Fill new message object */ msg->cls = cls; msg->type = msg_type; if (NULL == (msg->msg = H5MM_xstrdup(msg_str))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set return value */ ret_value = msg; @@ -778,11 +778,11 @@ H5Eget_msg(hid_t msg_id, H5E_type_t *type /*out*/, char *msg_str /*out*/, size_t /* Get the message object */ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(msg_id, H5I_ERROR_MSG))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error message ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a error message ID"); /* Get the message's text */ if ((ret_value = H5E__get_msg(msg, type, msg_str, size)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error message text") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get error message text"); done: FUNC_LEAVE_API(ret_value) @@ -809,14 +809,14 @@ H5Ecreate_stack(void) /* Allocate a new error stack */ if (NULL == (stk = H5FL_CALLOC(H5E_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed"); /* Set the "automatic" error reporting info to the library default */ H5E__set_default_auto(stk); /* Register the stack */ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack"); done: FUNC_LEAVE_API(ret_value) @@ -845,11 +845,11 @@ H5Eget_current_stack(void) /* Get the current stack */ if (NULL == (stk = H5E__get_current_stack())) - HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTCREATE, H5I_INVALID_HID, "can't create error stack"); /* Register the stack */ if ((ret_value = H5I_register(H5I_ERROR_STACK, stk, TRUE)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, H5I_INVALID_HID, "can't create error stack"); done: FUNC_LEAVE_API(ret_value) @@ -878,11 +878,11 @@ H5E__get_current_stack(void) /* Get a pointer to the current error stack */ if (NULL == (current_stack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get current error stack"); /* Allocate a new error stack */ if (NULL == (estack_copy = H5FL_CALLOC(H5E_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Make a copy of current error stack */ estack_copy->nused = current_stack->nused; @@ -895,13 +895,13 @@ H5E__get_current_stack(void) /* Increment the IDs to indicate that they are used in this stack */ if (H5I_inc_ref(current_error->cls_id, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error class"); new_error->cls_id = current_error->cls_id; if (H5I_inc_ref(current_error->maj_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message"); new_error->maj_num = current_error->maj_num; if (H5I_inc_ref(current_error->min_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, NULL, "unable to increment ref count on error message"); new_error->min_num = current_error->min_num; /* The 'func' & 'file' strings are statically allocated (by the compiler) * there's no need to duplicate them. @@ -910,7 +910,7 @@ H5E__get_current_stack(void) new_error->file_name = current_error->file_name; new_error->line = current_error->line; if (NULL == (new_error->desc = H5MM_xstrdup(current_error->desc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } /* end for */ /* Copy the "automatic" error reporting information */ @@ -952,18 +952,18 @@ H5Eset_current_stack(hid_t err_stack) if (err_stack != H5E_DEFAULT) { if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); /* Set the current error stack */ if (H5E__set_current_stack(estack) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "unable to set error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "unable to set error stack"); /* * Decrement the counter on the error stack. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(err_stack) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack"); } /* end if */ done: @@ -994,7 +994,7 @@ H5E__set_current_stack(H5E_t *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' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Empty current error stack */ H5E_clear_stack(current_stack); @@ -1010,13 +1010,13 @@ H5E__set_current_stack(H5E_t *estack) /* Increment the IDs to indicate that they are used in this stack */ if (H5I_inc_ref(new_error->cls_id, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class"); current_error->cls_id = new_error->cls_id; if (H5I_inc_ref(new_error->maj_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class"); current_error->maj_num = new_error->maj_num; if (H5I_inc_ref(new_error->min_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class"); current_error->min_num = new_error->min_num; /* The 'func' & 'file' strings are statically allocated (by the compiler) * there's no need to duplicate them. @@ -1025,7 +1025,7 @@ H5E__set_current_stack(H5E_t *estack) current_error->file_name = new_error->file_name; current_error->line = new_error->line; if (NULL == (current_error->desc = H5MM_xstrdup(new_error->desc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end for */ done: @@ -1052,14 +1052,14 @@ H5Eclose_stack(hid_t stack_id) if (H5E_DEFAULT != stack_id) { /* Check arguments */ if (H5I_ERROR_STACK != H5I_get_type(stack_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); /* * Decrement the counter on the error stack. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(stack_id) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error stack"); } /* end if */ done: @@ -1116,7 +1116,7 @@ H5Eget_num(hid_t error_stack_id) if (error_stack_id == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ @@ -1124,12 +1124,12 @@ H5Eget_num(hid_t error_stack_id) /* Get the error stack to operate on */ if (NULL == (estack = (H5E_t *)H5I_object_verify(error_stack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not an error stack ID"); } /* end else */ /* Get the number of errors on stack */ if ((ret_value = H5E__get_num(estack)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get number of errors") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, (-1), "can't get number of errors"); done: FUNC_LEAVE_API(ret_value) @@ -1178,7 +1178,7 @@ H5Epop(hid_t err_stack, size_t count) if (err_stack == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ @@ -1186,7 +1186,7 @@ H5Epop(hid_t err_stack, size_t count) /* Get the error stack to operate on */ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Range limit the number of errors to pop off stack */ @@ -1195,7 +1195,7 @@ H5Epop(hid_t err_stack, size_t count) /* Pop the errors off the stack */ if (H5E__pop(estack, count) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't pop errors from stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't pop errors from stack"); done: FUNC_LEAVE_API(ret_value) @@ -1242,7 +1242,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid /* Get the error stack to operate on */ if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Note that the variable-argument parsing for the format is identical in @@ -1256,11 +1256,11 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Push the error on the stack */ if (H5E__push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack"); done: if (va_started) @@ -1301,12 +1301,12 @@ H5Eclear2(hid_t err_stack) H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Clear the error stack */ if (H5E_clear_stack(estack) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack"); done: FUNC_LEAVE_API(ret_value) @@ -1335,7 +1335,7 @@ H5Eprint2(hid_t err_stack, FILE *stream) /* Print error stack */ if ((ret_value = H5E__print2(err_stack, stream)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack"); done: FUNC_LEAVE_API(ret_value) @@ -1362,19 +1362,19 @@ H5E__print2(hid_t err_stack, FILE *stream) if (err_stack == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Print error stack */ if (H5E__print(estack, stream, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1405,14 +1405,14 @@ H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t stack_func, voi if (err_stack == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(err_stack, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Walk the error stack */ @@ -1451,24 +1451,24 @@ H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func /*out*/, void **client_data /*ou if (estack_id == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Get the automatic error reporting information */ if (H5E__get_auto(estack, &op, client_data) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info"); #ifndef H5_NO_DEPRECATED_SYMBOLS /* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto1 */ if (!op.is_default && op.vers == 1) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto1 has been called") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto1 has been called"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ if (func) @@ -1511,20 +1511,20 @@ H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data) if (estack_id == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ #ifndef H5_NO_DEPRECATED_SYMBOLS /* Get the automatic error reporting information */ if (H5E__get_auto(estack, &op, NULL) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info"); /* Set the automatic error reporting information */ if (func != op.func2_default) @@ -1539,7 +1539,7 @@ H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data) op.func2 = func; if (H5E__set_auto(estack, &op, client_data) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info"); done: FUNC_LEAVE_API(ret_value) @@ -1570,14 +1570,14 @@ H5Eauto_is_v2(hid_t estack_id, unsigned *is_stack) if (estack_id == H5E_DEFAULT) { if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); } /* end if */ else { /* Only clear the error stack if it's not the default stack */ H5E_clear_stack(NULL); if (NULL == (estack = (H5E_t *)H5I_object_verify(estack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a error stack ID"); } /* end else */ /* Check if the error stack reporting function is the "newer" stack type */ @@ -1614,13 +1614,13 @@ H5Eappend_stack(hid_t dst_stack_id, hid_t src_stack_id, hbool_t close_source_sta /* Check args */ if (NULL == (dst_stack = (H5E_t *)H5I_object_verify(dst_stack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst_stack_id not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst_stack_id not a error stack ID"); if (NULL == (src_stack = (H5E_t *)H5I_object_verify(src_stack_id, H5I_ERROR_STACK))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "src_stack_id not a error stack ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "src_stack_id not a error stack ID"); /* Append the source stack to the destination stack */ if (H5E__append_stack(dst_stack, src_stack) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTAPPEND, FAIL, "can't append stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTAPPEND, FAIL, "can't append stack"); /* Close source error stack, if requested */ if (close_source_stack) @@ -1628,7 +1628,7 @@ H5Eappend_stack(hid_t dst_stack_id, hid_t src_stack_id, hbool_t close_source_sta * count reaches zero. */ if (H5I_dec_app_ref(src_stack_id) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on source error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on source error stack"); done: FUNC_LEAVE_API(ret_value) @@ -1666,13 +1666,13 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack) /* Increment the IDs to indicate that they are used in this stack */ if (H5I_inc_ref(src_error->cls_id, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error class"); dst_error->cls_id = src_error->cls_id; if (H5I_inc_ref(src_error->maj_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message"); dst_error->maj_num = src_error->maj_num; if (H5I_inc_ref(src_error->min_num, FALSE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTINC, FAIL, "unable to increment ref count on error message"); dst_error->min_num = src_error->min_num; /* The 'func' & 'file' strings are statically allocated (by the compiler) * there's no need to duplicate them. @@ -1681,7 +1681,7 @@ H5E__append_stack(H5E_t *dst_stack, const H5E_t *src_stack) dst_error->file_name = src_error->file_name; dst_error->line = src_error->line; if (NULL == (dst_error->desc = H5MM_xstrdup(src_error->desc))) - HGOTO_ERROR(H5E_ERROR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_ERROR, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Increment # of errors in destination stack */ dst_stack->nused++; diff --git a/src/H5EA.c b/src/H5EA.c index 0971695..4b0446b 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -122,25 +122,25 @@ H5EA__new(H5F_t *f, haddr_t ea_addr, hbool_t from_open, void *ctx_udata) /* Allocate extensible array wrapper */ if (NULL == (ea = H5FL_CALLOC(H5EA_t))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for extensible array info") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for extensible array info"); /* Lock the array header into memory */ if (NULL == (hdr = H5EA__hdr_protect(f, ea_addr, ctx_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to load extensible array header"); /* Check for pending array deletion */ if (from_open && hdr->pending_delete) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTOPENOBJ, NULL, "can't open extensible array pending deletion") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTOPENOBJ, NULL, "can't open extensible array pending deletion"); /* Point extensible array wrapper at header and bump it's ref count */ ea->hdr = hdr; if (H5EA__hdr_incr(ea->hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); /* Increment # of files using this array header */ if (H5EA__hdr_fuse_incr(ea->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, - "can't increment file reference count on shared array header") + "can't increment file reference count on shared array header"); /* Set file pointer for this array open context */ ea->f = f; @@ -187,12 +187,12 @@ H5EA_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata) /* Create extensible array header */ if (HADDR_UNDEF == (ea_addr = H5EA__hdr_create(f, cparam, ctx_udata))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "can't create extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "can't create extensible array header"); /* Allocate and initialize new extensible array wrapper */ if (NULL == (ea = H5EA__new(f, ea_addr, FALSE, ctx_udata))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, - "allocation and/or initialization failed for extensible array wrapper") + "allocation and/or initialization failed for extensible array wrapper"); /* Set the return value */ ret_value = ea; @@ -230,7 +230,7 @@ H5EA_open(H5F_t *f, haddr_t ea_addr, void *ctx_udata) /* Allocate and initialize new extensible array wrapper */ if (NULL == (ea = H5EA__new(f, ea_addr, TRUE, ctx_udata))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, - "allocation and/or initialization failed for extensible array wrapper") + "allocation and/or initialization failed for extensible array wrapper"); /* Set the return value */ ret_value = ea; @@ -346,7 +346,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t /* Create the index block */ hdr->idx_blk_addr = H5EA__iblock_create(hdr, &stats_changed); if (!H5_addr_defined(hdr->idx_blk_addr)) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create index block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create index block"); hdr_dirty = TRUE; } /* end if */ else @@ -357,7 +357,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t if (NULL == (iblock = H5EA__iblock_protect(hdr, thing_acc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array index block, address = %llu", - (unsigned long long)hdr->idx_blk_addr) + (unsigned long long)hdr->idx_blk_addr); /* Check if element is in index block */ if (idx < hdr->cparam.idx_blk_elmts) { @@ -399,7 +399,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t hdr->sblk_info[sblk_idx].dblk_nelmts); if (!H5_addr_defined(dblk_addr)) HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, - "unable to create extensible array data block") + "unable to create extensible array data block"); /* Set data block address in index block */ iblock->dblk_addrs[dblk_idx] = dblk_addr; @@ -414,7 +414,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t hdr->sblk_info[sblk_idx].dblk_nelmts, thing_acc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array data block, address = %llu", - (unsigned long long)iblock->dblk_addrs[dblk_idx]) + (unsigned long long)iblock->dblk_addrs[dblk_idx]); /* Adjust index to offset in data block */ elmt_idx %= hdr->sblk_info[sblk_idx].dblk_nelmts; @@ -425,7 +425,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t HGOTO_ERROR( H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block and header, index = %llu", - (unsigned long long)idx) + (unsigned long long)idx); dblock->has_hdr_depend = TRUE; } /* end if */ @@ -451,7 +451,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t sblk_addr = H5EA__sblock_create(hdr, iblock, &stats_changed, sblk_idx); if (!H5_addr_defined(sblk_addr)) HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, - "unable to create extensible array super block") + "unable to create extensible array super block"); /* Set super block address in index block */ iblock->sblk_addrs[sblk_off] = sblk_addr; @@ -466,7 +466,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t thing_acc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array super block, address = %llu", - (unsigned long long)iblock->sblk_addrs[sblk_off]) + (unsigned long long)iblock->sblk_addrs[sblk_off]); /* Compute the data block index in super block */ dblk_idx = (size_t)(elmt_idx / sblock->dblk_nelmts); @@ -486,7 +486,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t H5EA__dblock_create(hdr, sblock, &stats_changed, dblk_off, sblock->dblk_nelmts); if (!H5_addr_defined(dblk_addr)) HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, - "unable to create extensible array data block") + "unable to create extensible array data block"); /* Set data block address in index block */ sblock->dblk_addrs[dblk_idx] = dblk_addr; @@ -500,7 +500,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between super block and header, address " "= %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); sblock->has_hdr_depend = TRUE; } /* end if */ } /* end if */ @@ -536,7 +536,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t if (0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */ /* Create the data block page */ if (H5EA__dblk_page_create(hdr, sblock, dblk_page_addr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page"); /* Mark data block page as initialized in super block */ H5VM_bit_set(sblock->page_init, page_init_idx, TRUE); @@ -550,7 +550,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t if (NULL == (dblk_page = H5EA__dblk_page_protect(hdr, sblock, dblk_page_addr, thing_acc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Check if there is already a dependency on the header */ if (will_extend && !dblk_page->has_hdr_depend) { @@ -558,7 +558,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block page and header, " "index = %llu", - (unsigned long long)idx) + (unsigned long long)idx); dblk_page->has_hdr_depend = TRUE; } /* end if */ @@ -574,7 +574,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t sblock->dblk_nelmts, thing_acc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array data block, address = %llu", - (unsigned long long)sblock->dblk_addrs[dblk_idx]) + (unsigned long long)sblock->dblk_addrs[dblk_idx]); /* Check if there is already a dependency on the header */ if (will_extend && !dblock->has_hdr_depend) { @@ -582,7 +582,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend, unsigned t HGOTO_ERROR( H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block and header, index = %llu", - (unsigned long long)idx) + (unsigned long long)idx); dblock->has_hdr_depend = TRUE; } /* end if */ @@ -667,7 +667,7 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt) will_extend = (idx >= hdr->stats.stored.max_idx_set); if (H5EA__lookup_elmt(ea, idx, will_extend, H5AC__NO_FLAGS_SET, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata"); /* Sanity check */ assert(thing); @@ -685,7 +685,7 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt) hdr->stats.stored.max_idx_set = idx + 1; if (H5EA__hdr_modified(hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTMARKDIRTY, FAIL, - "unable to mark extensible array header as modified") + "unable to mark extensible array header as modified"); } done: @@ -724,7 +724,7 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt) if (idx >= hdr->stats.stored.max_idx_set) { /* Call the class's 'fill' callback */ if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value"); } /* end if */ else { uint8_t *thing_elmt_buf; /* Pointer to the element buffer for the array metadata */ @@ -736,13 +736,13 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt) /* Look up the array metadata containing the element we want to set */ if (H5EA__lookup_elmt(ea, idx, FALSE, H5AC__READ_ONLY_FLAG, &thing, &thing_elmt_buf, &thing_elmt_idx, &thing_unprot_func) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect array metadata"); /* Check if the thing holding the element has been created yet */ if (NULL == thing) { /* Call the class's 'fill' callback */ if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value"); } /* end if */ else /* Get element from thing's element buffer */ @@ -795,7 +795,7 @@ H5EA_depend(H5EA_t *ea, H5AC_proxy_entry_t *parent) /* Add the extensible array as a child of the parent (proxy) */ if (H5AC_proxy_entry_add_child(parent, hdr->f, hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "unable to add extensible array as child of proxy") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, "unable to add extensible array as child of proxy"); hdr->parent = parent; } @@ -855,7 +855,7 @@ H5EA_close(H5EA_t *ea) /* Check the header's status in the metadata cache */ if (H5AC_get_entry_status(ea->f, ea_addr, &hdr_status) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, - "unable to check metadata cache status for extensible array header") + "unable to check metadata cache status for extensible array header"); /* Sanity checks on header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -867,7 +867,7 @@ H5EA_close(H5EA_t *ea) /* Lock the array header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ if (NULL == (hdr = H5EA__hdr_protect(ea->f, ea_addr, NULL, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTLOAD, FAIL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTLOAD, FAIL, "unable to load extensible array header"); /* Set the shared array header's file context for this operation */ hdr->f = ea->f; @@ -878,11 +878,11 @@ H5EA_close(H5EA_t *ea) */ if (H5EA__hdr_decr(ea->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); /* Delete array, starting with header (unprotects header) */ if (H5EA__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array"); } /* end if */ else { /* Decrement the reference count on the array header */ @@ -891,7 +891,7 @@ H5EA_close(H5EA_t *ea) */ if (H5EA__hdr_decr(ea->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); } /* end else */ } /* end if */ @@ -926,7 +926,7 @@ H5EA_delete(H5F_t *f, haddr_t ea_addr, void *ctx_udata) /* Lock the array header into memory */ if (NULL == (hdr = H5EA__hdr_protect(f, ea_addr, ctx_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, - "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr) + "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr); /* Check for files using shared array header */ if (hdr->file_rc) @@ -937,7 +937,7 @@ H5EA_delete(H5F_t *f, haddr_t ea_addr, void *ctx_udata) /* Delete array now, starting with header (unprotects header) */ if (H5EA__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array"); hdr = NULL; } @@ -976,13 +976,13 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata) /* Allocate space for a native array element */ if (NULL == (elmt = H5FL_BLK_MALLOC(ea_native_elmt, ea->hdr->cparam.cls->nat_elmt_size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, H5_ITER_ERROR, - "memory allocation failed for extensible array element") + "memory allocation failed for extensible array element"); /* Iterate over all elements in array */ for (u = 0; u < ea->hdr->stats.stored.max_idx_set && ret_value == H5_ITER_CONT; u++) { /* Get array element */ if (H5EA_get(ea, u, elmt) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array"); /* Make callback */ if ((ret_value = (*op)(u, elmt, udata)) < 0) { diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 383a215..d482141 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -297,24 +297,24 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Allocate space for the extensible array data structure */ if (NULL == (hdr = H5EA__hdr_alloc(udata->f))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array shared header") + "memory allocation failed for extensible array shared header"); /* Set the extensible array header's address */ hdr->addr = udata->addr; /* Magic number */ if (memcmp(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header signature") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5EA_HDR_VERSION) - HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array header version") + HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array header version"); /* Extensible array class */ id = (H5EA_cls_id_t)*image++; if (id >= H5EA_NUM_CLS_ID) - HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class") + HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class"); hdr->cparam.cls = H5EA_client_class_g[id]; /* General array creation/configuration information */ @@ -375,7 +375,7 @@ H5EA__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* 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") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "initialization failed for extensible array header"); assert(hdr->size == len); /* Set return value */ @@ -532,7 +532,7 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent, (void *)hdr->top_proxy) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between extensible array and proxy") + "unable to destroy flush dependency between extensible array and proxy"); hdr->parent = NULL; } /* end if */ @@ -541,14 +541,14 @@ H5EA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(hdr->top_proxy, hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between header and " - "extensible array 'top' proxy") + "extensible array 'top' proxy"); /* Don't reset hdr->top_proxy here, it's destroyed when the header is freed -QAK */ } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -583,7 +583,7 @@ H5EA__cache_hdr_free_icr(void *thing) /* Release the extensible array header */ if (H5EA__hdr_dest((H5EA_hdr_t *)thing) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -686,28 +686,28 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Allocate the extensible array index block */ if (NULL == (iblock = H5EA__iblock_alloc(hdr))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array index block") + "memory allocation failed for extensible array index block"); /* Set the extensible array index block's address */ iblock->addr = hdr->idx_blk_addr; /* Magic number */ 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") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array index block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5EA_IBLOCK_VERSION) - HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array index block version") + HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array index block version"); /* Extensible array type */ if (*image++ != (uint8_t)hdr->cparam.cls->id) - HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class") + HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class"); /* Address of header for array that owns this block (just for file integrity checks) */ H5F_addr_decode(hdr->f, &image, &arr_addr); if (H5_addr_ne(arr_addr, hdr->addr)) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address"); /* Internal information */ @@ -716,7 +716,7 @@ H5EA__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Convert from raw elements on disk into native elements in memory */ if ((hdr->cparam.cls->decode)(image, iblock->elmts, (size_t)hdr->cparam.idx_blk_elmts, hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array index elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array index elements"); image += (hdr->cparam.idx_blk_elmts * hdr->cparam.raw_elmt_size); } /* end if */ @@ -835,7 +835,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED /* Convert from native elements in memory into raw elements on disk */ if ((iblock->hdr->cparam.cls->encode)(image, iblock->elmts, (size_t)iblock->hdr->cparam.idx_blk_elmts, iblock->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array index elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array index elements"); image += (iblock->hdr->cparam.idx_blk_elmts * iblock->hdr->cparam.raw_elmt_size); } /* end if */ @@ -899,7 +899,7 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between index block and header, address = %llu", - (unsigned long long)iblock->addr) + (unsigned long long)iblock->addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -918,21 +918,21 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between index block and header, address = %llu", - (unsigned long long)iblock->addr) + (unsigned long long)iblock->addr); /* Detach from 'top' proxy for extensible array */ if (iblock->top_proxy) { if (H5AC_proxy_entry_remove_child(iblock->top_proxy, iblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between index block and " - "extensible array 'top' proxy") + "extensible array 'top' proxy"); iblock->top_proxy = NULL; } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -964,7 +964,7 @@ H5EA__cache_iblock_free_icr(void *thing) /* Release the extensible array index block */ if (H5EA__iblock_dest((H5EA_iblock_t *)thing) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array index block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array index block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1089,28 +1089,28 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Allocate the extensible array super block */ if (NULL == (sblock = H5EA__sblock_alloc(udata->hdr, udata->parent, udata->sblk_idx))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array super block") + "memory allocation failed for extensible array super block"); /* Set the extensible array super block's address */ sblock->addr = udata->sblk_addr; /* Magic number */ 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") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array super block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5EA_SBLOCK_VERSION) - HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array super block version") + HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array super block version"); /* Extensible array type */ if (*image++ != (uint8_t)udata->hdr->cparam.cls->id) - HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class") + HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class"); /* Address of header for array that owns this block (just for file integrity checks) */ H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if (H5_addr_ne(arr_addr, udata->hdr->addr)) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address"); /* Offset of block within the array's address space */ UINT64DECODE_VAR(image, sblock->block_off, udata->hdr->arr_off_size); @@ -1283,7 +1283,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between super block and index block, address = %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -1293,7 +1293,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between super block and header, address = %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); sblock->has_hdr_depend = FALSE; } /* end if */ break; @@ -1304,7 +1304,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between super block and index block, address = %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); /* Destroy flush dependency on extensible array header, if set */ if (sblock->has_hdr_depend) { @@ -1312,7 +1312,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between super block and header, address = %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); sblock->has_hdr_depend = FALSE; } /* end if */ @@ -1321,7 +1321,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(sblock->top_proxy, sblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between super block and " - "extensible array 'top' proxy") + "extensible array 'top' proxy"); sblock->top_proxy = NULL; } /* end if */ break; @@ -1337,7 +1337,7 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -1369,7 +1369,7 @@ H5EA__cache_sblock_free_icr(void *thing) /* Release the extensible array super block */ if (H5EA__sblock_dest((H5EA_sblock_t *)thing) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array super block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array super block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1495,7 +1495,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* 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") + "memory allocation failed for extensible array data block"); assert(((!dblock->npages) && (len == H5EA_DBLOCK_SIZE(dblock))) || (len == H5EA_DBLOCK_PREFIX_SIZE(dblock))); @@ -1505,21 +1505,21 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Magic number */ 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") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array data block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5EA_DBLOCK_VERSION) - HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array data block version") + HGOTO_ERROR(H5E_EARRAY, H5E_VERSION, NULL, "wrong extensible array data block version"); /* Extensible array type */ if (*image++ != (uint8_t)udata->hdr->cparam.cls->id) - HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class") + HGOTO_ERROR(H5E_EARRAY, H5E_BADTYPE, NULL, "incorrect extensible array class"); /* Address of header for array that owns this block (just for file integrity checks) */ H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if (H5_addr_ne(arr_addr, udata->hdr->addr)) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, NULL, "wrong extensible array header address"); /* Offset of block within the array's address space */ UINT64DECODE_VAR(image, dblock->block_off, udata->hdr->arr_off_size); @@ -1531,7 +1531,7 @@ H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Decode elements in data block */ /* Convert from raw elements on disk into native elements in memory */ if ((udata->hdr->cparam.cls->decode)(image, dblock->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array data elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array data elements"); image += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); } /* end if */ @@ -1643,7 +1643,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED /* Convert from native elements in memory into raw elements on disk */ if ((dblock->hdr->cparam.cls->encode)(image, dblock->elmts, dblock->nelmts, dblock->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array data elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array data elements"); image += (dblock->nelmts * dblock->hdr->cparam.raw_elmt_size); } /* end if */ @@ -1688,7 +1688,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) if (H5EA__create_flush_depend((H5AC_info_t *)dblock->parent, (H5AC_info_t *)dblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block and parent, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -1698,7 +1698,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between direct block and header, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); dblock->has_hdr_depend = FALSE; } /* end if */ break; @@ -1709,7 +1709,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block and parent, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); /* Destroy flush dependency on extensible array header, if set */ if (dblock->has_hdr_depend) { @@ -1717,7 +1717,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block and header, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); dblock->has_hdr_depend = FALSE; } /* end if */ @@ -1726,7 +1726,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(dblock->top_proxy, dblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block and " - "extensible array 'top' proxy") + "extensible array 'top' proxy"); dblock->top_proxy = NULL; } /* end if */ break; @@ -1742,7 +1742,7 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -1774,7 +1774,7 @@ H5EA__cache_dblock_free_icr(void *thing) /* Release the extensible array data block */ if (H5EA__dblock_dest((H5EA_dblock_t *)thing) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array data block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array data block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1914,7 +1914,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, /* Allocate the extensible array data block page */ if (NULL == (dblk_page = H5EA__dblk_page_alloc(udata->hdr, udata->parent))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array data block page") + "memory allocation failed for extensible array data block page"); /* Set the extensible array data block page's information */ dblk_page->addr = udata->dblk_page_addr; @@ -1925,7 +1925,7 @@ H5EA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, /* Convert from raw elements on disk into native elements in memory */ if ((udata->hdr->cparam.cls->decode)(image, dblk_page->elmts, udata->hdr->dblk_page_nelmts, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array data elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDECODE, NULL, "can't decode extensible array data elements"); image += (udata->hdr->dblk_page_nelmts * udata->hdr->cparam.raw_elmt_size); /* Sanity check */ @@ -2013,7 +2013,7 @@ H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima /* Convert from native elements in memory into raw elements on disk */ if ((dblk_page->hdr->cparam.cls->encode)(image, dblk_page->elmts, dblk_page->hdr->dblk_page_nelmts, dblk_page->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array data elements") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTENCODE, FAIL, "can't encode extensible array data elements"); image += (dblk_page->hdr->dblk_page_nelmts * dblk_page->hdr->cparam.raw_elmt_size); /* Compute metadata checksum */ @@ -2058,7 +2058,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block page and parent, address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -2068,7 +2068,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block page and header, " "address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); dblk_page->has_hdr_depend = FALSE; } /* end if */ break; @@ -2079,7 +2079,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block page and parent, address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); /* Destroy flush dependency on extensible array header, if set */ if (dblk_page->has_hdr_depend) { @@ -2087,7 +2087,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block page and header, " "address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); dblk_page->has_hdr_depend = FALSE; } /* end if */ @@ -2096,7 +2096,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(dblk_page->top_proxy, dblk_page) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block page and " - "extensible array 'top' proxy") + "extensible array 'top' proxy"); dblk_page->top_proxy = NULL; } /* end if */ break; @@ -2112,7 +2112,7 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -2144,7 +2144,7 @@ H5EA__cache_dblk_page_free_icr(void *thing) /* Release the extensible array data block page */ if (H5EA__dblk_page_dest((H5EA_dblk_page_t *)thing) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array data block page") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, "can't free extensible array data block page"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index e9a53ca..318448a 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -97,11 +97,11 @@ H5EA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context"); /* Load the extensible array header */ if (NULL == (hdr = H5EA__hdr_protect(f, addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header"); /* Print opening message */ fprintf(stream, "%*sExtensible Array Header...\n", indent, ""); @@ -179,11 +179,11 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context"); /* Load the extensible array header */ if (NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header"); /* Sanity check */ assert(H5_addr_eq(hdr->idx_blk_addr, addr)); @@ -192,7 +192,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array index block, address = %llu", - (unsigned long long)hdr->idx_blk_addr) + (unsigned long long)hdr->idx_blk_addr); /* Print opening message */ fprintf(stream, "%*sExtensible Array Index Block...\n", indent, ""); @@ -216,7 +216,7 @@ H5EA__iblock_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int inde if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)iblock->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "can't get element for debugging") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "can't get element for debugging"); } /* end for */ } /* end if */ @@ -297,11 +297,11 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context"); /* Load the extensible array header */ if (NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header"); /* Protect super block */ /* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */ @@ -309,7 +309,7 @@ H5EA__sblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, (sblock = H5EA__sblock_protect(hdr, (H5EA_iblock_t *)hdr, addr, sblk_idx, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array super block, address = %llu", - (unsigned long long)addr) + (unsigned long long)addr); /* Print opening message */ fprintf(stream, "%*sExtensible Array Super Block...\n", indent, ""); @@ -386,17 +386,17 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to create extensible array debugging context"); /* Load the extensible array header */ if (NULL == (hdr = H5EA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to load extensible array header"); /* Protect data block */ /* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */ if (NULL == (dblock = H5EA__dblock_protect(hdr, hdr, addr, dblk_nelmts, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, - "unable to protect extensible array data block, address = %" PRIuHADDR, addr) + "unable to protect extensible array data block, address = %" PRIuHADDR, addr); /* Print opening message */ fprintf(stream, "%*sExtensible Array data Block...\n", indent, ""); @@ -411,7 +411,7 @@ H5EA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "can't get element for debugging") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "can't get element for debugging"); } /* end for */ done: diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c index a96768f..3ebbcd7 100644 --- a/src/H5EAdblkpage.c +++ b/src/H5EAdblkpage.c @@ -92,11 +92,11 @@ H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *parent) /* Allocate memory for the data block */ if (NULL == (dblk_page = H5FL_CALLOC(H5EA_dblk_page_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array data block page") + "memory allocation failed for extensible array data block page"); /* Share common array information */ if (H5EA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); dblk_page->hdr = hdr; /* Set non-zero internal fields */ @@ -105,7 +105,7 @@ H5EA__dblk_page_alloc(H5EA_hdr_t *hdr, H5EA_sblock_t *parent) /* Allocate buffer for elements in data block page */ if (NULL == (dblk_page->elmts = H5EA__hdr_alloc_elmts(hdr, hdr->dblk_page_nelmts))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block page element buffer") + "memory allocation failed for data block page element buffer"); /* Set the return value */ ret_value = dblk_page; @@ -142,7 +142,7 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr) /* Allocate the data block page */ if (NULL == (dblk_page = H5EA__dblk_page_alloc(hdr, parent))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, FAIL, - "memory allocation failed for extensible array data block page") + "memory allocation failed for extensible array data block page"); /* Set info about data block page on disk */ dblk_page->addr = addr; @@ -151,18 +151,18 @@ H5EA__dblk_page_create(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t addr) /* Clear any elements in data block page to fill value */ if ((hdr->cparam.cls->fill)(dblk_page->elmts, (size_t)hdr->dblk_page_nelmts) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, - "can't set extensible array data block page elements to class's fill value") + "can't set extensible array data block page elements to class's fill value"); /* Cache the new extensible array data block page */ if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, FAIL, "can't add extensible array data block page to cache") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, FAIL, "can't add extensible array data block page to cache"); inserted = TRUE; /* Add data block page as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, FAIL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -220,14 +220,14 @@ H5EA__dblk_page_protect(H5EA_hdr_t *hdr, H5EA_sblock_t *parent, haddr_t dblk_pag &udata, flags))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to protect extensible array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == dblk_page->top_proxy) { /* Add data block page as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, NULL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -271,7 +271,7 @@ H5EA__dblk_page_unprotect(H5EA_dblk_page_t *dblk_page, unsigned cache_flags) if (H5AC_unprotect(dblk_page->hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect extensible array data block page, address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -304,14 +304,14 @@ H5EA__dblk_page_dest(H5EA_dblk_page_t *dblk_page) /* Free buffer for data block page elements */ if (H5EA__hdr_free_elmts(dblk_page->hdr, dblk_page->hdr->dblk_page_nelmts, dblk_page->elmts) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTFREE, FAIL, - "unable to free extensible array data block element buffer") + "unable to free extensible array data block element buffer"); dblk_page->elmts = NULL; } /* end if */ /* Decrement reference count on shared info */ if (H5EA__hdr_decr(dblk_page->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); dblk_page->hdr = NULL; } /* end if */ diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c index ea11aa9..64b01ed 100644 --- a/src/H5EAdblock.c +++ b/src/H5EAdblock.c @@ -95,11 +95,11 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts) /* Allocate memory for the data block */ if (NULL == (dblock = H5FL_CALLOC(H5EA_dblock_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array data block") + "memory allocation failed for extensible array data block"); /* Share common array information */ if (H5EA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); dblock->hdr = hdr; /* Set non-zero internal fields */ @@ -116,7 +116,7 @@ H5EA__dblock_alloc(H5EA_hdr_t *hdr, void *parent, size_t nelmts) /* Allocate buffer for elements in data block */ if (NULL == (dblock->elmts = H5EA__hdr_alloc_elmts(hdr, nelmts))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block element buffer") + "memory allocation failed for data block element buffer"); } /* end else */ /* Set the return value */ @@ -157,7 +157,7 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize /* Allocate the data block */ if (NULL == (dblock = H5EA__dblock_alloc(hdr, parent, nelmts))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for extensible array data block") + "memory allocation failed for extensible array data block"); /* Set size of data block on disk */ dblock->size = H5EA_DBLOCK_SIZE(dblock); @@ -168,7 +168,7 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize /* Allocate space for the data block on disk */ if (HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_EARRAY_DBLOCK, (hsize_t)dblock->size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "file allocation failed for extensible array data block") + "file allocation failed for extensible array data block"); dblock->addr = dblock_addr; /* Don't initialize elements if paged */ @@ -176,18 +176,19 @@ H5EA__dblock_create(H5EA_hdr_t *hdr, void *parent, hbool_t *stats_changed, hsize /* Clear any elements in data block to fill value */ if ((hdr->cparam.cls->fill)(dblock->elmts, (size_t)dblock->nelmts) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "can't set extensible array data block elements to class's fill value") + "can't set extensible array data block elements to class's fill value"); /* Cache the new extensible array data block */ if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add extensible array data block to cache") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, + "can't add extensible array data block to cache"); inserted = TRUE; /* Add data block as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); dblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -296,14 +297,14 @@ H5EA__dblock_protect(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t db (dblock = (H5EA_dblock_t *)H5AC_protect(hdr->f, H5AC_EARRAY_DBLOCK, dblk_addr, &udata, flags))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to protect extensible array data block, address = %llu", - (unsigned long long)dblk_addr) + (unsigned long long)dblk_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == dblock->top_proxy) { /* Add data block as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, NULL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); dblock->top_proxy = hdr->top_proxy; } @@ -348,7 +349,7 @@ H5EA__dblock_unprotect(H5EA_dblock_t *dblock, unsigned cache_flags) if (H5AC_unprotect(dblock->hdr->f, H5AC_EARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect extensible array data block, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); done: @@ -382,7 +383,7 @@ H5EA__dblock_delete(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t dbl if (NULL == (dblock = H5EA__dblock_protect(hdr, parent, dblk_addr, dblk_nelmts, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array data block, address = %llu", - (unsigned long long)dblk_addr) + (unsigned long long)dblk_addr); /* Check if this is a paged data block */ if (dblk_nelmts > hdr->dblk_page_nelmts) { @@ -401,7 +402,7 @@ H5EA__dblock_delete(H5EA_hdr_t *hdr, void *parent, haddr_t dblk_addr, size_t dbl /* (OK to call if it doesn't exist in the cache) */ if (H5AC_expunge_entry(hdr->f, H5AC_EARRAY_DBLK_PAGE, dblk_page_addr, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTEXPUNGE, FAIL, - "unable to remove array data block page from metadata cache") + "unable to remove array data block page from metadata cache"); /* Advance to next page address */ dblk_page_addr += dblk_page_size; @@ -445,7 +446,7 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock) 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") + "unable to free extensible array data block element buffer"); dblock->elmts = NULL; dblock->nelmts = 0; } /* end if */ @@ -453,7 +454,7 @@ H5EA__dblock_dest(H5EA_dblock_t *dblock) /* Decrement reference count on shared info */ if (H5EA__hdr_decr(dblock->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); dblock->hdr = NULL; } /* end if */ diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c index 9a95610..1364d7b 100644 --- a/src/H5EAhdr.c +++ b/src/H5EAhdr.c @@ -110,7 +110,7 @@ H5EA__hdr_alloc(H5F_t *f) /* Allocate space for the shared information */ if (NULL == (hdr = H5FL_CALLOC(H5EA_hdr_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array shared header") + "memory allocation failed for extensible array shared header"); /* Set non-zero internal fields */ hdr->addr = HADDR_UNDEF; @@ -187,7 +187,7 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata) /* Allocate information for each super block */ if (NULL == (hdr->sblk_info = H5FL_SEQ_MALLOC(H5EA_sblk_info_t, hdr->nsblks))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, FAIL, "memory allocation failed for super block info array") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, FAIL, "memory allocation failed for super block info array"); /* Compute information about each super block */ start_idx = 0; @@ -210,7 +210,7 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata) if (hdr->cparam.cls->crt_context) { if (NULL == (hdr->cb_ctx = (*hdr->cparam.cls->crt_context)(ctx_udata))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, FAIL, - "unable to create extensible array client callback context") + "unable to create extensible array client callback context"); } done: @@ -252,7 +252,7 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts) /* Re-allocate array of element factories */ if (NULL == (new_fac = H5FL_SEQ_REALLOC(H5FL_fac_head_ptr_t, hdr->elmt_fac.fac, new_nalloc))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block data element buffer factory array") + "memory allocation failed for data block data element buffer factory array"); /* Zero out new elements allocated */ memset(new_fac + hdr->elmt_fac.nalloc, 0, @@ -266,13 +266,14 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts) /* Check for un-initialized factory at index */ if (NULL == hdr->elmt_fac.fac[idx]) { if (NULL == (hdr->elmt_fac.fac[idx] = H5FL_fac_init(nelmts * (size_t)hdr->cparam.cls->nat_elmt_size))) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, "can't create data block data element buffer factory") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, NULL, + "can't create data block data element buffer factory"); } /* end if */ /* Allocate buffer for elements in index block */ if (NULL == (elmts = H5FL_FAC_MALLOC(hdr->elmt_fac.fac[idx]))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block data element buffer") + "memory allocation failed for data block data element buffer"); /* Set the return value */ ret_value = elmts; @@ -349,26 +350,27 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata) /* Check for valid parameters */ if (cparam->raw_elmt_size == 0) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, "element size must be greater than zero") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, "element size must be greater than zero"); if (cparam->max_nelmts_bits == 0) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "max. # of elements bits must be greater than zero") + "max. # of elements bits must be greater than zero"); if (cparam->max_nelmts_bits > H5EA_MAX_NELMTS_IDX_MAX) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, "max. # of elements bits must be <= %u", - (unsigned)H5EA_MAX_NELMTS_IDX_MAX) + (unsigned)H5EA_MAX_NELMTS_IDX_MAX); if (cparam->sup_blk_min_data_ptrs < 2) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "min # of data block pointers in super block must be >= two") + "min # of data block pointers in super block must be >= two"); if (!POWER_OF_TWO(cparam->sup_blk_min_data_ptrs)) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "min # of data block pointers in super block must be power of two") + "min # of data block pointers in super block must be power of two"); if (!POWER_OF_TWO(cparam->data_blk_min_elmts)) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "min # of elements per data block must be power of two") + "min # of elements per data block must be power of two"); dblk_page_nelmts = (size_t)1 << cparam->max_dblk_page_nelmts_bits; if (dblk_page_nelmts < cparam->idx_blk_elmts) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "# of elements per data block page must be greater than # of elements in index block") + HGOTO_ERROR( + H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, + "# of elements per data block page must be greater than # of elements in index block"); /* Compute the number of elements in data blocks for first actual super block */ sblk_idx = H5EA_SBLK_FIRST_IDX(cparam->sup_blk_min_data_ptrs); @@ -376,18 +378,18 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata) if (dblk_page_nelmts < dblk_nelmts) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, "max. # of elements per data block page bits must be > # of elements in " - "first data block from super block") + "first data block from super block"); if (cparam->max_dblk_page_nelmts_bits > cparam->max_nelmts_bits) HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, HADDR_UNDEF, - "max. # of elements per data block page bits must be <= max. # of elements bits") + "max. # of elements per data block page bits must be <= max. # of elements bits"); } #endif /* NDEBUG */ /* Allocate space for the shared information */ if (NULL == (hdr = H5EA__hdr_alloc(f))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for extensible array shared header") + "memory allocation failed for extensible array shared header"); /* Set the internal parameters for the array */ hdr->idx_blk_addr = HADDR_UNDEF; @@ -398,28 +400,28 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata) /* Finish initializing extensible array header */ if (H5EA__hdr_init(hdr, ctx_udata) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINIT, HADDR_UNDEF, - "initialization failed for extensible array header") + "initialization failed for extensible array header"); /* Allocate space for the header on disk */ if (HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_EARRAY_HDR, (hsize_t)hdr->size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "file allocation failed for extensible array header") + "file allocation failed for extensible array header"); /* Create 'top' proxy for extensible array entries */ if (hdr->swmr_write) if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, HADDR_UNDEF, "can't create extensible array entry proxy") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, HADDR_UNDEF, "can't create extensible array entry proxy"); /* Cache the new extensible array header */ if (H5AC_insert_entry(f, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add extensible array header to cache") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add extensible array header to cache"); inserted = TRUE; /* Add header as child of 'top' proxy */ if (hdr->top_proxy) if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); /* Set address of array header to return */ ret_value = hdr->addr; @@ -469,7 +471,7 @@ H5EA__hdr_incr(H5EA_hdr_t *hdr) /* Mark header as un-evictable when something is depending on it */ if (hdr->rc == 0) if (H5AC_pin_protected_entry(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTPIN, FAIL, "unable to pin extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTPIN, FAIL, "unable to pin extensible array header"); /* Increment reference count on shared header */ hdr->rc++; @@ -505,7 +507,7 @@ H5EA__hdr_decr(H5EA_hdr_t *hdr) if (hdr->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") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin extensible array header"); } done: @@ -587,7 +589,7 @@ H5EA__hdr_modified(H5EA_hdr_t *hdr) /* Mark header as dirty in cache */ if (H5AC_mark_entry_dirty(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTMARKDIRTY, FAIL, "unable to mark extensible array header as dirty") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTMARKDIRTY, FAIL, "unable to mark extensible array header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -626,19 +628,19 @@ H5EA__hdr_protect(H5F_t *f, haddr_t ea_addr, void *ctx_udata, unsigned flags) /* Protect the header */ if (NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, H5AC_EARRAY_HDR, ea_addr, &udata, flags))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, - "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr) + "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr); hdr->f = f; /* (Must be set again here, in case the header was already in the cache -QAK) */ /* Create top proxy, if it doesn't exist */ if (hdr->swmr_write && NULL == hdr->top_proxy) { /* Create 'top' proxy for extensible array entries */ if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, NULL, "can't create extensible array entry proxy") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTCREATE, NULL, "can't create extensible array entry proxy"); /* Add header as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, NULL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); } /* end if */ /* Set return value */ @@ -670,7 +672,8 @@ H5EA__hdr_unprotect(H5EA_hdr_t *hdr, unsigned cache_flags) /* Unprotect the header */ if (H5AC_unprotect(hdr->f, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect extensible array hdr, address = %llu", (unsigned long long)hdr->addr) + "unable to unprotect extensible array hdr, address = %llu", + (unsigned long long)hdr->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -702,7 +705,7 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr) /* Check the array header's status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, hdr->addr, &hdr_status) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header"); /* Sanity checks on array header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -713,7 +716,7 @@ H5EA__hdr_delete(H5EA_hdr_t *hdr) if (H5_addr_defined(hdr->idx_blk_addr)) { /* Delete index block */ if (H5EA__iblock_delete(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array index block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array index block"); } /* end if */ /* Set flags to finish deleting header on unprotect */ @@ -723,7 +726,7 @@ done: /* Unprotect the header, deleting it if an error hasn't occurred */ if (H5EA__hdr_unprotect(hdr, cache_flags) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to release extensible array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to release extensible array header"); FUNC_LEAVE_NOAPI(ret_value) } /* end H5EA__hdr_delete() */ @@ -752,7 +755,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr) if (hdr->cb_ctx) { if ((*hdr->cparam.cls->dst_context)(hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTRELEASE, FAIL, - "unable to destroy extensible array client callback context") + "unable to destroy extensible array client callback context"); } /* end if */ hdr->cb_ctx = NULL; @@ -769,7 +772,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr) if (hdr->elmt_fac.fac[u]) { if (H5FL_fac_term(hdr->elmt_fac.fac[u]) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTRELEASE, FAIL, - "unable to destroy extensible array header factory") + "unable to destroy extensible array header factory"); hdr->elmt_fac.fac[u] = NULL; } /* end if */ } /* end for */ @@ -785,7 +788,7 @@ H5EA__hdr_dest(H5EA_hdr_t *hdr) /* Destroy the 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_dest(hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTRELEASE, FAIL, "unable to destroy extensible array 'top' proxy") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTRELEASE, FAIL, "unable to destroy extensible array 'top' proxy"); hdr->top_proxy = NULL; } /* end if */ diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c index eacb7a9..28ffcc3 100644 --- a/src/H5EAiblock.c +++ b/src/H5EAiblock.c @@ -99,11 +99,11 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr) /* Allocate memory for the index block */ if (NULL == (iblock = H5FL_CALLOC(H5EA_iblock_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array index block") + "memory allocation failed for extensible array index block"); /* Share common array information */ if (H5EA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); iblock->hdr = hdr; /* Set non-zero internal fields */ @@ -120,19 +120,19 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr) (iblock->elmts = H5FL_BLK_MALLOC( idx_blk_elmt_buf, (size_t)(hdr->cparam.idx_blk_elmts * hdr->cparam.cls->nat_elmt_size)))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for index block data element buffer") + "memory allocation failed for index block data element buffer"); /* Allocate buffer for data block addresses in index block */ if (iblock->ndblk_addrs > 0) if (NULL == (iblock->dblk_addrs = H5FL_SEQ_MALLOC(haddr_t, iblock->ndblk_addrs))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for index block data block addresses") + "memory allocation failed for index block data block addresses"); /* Allocate buffer for super block addresses in index block */ if (iblock->nsblk_addrs > 0) if (NULL == (iblock->sblk_addrs = H5FL_SEQ_MALLOC(haddr_t, iblock->nsblk_addrs))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for index block super block addresses") + "memory allocation failed for index block super block addresses"); /* Set the return value */ ret_value = iblock; @@ -170,7 +170,7 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed) /* Allocate the index block */ if (NULL == (iblock = H5EA__iblock_alloc(hdr))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for extensible array index block") + "memory allocation failed for extensible array index block"); /* Set size of index block on disk */ iblock->size = H5EA_IBLOCK_SIZE(iblock); @@ -178,7 +178,7 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed) /* Allocate space for the index block on disk */ if (HADDR_UNDEF == (iblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_EARRAY_IBLOCK, (hsize_t)iblock->size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "file allocation failed for extensible array index block") + "file allocation failed for extensible array index block"); iblock->addr = iblock_addr; /* Clear any elements in index block to fill value */ @@ -186,7 +186,7 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed) /* Call the class's 'fill' callback */ if ((hdr->cparam.cls->fill)(iblock->elmts, (size_t)hdr->cparam.idx_blk_elmts) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "can't set extensible array index block elements to class's fill value") + "can't set extensible array index block elements to class's fill value"); } /* end if */ /* Reset any data block addresses in the index block */ @@ -208,14 +208,14 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed) /* Cache the new extensible array index block */ if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_IBLOCK, iblock_addr, iblock, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, - "can't add extensible array index block to cache") + "can't add extensible array index block to cache"); inserted = TRUE; /* Add index block as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, iblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); iblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -286,14 +286,14 @@ H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags) (iblock = (H5EA_iblock_t *)H5AC_protect(hdr->f, H5AC_EARRAY_IBLOCK, hdr->idx_blk_addr, hdr, flags))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to protect extensible array index block, address = %llu", - (unsigned long long)hdr->idx_blk_addr) + (unsigned long long)hdr->idx_blk_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == iblock->top_proxy) { /* Add index block as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, iblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, NULL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); iblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -337,7 +337,7 @@ H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags) if (H5AC_unprotect(iblock->hdr->f, H5AC_EARRAY_IBLOCK, iblock->addr, iblock, cache_flags) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect extensible array index block, address = %llu", - (unsigned long long)iblock->addr) + (unsigned long long)iblock->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -368,7 +368,7 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr) if (NULL == (iblock = H5EA__iblock_protect(hdr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array index block, address = %llu", - (unsigned long long)hdr->idx_blk_addr) + (unsigned long long)hdr->idx_blk_addr); /* Check for index block having data block pointers */ if (iblock->ndblk_addrs > 0) { @@ -385,7 +385,7 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr) if (H5EA__dblock_delete(hdr, iblock, iblock->dblk_addrs[u], hdr->sblk_info[sblk_idx].dblk_nelmts) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, - "unable to delete extensible array data block") + "unable to delete extensible array data block"); iblock->dblk_addrs[u] = HADDR_UNDEF; } /* end if */ @@ -412,7 +412,7 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr) if (H5EA__sblock_delete(hdr, iblock, iblock->sblk_addrs[u], (unsigned)(u + iblock->nsblks)) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, - "unable to delete extensible array super block") + "unable to delete extensible array super block"); iblock->sblk_addrs[u] = HADDR_UNDEF; } } @@ -474,7 +474,7 @@ H5EA__iblock_dest(H5EA_iblock_t *iblock) /* Decrement reference count on shared info */ if (H5EA__hdr_decr(iblock->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); iblock->hdr = NULL; } /* end if */ diff --git a/src/H5EAint.c b/src/H5EAint.c index eec112d..8ca3bc7 100644 --- a/src/H5EAint.c +++ b/src/H5EAint.c @@ -86,7 +86,7 @@ H5EA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Create a flush dependency between parent and child entry */ if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -114,7 +114,7 @@ H5EA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Destroy a flush dependency between parent and child entry */ if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c index 677a0f3..aeab902 100644 --- a/src/H5EAsblock.c +++ b/src/H5EAsblock.c @@ -99,11 +99,11 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx) /* Allocate memory for the index block */ if (NULL == (sblock = H5FL_CALLOC(H5EA_sblock_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for extensible array super block") + "memory allocation failed for extensible array super block"); /* Share common array information */ if (H5EA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); sblock->hdr = hdr; /* Set non-zero internal fields */ @@ -119,7 +119,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx) /* Allocate buffer for data block addresses in super block */ if (NULL == (sblock->dblk_addrs = H5FL_SEQ_MALLOC(haddr_t, sblock->ndblks))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for super block data block addresses") + "memory allocation failed for super block data block addresses"); /* Check if # of elements in data blocks requires paging */ if (sblock->dblk_nelmts > hdr->dblk_page_nelmts) { @@ -140,7 +140,7 @@ H5EA__sblock_alloc(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, unsigned sblk_idx) if (NULL == (sblock->page_init = H5FL_BLK_CALLOC(page_init, sblock->ndblks * sblock->dblk_page_init_size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for super block page init bitmask") + "memory allocation failed for super block page init bitmask"); /* Compute data block page size */ sblock->dblk_page_size = (hdr->dblk_page_nelmts * hdr->cparam.raw_elmt_size) + H5EA_SIZEOF_CHKSUM; @@ -184,7 +184,7 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang /* Allocate the super block */ if (NULL == (sblock = H5EA__sblock_alloc(hdr, parent, sblk_idx))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for extensible array super block") + "memory allocation failed for extensible array super block"); /* Set size of super block on disk */ sblock->size = H5EA_SBLOCK_SIZE(sblock); @@ -195,7 +195,7 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang /* Allocate space for the super block on disk */ if (HADDR_UNDEF == (sblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_EARRAY_SBLOCK, (hsize_t)sblock->size))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "file allocation failed for extensible array super block") + "file allocation failed for extensible array super block"); sblock->addr = sblock_addr; /* Reset data block addresses to "undefined" address value */ @@ -204,14 +204,14 @@ H5EA__sblock_create(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, hbool_t *stats_chang /* Cache the new extensible array super block */ if (H5AC_insert_entry(hdr->f, H5AC_EARRAY_SBLOCK, sblock_addr, sblock, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTINSERT, HADDR_UNDEF, - "can't add extensible array super block to cache") + "can't add extensible array super block to cache"); inserted = TRUE; /* Add super block as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, sblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); sblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -286,14 +286,14 @@ H5EA__sblock_protect(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr, (sblock = (H5EA_sblock_t *)H5AC_protect(hdr->f, H5AC_EARRAY_SBLOCK, sblk_addr, &udata, flags))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, NULL, "unable to protect extensible array super block, address = %llu", - (unsigned long long)sblk_addr) + (unsigned long long)sblk_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == sblock->top_proxy) { /* Add super block as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, sblock) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTSET, NULL, - "unable to add extensible array entry as child of array proxy") + "unable to add extensible array entry as child of array proxy"); sblock->top_proxy = hdr->top_proxy; } @@ -337,7 +337,7 @@ H5EA__sblock_unprotect(H5EA_sblock_t *sblock, unsigned cache_flags) if (H5AC_unprotect(sblock->hdr->f, H5AC_EARRAY_SBLOCK, sblock->addr, sblock, cache_flags) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect extensible array super block, address = %llu", - (unsigned long long)sblock->addr) + (unsigned long long)sblock->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -369,7 +369,7 @@ H5EA__sblock_delete(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr, u if (NULL == (sblock = H5EA__sblock_protect(hdr, parent, sblk_addr, sblk_idx, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTPROTECT, FAIL, "unable to protect extensible array super block, address = %llu", - (unsigned long long)sblk_addr) + (unsigned long long)sblk_addr); /* Iterate over data blocks */ for (u = 0; u < sblock->ndblks; u++) { @@ -377,7 +377,7 @@ H5EA__sblock_delete(H5EA_hdr_t *hdr, H5EA_iblock_t *parent, haddr_t sblk_addr, u if (H5_addr_defined(sblock->dblk_addrs[u])) { /* Delete data block */ if (H5EA__dblock_delete(hdr, sblock, sblock->dblk_addrs[u], sblock->dblk_nelmts) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array data block") + HGOTO_ERROR(H5E_EARRAY, H5E_CANTDELETE, FAIL, "unable to delete extensible array data block"); sblock->dblk_addrs[u] = HADDR_UNDEF; } /* end if */ } /* end for */ @@ -426,7 +426,7 @@ H5EA__sblock_dest(H5EA_sblock_t *sblock) /* Decrement reference count on shared info */ if (H5EA__hdr_decr(sblock->hdr) < 0) HGOTO_ERROR(H5E_EARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); sblock->hdr = NULL; } /* end if */ diff --git a/src/H5EAtest.c b/src/H5EAtest.c index f15f2ee..3f44e71 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -125,7 +125,7 @@ H5EA__test_crt_context(void *_udata) /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5EA__test_ctx_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "can't allocate extensible array client callback context") + "can't allocate extensible array client callback context"); /* Initialize the context */ ctx->bogus = H5EA__TEST_BOGUS_VAL; @@ -218,7 +218,7 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx) /* Check for callback action */ if (ctx->cb) { if ((*ctx->cb->encode)(elmt, nelmts, ctx->cb->udata) < 0) - HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "extensible array testing callback action failed") + HGOTO_ERROR(H5E_EARRAY, H5E_BADVALUE, FAIL, "extensible array testing callback action failed"); } /* Encode native elements into raw elements */ @@ -329,7 +329,7 @@ H5EA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_a /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5EA__ctx_cb_t))) HGOTO_ERROR(H5E_EARRAY, H5E_CANTALLOC, NULL, - "can't allocate extensible array client callback context") + "can't allocate extensible array client callback context"); /* Set return value */ ret_value = ctx; diff --git a/src/H5ES.c b/src/H5ES.c index 7370b89..0faedf2 100644 --- a/src/H5ES.c +++ b/src/H5ES.c @@ -88,11 +88,11 @@ H5EScreate(void) /* Create the new event set object */ if (NULL == (es = H5ES__create())) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, H5I_INVALID_HID, "can't create event set") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, H5I_INVALID_HID, "can't create event set"); /* Register the new event set to get an ID for it */ if ((ret_value = H5I_register(H5I_EVENTSET, es, TRUE)) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register event set") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register event set"); done: FUNC_LEAVE_API(ret_value) @@ -122,17 +122,17 @@ H5ESinsert_request(hid_t es_id, hid_t connector_id, void *request) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (NULL == request) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL request pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL request pointer"); /* Create new VOL connector object, using the connector ID */ if (NULL == (connector = H5VL_new_connector(connector_id))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, FAIL, "can't create VOL connector object") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, FAIL, "can't create VOL connector object"); /* Insert request into event set */ if (H5ES__insert_request(es, connector, request) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "can't insert request into event set") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "can't insert request into event set"); done: /* Clean up on error */ @@ -169,7 +169,7 @@ H5ESget_count(hid_t es_id, size_t *count /*out*/) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); /* Retrieve the count, if non-NULL */ if (count) @@ -210,7 +210,7 @@ H5ESget_op_counter(hid_t es_id, uint64_t *op_counter /*out*/) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); /* Retrieve the operation counter, if non-NULL */ if (op_counter) @@ -256,14 +256,14 @@ H5ESget_requests(hid_t es_id, H5_iter_order_t order, hid_t *connector_ids, void /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Call internal routine */ if (array_len > 0 && (requests || connector_ids)) if (H5ES__get_requests(es, order, connector_ids, requests, array_len) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't get requests") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't get requests"); /* Retrieve the count, if non-NULL */ if (count) @@ -312,15 +312,15 @@ H5ESwait(hid_t es_id, uint64_t timeout, size_t *num_in_progress /*out*/, hbool_t /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (NULL == num_in_progress) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL num_in_progress pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL num_in_progress pointer"); if (NULL == op_failed) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL op_failed pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL op_failed pointer"); /* Wait for operations */ if (H5ES__wait(es, timeout, num_in_progress, op_failed) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTWAIT, FAIL, "can't wait on operations") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTWAIT, FAIL, "can't wait on operations"); } /* end if */ done: @@ -352,15 +352,15 @@ H5EScancel(hid_t es_id, size_t *num_not_canceled /*out*/, hbool_t *op_failed /*o /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (NULL == num_not_canceled) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL num_not_canceled pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL num_not_canceled pointer"); if (NULL == op_failed) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL op_failed pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL op_failed pointer"); /* Cancel operations */ if (H5ES__cancel(es, num_not_canceled, op_failed) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCANCEL, FAIL, "can't cancel operations") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCANCEL, FAIL, "can't cancel operations"); } /* end if */ done: @@ -392,7 +392,7 @@ H5ESget_err_status(hid_t es_id, hbool_t *err_status /*out*/) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); /* Retrieve the error flag, if non-NULL */ if (err_status) @@ -431,7 +431,7 @@ H5ESget_err_count(hid_t es_id, size_t *num_errs /*out*/) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); /* Retrieve the error flag, if non-NULL */ if (num_errs) { @@ -475,17 +475,17 @@ H5ESget_err_info(hid_t es_id, size_t num_err_info, H5ES_err_info_t err_info[] /* /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (0 == num_err_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "err_info array size is 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "err_info array size is 0"); if (NULL == err_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL err_info array pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL err_info array pointer"); if (NULL == num_cleared) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL errors cleared pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL errors cleared pointer"); /* Retrieve the error information */ if (H5ES__get_err_info(es, num_err_info, err_info, num_cleared) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't retrieve error info for failed operation(s)") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't retrieve error info for failed operation(s)"); } /* end if */ done: @@ -512,9 +512,9 @@ H5ESfree_err_info(size_t num_err_info, H5ES_err_info_t err_info[]) /* Check arguments */ if (0 == num_err_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "err_info array size is 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "err_info array size is 0"); if (NULL == err_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL err_info array pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL err_info array pointer"); /* Iterate over array, releasing error information */ for (u = 0; u < num_err_info; u++) { @@ -523,7 +523,7 @@ H5ESfree_err_info(size_t num_err_info, H5ES_err_info_t err_info[]) H5MM_xfree(err_info[u].app_file_name); H5MM_xfree(err_info[u].app_func_name); if (H5I_dec_app_ref(err_info[u].err_stack_id) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTDEC, FAIL, "can't close error stack for err_info #%zu", u) + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTDEC, FAIL, "can't close error stack for err_info #%zu", u); } /* end for */ done: @@ -559,9 +559,9 @@ H5ESregister_insert_func(hid_t es_id, H5ES_event_insert_func_t func, void *ctx) /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (NULL == func) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL function callback pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL function callback pointer"); /* Set the event set's insert callback */ es->ins_func = func; @@ -601,9 +601,9 @@ H5ESregister_complete_func(hid_t es_id, H5ES_event_complete_func_t func, void *c /* Check arguments */ if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid event set identifier"); if (NULL == func) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL function callback pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL function callback pointer"); /* Set the event set's completion callback */ es->comp_func = func; @@ -639,14 +639,14 @@ H5ESclose(hid_t es_id) if (H5ES_NONE != es_id) { /* Check arguments */ if (H5I_EVENTSET != H5I_get_type(es_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an event set") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an event set"); /* * Decrement the counter on the object. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(es_id) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTDEC, FAIL, "unable to decrement ref count on event set") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTDEC, FAIL, "unable to decrement ref count on event set"); } /* end if */ done: diff --git a/src/H5ESevent.c b/src/H5ESevent.c index b18ea58..3286424 100644 --- a/src/H5ESevent.c +++ b/src/H5ESevent.c @@ -95,12 +95,12 @@ H5ES__event_new(H5VL_t *connector, void *token) if (NULL == (request = H5VL_create_object(token, connector))) { if (H5VL_request_free(token) < 0) HDONE_ERROR(H5E_EVENTSET, H5E_CANTFREE, NULL, "can't free request"); - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINIT, NULL, "can't create vol object for request token") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINIT, NULL, "can't create vol object for request token"); } /* end if */ /* Allocate space for new event */ if (NULL == (ev = H5FL_CALLOC(H5ES_event_t))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, NULL, "can't allocate event object") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, NULL, "can't allocate event object"); /* Set request for event */ ev->request = request; @@ -142,11 +142,11 @@ H5ES__event_free(H5ES_event_t *ev) if (ev->request) { /* Free the request */ if (H5VL_request_free(ev->request) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTFREE, FAIL, "unable to free request") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTFREE, FAIL, "unable to free request"); /* Free the VOL object for the request */ if (H5VL_free_object(ev->request) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, FAIL, "can't free VOL request object") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, FAIL, "can't free VOL request object"); } /* end if */ H5FL_FREE(H5ES_event_t, ev); @@ -179,7 +179,7 @@ H5ES__event_completed(H5ES_event_t *ev, H5ES_event_list_t *el) /* Free the event */ if (H5ES__event_free(ev) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTFREE, FAIL, "unable to free event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTFREE, FAIL, "unable to free event"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ESint.c b/src/H5ESint.c index 6109b17..e148132 100644 --- a/src/H5ESint.c +++ b/src/H5ESint.c @@ -139,7 +139,7 @@ H5ES_init(void) /* Initialize the ID group for the event set IDs */ if (H5I_register_type(H5I_EVENTSET_CLS) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINIT, FAIL, "unable to initialize interface"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -217,7 +217,7 @@ H5ES__create(void) /* Allocate space for new event set */ if (NULL == (es = H5FL_CALLOC(H5ES_t))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, NULL, "can't allocate event set object") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, NULL, "can't allocate event set object"); /* Set the return value */ ret_value = es; @@ -254,7 +254,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app /* Create new event */ if (NULL == (ev = H5ES__event_new(connector, request_token))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, FAIL, "can't create event object") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCREATE, FAIL, "can't create event object"); /* Copy the app source information */ /* The 'app_func' & 'app_file' strings are statically allocated (by the compiler) @@ -279,7 +279,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app ev->op_info.api_name = caller; 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") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, FAIL, "can't copy API routine arguments"); /* Append fully initialized event onto the event set's 'active' list */ H5ES__list_append(&es->active, ev); @@ -288,7 +288,7 @@ H5ES__insert(H5ES_t *es, H5VL_t *connector, void *request_token, const char *app /* Invoke the event set's 'insert' callback, if present */ if (es->ins_func) if ((es->ins_func)(&ev->op_info, es->ins_ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'insert' callback for event set failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'insert' callback for event set failed"); done: /* Release resources on error */ @@ -335,11 +335,11 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con /* Get event set */ if (NULL == (es = (H5ES_t *)H5I_object_verify(es_id, H5I_EVENTSET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an event set") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an event set"); /* Check for errors in event set */ if (es->err_occurred) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations"); /* Start working on the API routines arguments */ va_start(ap, caller_args); @@ -355,19 +355,19 @@ H5ES_insert(hid_t es_id, H5VL_t *connector, void *token, const char *caller, con /* Create the string for the API routine's arguments */ if (NULL == (rs = H5RS_create(NULL))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, FAIL, "can't allocate ref-counted string") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, FAIL, "can't allocate ref-counted string"); /* Copy the string for the API routine's arguments */ /* (skip the six characters from the app's file, function and line # arguments) */ 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") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "can't create formatted API arguments"); if (NULL == (api_args = H5RS_get_str(rs))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't get pointer to formatted API arguments") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "can't get pointer to formatted API arguments"); /* Insert the operation into the event set */ if (H5ES__insert(es, connector, token, app_file, app_func, app_line, caller, api_args) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations"); done: /* Clean up */ @@ -402,7 +402,7 @@ H5ES__insert_request(H5ES_t *es, H5VL_t *connector, void *token) /* Insert an 'anonymous' operation into the event set */ if (H5ES__insert(es, connector, token, NULL, NULL, 0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTINSERT, FAIL, "event set has failed operations"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -476,7 +476,7 @@ H5ES__get_requests(H5ES_t *es, H5_iter_order_t order, hid_t *connector_ids, void /* Iterate over the events in the set */ if (H5ES__list_iterate(&es->active, order, H5ES__get_requests_cb, &ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -556,19 +556,19 @@ H5ES__op_complete(H5ES_t *es, H5ES_event_t *ev, H5VL_request_status_t ev_status) /* Retrieve the execution time info */ if (H5VL_request_specific(ev->request, &vol_cb_args) < 0) HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, - "unable to retrieve execution time info for operation") + "unable to retrieve execution time info for operation"); } else /* Translate status */ op_status = H5ES_STATUS_CANCELED; if ((es->comp_func)(&ev->op_info, op_status, H5I_INVALID_HID, es->comp_ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'complete' callback for event set failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'complete' callback for event set failed"); } /* end if */ /* Event success or cancellation */ if (H5ES__event_completed(ev, &es->active) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, FAIL, "unable to release completed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, FAIL, "unable to release completed event"); } /* end if */ else if (H5VL_REQUEST_STATUS_FAIL == ev_status) { /* Invoke the event set's 'complete' callback, if present */ @@ -579,21 +579,21 @@ H5ES__op_complete(H5ES_t *es, H5ES_event_t *ev, H5VL_request_status_t ev_status) /* Retrieve the error stack for the operation */ if (H5VL_request_specific(ev->request, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "unable to retrieve error stack for operation") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, FAIL, "unable to retrieve error stack for operation"); /* Set values */ err_stack_id = vol_cb_args.args.get_err_stack.err_stack_id; if ((es->comp_func)(&ev->op_info, H5ES_STATUS_FAIL, err_stack_id, es->comp_ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'complete' callback for event set failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_CALLBACK, FAIL, "'complete' callback for event set failed"); } /* end if */ /* Handle failure */ if (H5ES__handle_fail(es, ev) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "unable to handle failed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, FAIL, "unable to handle failed event"); } /* end else-if */ else - HGOTO_ERROR(H5E_EVENTSET, H5E_BADVALUE, FAIL, "unknown event status?!?") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADVALUE, FAIL, "unknown event status?!?"); done: /* Clean up */ @@ -632,7 +632,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx) if (ctx->timeout != H5ES_WAIT_NONE && ctx->timeout != H5ES_WAIT_FOREVER) start_time = H5_now_usec(); if (H5VL_request_wait(ev->request, ctx->timeout, &ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTWAIT, H5_ITER_ERROR, "unable to test operation") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTWAIT, H5_ITER_ERROR, "unable to test operation"); if (ctx->timeout != H5ES_WAIT_NONE && ctx->timeout != H5ES_WAIT_FOREVER) elapsed_time = H5_now_usec() - start_time; @@ -640,7 +640,7 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx) if (ev_status == H5VL_REQUEST_STATUS_FAIL) { /* Handle event completion */ if (H5ES__op_complete(ctx->es, ev, ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event"); /* Record the error */ *ctx->op_failed = TRUE; @@ -651,12 +651,12 @@ H5ES__wait_cb(H5ES_event_t *ev, void *_ctx) else if (ev_status == H5VL_REQUEST_STATUS_SUCCEED || ev_status == H5VL_REQUEST_STATUS_CANCELED) { /* Handle event completion */ if (H5ES__op_complete(ctx->es, ev, ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event"); } /* end else-if */ else if (ev_status == H5VL_REQUEST_STATUS_CANT_CANCEL) /* Should never get a status of 'can't cancel' back from test / wait operation */ HGOTO_ERROR(H5E_EVENTSET, H5E_BADVALUE, H5_ITER_ERROR, - "received \"can't cancel\" status for operation") + "received \"can't cancel\" status for operation"); else { /* Sanity check */ assert(ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS); @@ -714,7 +714,7 @@ H5ES__wait(H5ES_t *es, uint64_t timeout, size_t *num_in_progress, hbool_t *op_fa /* Iterate over the events in the set, waiting for them to complete */ if (H5ES__list_iterate(&es->active, H5_ITER_NATIVE, H5ES__wait_cb, &ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -744,13 +744,13 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx) /* Attempt to cancel the request */ if (H5VL_request_cancel(ev->request, &ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCANCEL, H5_ITER_ERROR, "unable to cancel operation") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTCANCEL, H5_ITER_ERROR, "unable to cancel operation"); /* Check for status values that indicate we should break out of the loop */ if (ev_status == H5VL_REQUEST_STATUS_FAIL) { /* Handle event completion */ if (H5ES__op_complete(ctx->es, ev, ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, H5_ITER_ERROR, "unable to handle failed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTSET, H5_ITER_ERROR, "unable to handle failed event"); /* Record the error */ *ctx->op_failed = TRUE; @@ -764,7 +764,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx) /* Handle event completion */ if (H5ES__op_complete(ctx->es, ev, ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event"); } /* end else-if */ else if (ev_status == H5VL_REQUEST_STATUS_CANT_CANCEL || ev_status == H5VL_REQUEST_STATUS_IN_PROGRESS) { /* Increment "not canceled" counter */ @@ -776,7 +776,7 @@ H5ES__cancel_cb(H5ES_event_t *ev, void *_ctx) /* Handle event completion */ if (H5ES__op_complete(ctx->es, ev, ev_status) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release completed event"); } /* end else */ done: @@ -816,7 +816,7 @@ H5ES__cancel(H5ES_t *es, size_t *num_not_canceled, hbool_t *op_failed) /* Iterate over the events in the set, attempting to cancel them */ if (H5ES__list_iterate(&es->active, H5_ITER_NATIVE, H5ES__cancel_cb, &ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -850,13 +850,13 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx) * here, when they are given back to the user. */ if (NULL == (ctx->curr_err_info->api_name = H5MM_xstrdup(ev->op_info.api_name))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 API routine name") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 API routine name"); if (NULL == (ctx->curr_err_info->api_args = H5MM_xstrdup(ev->op_info.api_args))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 API routine arguments") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 API routine arguments"); if (NULL == (ctx->curr_err_info->app_file_name = H5MM_xstrdup(ev->op_info.app_file_name))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 application file name") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 application file name"); if (NULL == (ctx->curr_err_info->app_func_name = H5MM_xstrdup(ev->op_info.app_func_name))) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 application function name") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTALLOC, H5_ITER_ERROR, "can't copy HDF5 application function name"); ctx->curr_err_info->app_line_num = ev->op_info.app_line_num; ctx->curr_err_info->op_ins_count = ev->op_info.op_ins_count; ctx->curr_err_info->op_ins_ts = ev->op_info.op_ins_ts; @@ -869,7 +869,7 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx) /* Get error stack for event */ if (H5VL_request_specific(ev->request, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, H5_ITER_ERROR, "unable to retrieve error stack for operation") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTGET, H5_ITER_ERROR, "unable to retrieve error stack for operation"); /* Set value */ ctx->curr_err_info->err_stack_id = vol_cb_args.args.get_err_stack.err_stack_id; @@ -879,7 +879,7 @@ H5ES__get_err_info_cb(H5ES_event_t *ev, void *_ctx) /* Free event node */ if (H5ES__event_free(ev) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release failed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release failed event"); /* Advance to next element of err_info[] array */ ctx->curr_err++; @@ -924,7 +924,7 @@ H5ES__get_err_info(H5ES_t *es, size_t num_err_info, H5ES_err_info_t err_info[], /* Iterate over the failed events in the set, copying their error info */ if (H5ES__list_iterate(&es->failed, H5_ITER_NATIVE, H5ES__get_err_info_cb, &ctx) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed"); /* Set # of failed events cleared from event set's failed list */ *num_cleared = ctx.curr_err; @@ -959,7 +959,7 @@ H5ES__close_failed_cb(H5ES_event_t *ev, void *_ctx) /* Free event node */ if (H5ES__event_free(ev) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release failed event") + HGOTO_ERROR(H5E_EVENTSET, H5E_CANTRELEASE, H5_ITER_ERROR, "unable to release failed event"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -988,11 +988,11 @@ H5ES__close(H5ES_t *es) if (H5ES__list_count(&es->active) > 0) HGOTO_ERROR( H5E_EVENTSET, H5E_CANTCLOSEOBJ, FAIL, - "can't close event set while unfinished operations are present (i.e. wait on event set first)") + "can't close event set while unfinished operations are present (i.e. wait on event set first)"); /* Iterate over the failed events in the set, releasing them */ if (H5ES__list_iterate(&es->failed, H5_ITER_NATIVE, H5ES__close_failed_cb, (void *)es) < 0) - HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_EVENTSET, H5E_BADITER, FAIL, "iteration failed"); /* Release the event set */ es = H5FL_FREE(H5ES_t, es); diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c index b3e86ae..bb2954e 100644 --- a/src/H5Edeprec.c +++ b/src/H5Edeprec.c @@ -90,13 +90,13 @@ H5Eget_major(H5E_major_t maj) /* Get the message object */ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID"); /* Get the size & type of the message's text */ if ((size = H5E__get_msg(msg, &type, NULL, (size_t)0)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text"); if (type != H5E_MAJOR) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one"); /* Application will free this */ size++; @@ -104,7 +104,7 @@ H5Eget_major(H5E_major_t maj) /* Get the text for the message */ if (H5E__get_msg(msg, NULL, msg_str, (size_t)size) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text"); ret_value = msg_str; @@ -139,13 +139,13 @@ H5Eget_minor(H5E_minor_t min) /* Get the message object */ if (NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID"); /* Get the size & type of the message's text */ if ((size = H5E__get_msg(msg, &type, NULL, (size_t)0)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text"); if (type != H5E_MINOR) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one"); /* Application will free this */ size++; @@ -153,7 +153,7 @@ H5Eget_minor(H5E_minor_t min) /* Get the text for the message */ if (H5E__get_msg(msg, NULL, msg_str, (size_t)size) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text"); ret_value = msg_str; @@ -192,7 +192,7 @@ H5Epush1(const char *file, const char *func, unsigned line, H5E_major_t maj, H5E /* Push the error on the default error stack */ if (H5E__push_stack(NULL, file, func, line, H5E_ERR_CLS_g, maj, min, str) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack"); done: FUNC_LEAVE_API(ret_value) @@ -219,7 +219,7 @@ H5Eclear1(void) /* Clear the default error stack */ if (H5E_clear_stack(NULL) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack"); done: FUNC_LEAVE_API(ret_value) @@ -250,11 +250,11 @@ H5Eprint1(FILE *stream) if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Print error stack */ if (H5E__print(estack, stream, TRUE) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack"); done: FUNC_LEAVE_API(ret_value) @@ -284,13 +284,13 @@ H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data) if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Walk the error stack */ walk_op.vers = 1; walk_op.u.func1 = func; if (H5E__walk(estack, direction, &walk_op, client_data) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack"); done: FUNC_LEAVE_API(ret_value) @@ -322,15 +322,15 @@ H5Eget_auto1(H5E_auto1_t *func /*out*/, void **client_data /*out*/) /* Retrieve default error stack */ if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Get the automatic error reporting information */ if (H5E__get_auto(estack, &auto_op, client_data) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info"); /* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto2 */ if (!auto_op.is_default && auto_op.vers == 2) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto2 has been called") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto2 has been called"); if (func) *func = auto_op.func1; @@ -372,11 +372,11 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data) if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Get the automatic error reporting information */ if (H5E__get_auto(estack, &auto_op, NULL) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info"); /* Set the automatic error reporting information */ auto_op.vers = 1; @@ -387,7 +387,7 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data) auto_op.func1 = func; if (H5E__set_auto(estack, &auto_op, client_data) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Eint.c b/src/H5Eint.c index 6dddb70..9db4e39 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -422,7 +422,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible) walk_op.vers = 1; walk_op.u.func1 = H5E__walk1_cb; if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack"); #else /* H5_NO_DEPRECATED_SYMBOLS */ assert(0 && "version 1 error stack print without deprecated symbols!"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -431,7 +431,7 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible) walk_op.vers = 2; walk_op.u.func2 = H5E__walk2_cb; if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack"); } /* end else */ done: @@ -785,11 +785,11 @@ H5E__clear_entries(H5E_t *estack, size_t nentries) /* Decrement the IDs to indicate that they are no longer used by this stack */ /* (In reverse order that they were incremented, so that reference counts work well) */ if (H5I_dec_ref(error->min_num) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message"); if (H5I_dec_ref(error->maj_num) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error message"); if (H5I_dec_ref(error->cls_id) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class") + HGOTO_ERROR(H5E_ERROR, H5E_CANTDEC, FAIL, "unable to decrement ref count on error class"); /* Release strings */ /* The 'func' & 'file' strings are statically allocated (by the compiler) @@ -829,13 +829,13 @@ H5E_clear_stack(H5E_t *estack) if (estack == NULL) if (NULL == (estack = H5E__get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */ - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack"); /* Empty the error stack */ 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") + HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -864,7 +864,7 @@ H5E__pop(H5E_t *estack, size_t count) /* Remove the entries from the error stack */ if (H5E__clear_entries(estack, count) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't remove errors from stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "can't remove errors from stack"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 0491439..9958002 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -68,10 +68,10 @@ typedef struct H5E_t H5E_t; * control branches to the `done' label. */ #define HGOTO_ERROR(maj, min, ret_val, ...) \ - { \ + do { \ HCOMMON_ERROR(maj, min, __VA_ARGS__); \ HGOTO_DONE(ret_val); \ - } + } while (0) /* * HGOTO_ERROR_TAG macro, used like HGOTO_ERROR between H5_BEGIN_TAG and diff --git a/src/H5F.c b/src/H5F.c index 19c134e..692331e 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -120,7 +120,7 @@ H5Fget_create_plist(hid_t file_id) /* check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_FCPL; @@ -128,7 +128,7 @@ H5Fget_create_plist(hid_t file_id) /* Retrieve the file creation property list */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, H5I_INVALID_HID, "unable to retrieve file creation properties"); /* Set return value */ ret_value = vol_cb_args.args.get_fcpl.fcpl_id; @@ -167,7 +167,7 @@ H5Fget_access_plist(hid_t file_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_FAPL; @@ -175,7 +175,7 @@ H5Fget_access_plist(hid_t file_id) /* Retrieve the file's access property list */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get file access property list"); /* Set return value */ ret_value = vol_cb_args.args.get_fapl.fapl_id; @@ -230,7 +230,7 @@ H5Fget_obj_count(hid_t file_id, unsigned types) /* Check arguments */ if (0 == (types & H5F_OBJ_ALL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type"); /* Perform the query */ /* If the 'special' ID wasn't passed in, just make a normal call to @@ -243,7 +243,7 @@ H5Fget_obj_count(hid_t file_id, unsigned types) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a file id") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a file id"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_OBJ_COUNT; @@ -252,7 +252,7 @@ H5Fget_obj_count(hid_t file_id, unsigned types) /* Get the count */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get object count in file(s)") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get object count in file(s)"); /* Set return value */ ret_value = (ssize_t)count; @@ -269,19 +269,19 @@ H5Fget_obj_count(hid_t file_id, unsigned types) if (types & H5F_OBJ_FILE) if (H5I_iterate(H5I_FILE, H5F__get_all_count_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed"); if (types & H5F_OBJ_DATASET) if (H5I_iterate(H5I_DATASET, H5F__get_all_count_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed"); if (types & H5F_OBJ_GROUP) if (H5I_iterate(H5I_GROUP, H5F__get_all_count_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed"); if (types & H5F_OBJ_DATATYPE) if (H5I_iterate(H5I_DATATYPE, H5F__get_all_count_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed"); if (types & H5F_OBJ_ATTR) if (H5I_iterate(H5I_ATTR, H5F__get_all_count_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed"); /* Set return value */ ret_value = (ssize_t)udata.obj_count; @@ -348,9 +348,9 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list / /* Check arguments */ if (0 == (types & H5F_OBJ_ALL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not an object type"); if (!oid_list) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "object ID list cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "object ID list cannot be NULL"); /* Perform the query */ /* If the 'special' ID wasn't passed in, just make a normal VOL call to @@ -363,7 +363,7 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list / /* get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_OBJ_IDS; @@ -374,7 +374,7 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list / /* Get the IDs */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get object ids in file(s)") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get object ids in file(s)"); /* Set return value */ ret_value = (ssize_t)count; @@ -396,19 +396,19 @@ H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *oid_list / if (types & H5F_OBJ_FILE) if (H5I_iterate(H5I_FILE, H5F__get_all_ids_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over file IDs failed"); if (types & H5F_OBJ_DATASET) if (H5I_iterate(H5I_DATASET, H5F__get_all_ids_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over dataset IDs failed"); if (types & H5F_OBJ_GROUP) if (H5I_iterate(H5I_GROUP, H5F__get_all_ids_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over group IDs failed"); if (types & H5F_OBJ_DATATYPE) if (H5I_iterate(H5I_DATATYPE, H5F__get_all_ids_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over datatype IDs failed"); if (types & H5F_OBJ_ATTR) if (H5I_iterate(H5I_ATTR, H5F__get_all_ids_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, (-1), "iteration over attribute IDs failed"); /* Set return value */ ret_value = (ssize_t)udata.obj_count; @@ -441,11 +441,11 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle /*out*/) /* Check args */ if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file handle pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file handle pointer"); /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.get_vfd_handle.fapl_id = fapl_id; @@ -455,7 +455,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle /*out*/) /* Retrieve the VFD handle for the file */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get VFD handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get VFD handle"); done: FUNC_LEAVE_API(ret_value) @@ -483,13 +483,13 @@ H5Fis_accessible(const char *filename, hid_t fapl_id) /* Check args */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified"); /* Check the file access property list */ if (H5P_DEFAULT == fapl_id) fapl_id = H5P_FILE_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_IS_ACCESSIBLE; @@ -499,7 +499,7 @@ H5Fis_accessible(const char *filename, hid_t fapl_id) /* Check if file is accessible */ if (H5VL_file_specific(NULL, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5"); /* Set return value */ ret_value = (htri_t)is_accessible; @@ -528,7 +528,7 @@ H5F__post_open_api_common(H5VL_object_t *vol_obj, void **token_ptr) /* Check for 'post open' callback */ supported = 0; if (H5VL_introspect_opt_query(vol_obj, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't check for 'post open' operation") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't check for 'post open' operation"); if (supported & H5VL_OPT_QUERY_SUPPORTED) { H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */ @@ -538,7 +538,7 @@ H5F__post_open_api_common(H5VL_object_t *vol_obj, void **token_ptr) /* Make the 'post open' callback */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to make file 'post open' callback") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to make file 'post open' callback"); } /* end if */ done: @@ -566,39 +566,39 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_ /* Check/fix arguments */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name"); /* In this routine, we only accept the following flags: * H5F_ACC_EXCL, H5F_ACC_TRUNC and H5F_ACC_SWMR_WRITE */ if (flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid flags"); /* The H5F_ACC_EXCL and H5F_ACC_TRUNC flags are mutually exclusive */ if ((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "mutually exclusive flags for file creation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "mutually exclusive flags for file creation"); /* Check file creation property list */ if (H5P_DEFAULT == fcpl_id) fcpl_id = H5P_FILE_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file create property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not file create property list"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info"); /* Stash a copy of the "top-level" connector property, before any pass-through * connectors modify or unwrap it. */ if (H5CX_set_vol_connector_prop(&connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector info in API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector info in API context"); /* Adjust bit flags by turning on the creation bit and making sure that * the EXCL or TRUNC bit is set. All newly-created files are opened for @@ -611,11 +611,11 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_ /* Create a new file or truncate an existing file through the VOL */ if (NULL == (new_file = H5VL_file_create(&connector_prop, filename, flags, fcpl_id, fapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file"); /* Get an ID for the file */ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -657,15 +657,15 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Create the file synchronously */ if ((ret_value = H5F__create_api_common(filename, flags, fcpl_id, fapl_id, NULL)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier"); /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); done: FUNC_LEAVE_API(ret_value) @@ -700,11 +700,11 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c /* Create the file, possibly asynchronously */ if ((ret_value = H5F__create_api_common(filename, flags, fcpl_id, fapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -714,7 +714,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID"); - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ /* Reset token for 'post open' operation */ @@ -723,7 +723,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -731,7 +731,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE8(__func__, "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -760,44 +760,44 @@ H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void * /* Check arguments */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file name"); /* Reject undefined flags (~H5F_ACC_PUBLIC_FLAGS) and the H5F_ACC_TRUNC & H5F_ACC_EXCL flags */ if ((flags & ~H5F_ACC_PUBLIC_FLAGS) || (flags & H5F_ACC_TRUNC) || (flags & H5F_ACC_EXCL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags"); /* XXX (VOL MERGE): Might want to move SWMR flag checks to H5F_open() */ /* Asking for SWMR write access on a read-only file is invalid */ if ((flags & H5F_ACC_SWMR_WRITE) && 0 == (flags & H5F_ACC_RDWR)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, - "SWMR write access on a file open for read-only access is not allowed") + "SWMR write access on a file open for read-only access is not allowed"); /* Asking for SWMR read access on a non-read-only file is invalid */ if ((flags & H5F_ACC_SWMR_READ) && (flags & H5F_ACC_RDWR)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, - "SWMR read access on a file open for read-write access is not allowed") + "SWMR read access on a file open for read-write access is not allowed"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info"); /* Stash a copy of the "top-level" connector property, before any pass-through * connectors modify or unwrap it. */ if (H5CX_set_vol_connector_prop(&connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector info in API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector info in API context"); /* Open the file through the VOL layer */ if (NULL == (new_file = H5VL_file_open(&connector_prop, filename, flags, fapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file"); /* Get an ID for the file */ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -833,15 +833,15 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) /* Open the file synchronously */ if ((ret_value = H5F__open_api_common(filename, flags, fapl_id, NULL)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to synchronously open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to synchronously open file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier"); /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); done: FUNC_LEAVE_API(ret_value) @@ -877,11 +877,11 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con /* Open the file, possibly asynchronously */ if ((ret_value = H5F__open_api_common(filename, flags, fapl_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to asynchronously open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to asynchronously open file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, H5I_INVALID_HID, "invalid object identifier"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -891,7 +891,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID"); - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ /* Reset token for 'post open' operation */ @@ -900,7 +900,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -908,7 +908,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -939,11 +939,11 @@ H5F__flush_api_common(hid_t object_id, H5F_scope_t scope, void **token_ptr, H5VL obj_type = H5I_get_type(object_id); if (H5I_FILE != obj_type && H5I_GROUP != obj_type && H5I_DATATYPE != obj_type && H5I_DATASET != obj_type && H5I_ATTR != obj_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Get the file object */ if (NULL == (*vol_obj_ptr = H5VL_vol_object(object_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_FLUSH; @@ -952,7 +952,7 @@ H5F__flush_api_common(hid_t object_id, H5F_scope_t scope, void **token_ptr, H5VL /* Flush the object */ if (H5VL_file_specific(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -979,7 +979,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) /* Flush the file synchronously */ if (H5F__flush_api_common(object_id, scope, NULL, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to synchronously flush file") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to synchronously flush file"); done: FUNC_LEAVE_API(ret_value) @@ -1013,7 +1013,7 @@ H5Fflush_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Flush the file asynchronously */ if (H5F__flush_api_common(object_id, scope, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to asynchronously flush file") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to asynchronously flush file"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1021,7 +1021,7 @@ H5Fflush_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE6(__func__, "*s*sIuiFsi", app_file, app_func, app_line, object_id, scope, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1051,13 +1051,13 @@ H5Fclose(hid_t file_id) /* Check arguments */ if (H5I_FILE != H5I_get_type(file_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID"); /* Synchronously decrement reference count on ID. * When it reaches zero the file will be closed. */ if (H5I_dec_app_ref(file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed"); done: FUNC_LEAVE_API(ret_value) @@ -1086,13 +1086,13 @@ H5Fclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check arguments */ if (H5I_FILE != H5I_get_type(file_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file ID"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { /* Get file object's connector */ if (NULL == (vol_obj = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL object for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL object for file"); /* Increase connector's refcount, so it doesn't get closed if closing * this file ID closes the file */ @@ -1107,7 +1107,7 @@ H5Fclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * When it reaches zero the file will be closed. */ if (H5I_dec_app_ref_async(file_id, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1115,7 +1115,7 @@ H5Fclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -1147,23 +1147,23 @@ H5Fdelete(const char *filename, hid_t fapl_id) /* Check args */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(fapl_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info"); /* Stash a copy of the "top-level" connector property, before any pass-through * connectors modify or unwrap it. */ if (H5CX_set_vol_connector_prop(&connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set VOL connector info in API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set VOL connector info in API context"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_IS_ACCESSIBLE; @@ -1173,9 +1173,9 @@ H5Fdelete(const char *filename, hid_t fapl_id) /* Make sure this is HDF5 storage for this VOL connector */ if (H5VL_file_specific(NULL, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to determine if file is accessible as HDF5"); if (!is_accessible) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "not an HDF5 file") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "not an HDF5 file"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_DELETE; @@ -1184,7 +1184,7 @@ H5Fdelete(const char *filename, hid_t fapl_id) /* Delete the file */ if (H5VL_file_specific(NULL, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "unable to delete the file") + HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "unable to delete the file"); done: FUNC_LEAVE_API(ret_value) @@ -1217,21 +1217,21 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id) /* Check arguments */ loc_type = H5I_get_type(loc_id); if (H5I_FILE != loc_type && H5I_GROUP != loc_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID"); if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string"); if (H5I_FILE != H5I_get_type(child_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "child_id parameter not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "child_id parameter not a file ID"); if (H5P_DEFAULT == plist_id) plist_id = H5P_FILE_MOUNT_DEFAULT; else if (TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "plist_id is not a file mount property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "plist_id is not a file mount property list ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Get the location object */ /* Need to open the root group of a file, if a file ID was given as the @@ -1243,7 +1243,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1252,28 +1252,29 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id) /* Open the root group object */ if (NULL == (grp = H5VL_group_open(vol_obj, &loc_params, "/", H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, NULL))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open group"); /* Create a VOL object for the root group */ if (NULL == (loc_vol_obj = H5VL_create_object(grp, vol_obj->connector))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group"); } /* end if */ else { 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object"); } /* end else */ /* Get the child object */ if (NULL == (child_vol_obj = (H5VL_object_t *)H5I_object(child_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get child object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get child object"); /* Check if both objects are associated with the same VOL connector */ if (H5VL_cmp_connector_cls(&same_connector, loc_vol_obj->connector->cls, child_vol_obj->connector->cls) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); if (same_connector) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't mount file onto object from different VOL connector") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "can't mount file onto object from different VOL connector"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_GROUP_MOUNT; @@ -1287,7 +1288,7 @@ H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id) * the 'mount' operation, instead of mixing files and groups) */ if (H5VL_group_specific(loc_vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file"); done: /* Clean up if we temporarily opened the root group for a file */ @@ -1333,15 +1334,15 @@ H5Funmount(hid_t loc_id, const char *name) /* Check arguments */ loc_type = H5I_get_type(loc_id); if (H5I_FILE != loc_type && H5I_GROUP != loc_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID"); if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Get the location object */ /* Need to open the root group of a file, if a file ID was given as the @@ -1353,7 +1354,7 @@ H5Funmount(hid_t loc_id, const char *name) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1362,16 +1363,16 @@ H5Funmount(hid_t loc_id, const char *name) /* Open the root group object */ if (NULL == (grp = H5VL_group_open(vol_obj, &loc_params, "/", H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, NULL))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open group"); /* Create a VOL object for the root group */ if (NULL == (loc_vol_obj = H5VL_create_object(grp, vol_obj->connector))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "can't create VOL object for root group"); } /* end if */ else { 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object"); } /* end else */ /* Set up VOL callback arguments */ @@ -1383,7 +1384,7 @@ H5Funmount(hid_t loc_id, const char *name) * the 'unmount' operation, instead of mixing files and groups) */ if (H5VL_group_specific(loc_vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file"); done: /* Clean up if we temporarily opened the root group for a file */ @@ -1421,7 +1422,7 @@ H5F__reopen_api_common(hid_t file_id, void **token_ptr) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_REOPEN; @@ -1429,15 +1430,15 @@ H5F__reopen_api_common(hid_t file_id, void **token_ptr) /* Reopen the file */ if (H5VL_file_specific(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file via the VOL connector") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file via the VOL connector"); /* Make sure that worked */ if (NULL == reopen_file) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to reopen file"); /* Get an ID for the file */ if ((ret_value = H5VL_register(H5I_FILE, reopen_file, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1469,15 +1470,15 @@ H5Freopen(hid_t file_id) /* Reopen the file synchronously */ if ((ret_value = H5F__reopen_api_common(file_id, NULL)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to synchronously reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to synchronously reopen file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get handle for re-opened file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get handle for re-opened file"); /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); done: /* XXX (VOL MERGE): If registration fails, file will not be closed */ @@ -1513,11 +1514,11 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h /* Reopen the file, possibly asynchronously */ if ((ret_value = H5F__reopen_api_common(file_id, token_ptr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to asynchronously reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to asynchronously reopen file"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get handle for re-opened file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get handle for re-opened file"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1527,7 +1528,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID"); - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ /* Reset token for 'post open' operation */ @@ -1536,7 +1537,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h /* Perform 'post open' operation */ if (H5F__post_open_api_common(vol_obj, token_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "'post open' operation failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1544,7 +1545,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1575,7 +1576,7 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags /*out*/) /* Get the internal file structure */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_INTENT; @@ -1583,7 +1584,7 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags /*out*/) /* Get the flags */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's intent flags") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's intent flags"); } /* end if */ done: @@ -1615,7 +1616,7 @@ H5Fget_fileno(hid_t file_id, unsigned long *fnumber /*out*/) /* Get the internal file structure */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_FILENO; @@ -1623,7 +1624,7 @@ H5Fget_fileno(hid_t file_id, unsigned long *fnumber /*out*/) /* Get the 'file number' */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's 'file number'") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file's 'file number'"); } /* end if */ done: @@ -1653,7 +1654,7 @@ H5Fget_freespace(hid_t file_id) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.get_freespace.size = &file_freespace; @@ -1662,7 +1663,7 @@ H5Fget_freespace(hid_t file_id) /* Get the amount of free space in the file */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free space") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free space"); /* Set return value */ ret_value = (hssize_t)file_freespace; @@ -1695,9 +1696,9 @@ H5Fget_filesize(hid_t file_id, hsize_t *size /*out*/) /* Check args */ if (!size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size parameter cannot be NULL"); if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_size.size = size; @@ -1706,7 +1707,7 @@ H5Fget_filesize(hid_t file_id, hsize_t *size /*out*/) /* Get the file size */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); done: FUNC_LEAVE_API(ret_value) @@ -1763,7 +1764,7 @@ H5Fget_file_image(hid_t file_id, void *buf /*out*/, size_t buf_len) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_file_image.buf_size = buf_len; @@ -1774,7 +1775,7 @@ H5Fget_file_image(hid_t file_id, void *buf /*out*/, size_t buf_len) /* Get the file image */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file image") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file image"); /* Set return value */ ret_value = (ssize_t)image_len; @@ -1810,11 +1811,11 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config /*out*/) /* Check args */ if ((NULL == config) || (config->version != H5AC__CURR_CACHE_CONFIG_VERSION)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config ptr") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config ptr"); /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.get_mdc_config.config = config; @@ -1823,7 +1824,7 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config /*out*/) /* Get the metadata cache configuration */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache configuration") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache configuration"); done: FUNC_LEAVE_API(ret_value) @@ -1853,7 +1854,7 @@ H5Fset_mdc_config(hid_t file_id, const H5AC_cache_config_t *config_ptr) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.set_mdc_config.config = config_ptr; @@ -1862,7 +1863,7 @@ H5Fset_mdc_config(hid_t file_id, const H5AC_cache_config_t *config_ptr) /* Set the metadata cache configuration */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set metadata cache configuration") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set metadata cache configuration"); done: FUNC_LEAVE_API(ret_value) @@ -1893,9 +1894,9 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate /*out*/) /* Check args */ if (NULL == hit_rate) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL hit rate pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL hit rate pointer"); if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_mdc_hit_rate.hit_rate = hit_rate; @@ -1904,7 +1905,7 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate /*out*/) /* Get the current hit rate */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC hit rate") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC hit rate"); done: FUNC_LEAVE_API(ret_value) @@ -1938,7 +1939,7 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size /*out*/, size_t *min_clean_size /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_mdc_size.max_size = max_size; @@ -1950,7 +1951,7 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size /*out*/, size_t *min_clean_size /* Get the size data */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC size"); /* Set mis-matched return value */ if (cur_num_entries) @@ -1988,7 +1989,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE; @@ -1996,7 +1997,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id) /* Reset the hit rate statistic */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate"); done: FUNC_LEAVE_API(ret_value) @@ -2037,11 +2038,11 @@ H5Fget_name(hid_t obj_id, char *name /*out*/, size_t size) type = H5I_get_type(obj_id); if (H5I_FILE != type && H5I_GROUP != type && H5I_DATATYPE != type && H5I_DATASET != type && H5I_ATTR != type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a file or file object"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_NAME; @@ -2052,7 +2053,7 @@ H5Fget_name(hid_t obj_id, char *name /*out*/, size_t size) /* Get the filename via the VOL */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file name") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file name"); /* Set the return value */ ret_value = (ssize_t)file_name_len; @@ -2088,17 +2089,17 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo /*out*/) /* Check args */ if (!finfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file info pointer can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file info pointer can't be NULL"); /* Check the type */ type = H5I_get_type(obj_id); if (H5I_FILE != type && H5I_GROUP != type && H5I_DATATYPE != type && H5I_DATASET != type && H5I_ATTR != type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ file_opt_args.get_info.type = type; @@ -2108,7 +2109,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo /*out*/) /* Get the file information */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info"); done: FUNC_LEAVE_API(ret_value) @@ -2137,11 +2138,11 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info /*out*/) /* Check args */ if (!info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); /* Get the file pointer */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_metadata_read_retry_info.info = info; @@ -2150,7 +2151,7 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info /*out*/) /* Get the retry info */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata read retry info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata read retry info"); done: FUNC_LEAVE_API(ret_value) @@ -2182,9 +2183,9 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier"); if (sect_info && nsects == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "nsects must be > 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "nsects must be > 0"); /* Set up VOL callback arguments */ file_opt_args.get_free_sections.type = type; @@ -2196,7 +2197,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info /* Get the free-space section information in the file */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free sections") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free sections"); /* Set return value */ ret_value = (ssize_t)sect_count; @@ -2228,7 +2229,7 @@ H5Fclear_elink_file_cache(hid_t file_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE; @@ -2236,7 +2237,7 @@ H5Fclear_elink_file_cache(hid_t file_id) /* Release the EFC */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache"); done: FUNC_LEAVE_API(ret_value) @@ -2288,11 +2289,11 @@ H5Fstart_swmr_write(hid_t file_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_START_SWMR_WRITE; @@ -2300,7 +2301,7 @@ H5Fstart_swmr_write(hid_t file_id) /* Start SWMR writing */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "unable to start SWMR writing") + HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "unable to start SWMR writing"); done: FUNC_LEAVE_API(ret_value) @@ -2328,7 +2329,7 @@ H5Fstart_mdc_logging(hid_t file_id) /* Sanity check */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_START_MDC_LOGGING; @@ -2336,7 +2337,7 @@ H5Fstart_mdc_logging(hid_t file_id) /* Call mdc logging function */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to start mdc logging") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to start mdc logging"); done: FUNC_LEAVE_API(ret_value) @@ -2365,7 +2366,7 @@ H5Fstop_mdc_logging(hid_t file_id) /* Sanity check */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_STOP_MDC_LOGGING; @@ -2373,7 +2374,7 @@ H5Fstop_mdc_logging(hid_t file_id) /* Call mdc logging function */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to stop mdc logging") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to stop mdc logging"); done: FUNC_LEAVE_API(ret_value) @@ -2403,7 +2404,7 @@ H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled /*out*/, hbool_t *i /* Sanity check */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_mdc_logging_status.is_enabled = is_enabled; @@ -2413,7 +2414,7 @@ H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled /*out*/, hbool_t *i /* Call mdc logging function */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to get logging status") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to get logging status"); done: FUNC_LEAVE_API(ret_value) @@ -2444,11 +2445,11 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ file_opt_args.set_libver_bounds.low = low; @@ -2458,7 +2459,7 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high) /* Set the library's version bounds */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds"); done: FUNC_LEAVE_API(ret_value) @@ -2487,11 +2488,11 @@ H5Fformat_convert(hid_t file_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "file_id parameter is not a valid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "file_id parameter is not a valid file identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_FORMAT_CONVERT; @@ -2499,7 +2500,7 @@ H5Fformat_convert(hid_t file_id) /* Convert the format */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format") + HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format"); done: FUNC_LEAVE_API(ret_value) @@ -2526,7 +2527,7 @@ H5Freset_page_buffering_stats(hid_t file_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS; @@ -2534,7 +2535,7 @@ H5Freset_page_buffering_stats(hid_t file_id) /* Reset the statistics */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset stats for page buffering") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset stats for page buffering"); done: FUNC_LEAVE_API(ret_value) @@ -2564,9 +2565,9 @@ H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2] /*out*/, unsigne /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID"); if (NULL == accesses || NULL == hits || NULL == misses || NULL == evictions || NULL == bypasses) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL input parameters for stats") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL input parameters for stats"); /* Set up VOL callback arguments */ file_opt_args.get_page_buffering_stats.accesses = accesses; @@ -2579,7 +2580,7 @@ H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2] /*out*/, unsigne /* Get the statistics */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering"); done: FUNC_LEAVE_API(ret_value) @@ -2611,7 +2612,7 @@ H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr /*out*/, hsize_t *image /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up VOL callback arguments */ file_opt_args.get_mdc_image_info.addr = image_addr; @@ -2621,7 +2622,7 @@ H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr /*out*/, hsize_t *image /* Go get the address and size of the cache image */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info"); done: FUNC_LEAVE_API(ret_value) @@ -2649,7 +2650,7 @@ H5Fget_eoa(hid_t file_id, haddr_t *eoa /*out*/) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Only do work if valid pointer to fill in */ if (eoa) { @@ -2663,7 +2664,7 @@ H5Fget_eoa(hid_t file_id, haddr_t *eoa /*out*/) /* Retrieve the EOA for the file */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get EOA") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get EOA"); } /* end if */ done: @@ -2692,7 +2693,7 @@ H5Fincrement_filesize(hid_t file_id, hsize_t increment) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID"); /* Set up VOL callback arguments */ file_opt_args.increment_filesize.increment = increment; @@ -2701,7 +2702,7 @@ H5Fincrement_filesize(hid_t file_id, hsize_t increment) /* Increment the file size */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to increment file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to increment file size"); done: FUNC_LEAVE_API(ret_value) @@ -2730,9 +2731,9 @@ H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize /*out*/) /* Check args */ if (NULL == minimize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "out pointer 'minimize' cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "out pointer 'minimize' cannot be NULL"); if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.get_min_dset_ohdr_flag.minimize = minimize; @@ -2741,7 +2742,7 @@ H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize /*out*/) /* Get the dataset object header minimum size flag */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag"); done: FUNC_LEAVE_API(ret_value) @@ -2770,7 +2771,7 @@ H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Set up VOL callback arguments */ file_opt_args.set_min_dset_ohdr_flag.minimize = minimize; @@ -2779,7 +2780,7 @@ H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize) /* Set the 'minimize dataset object headers flag' */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file's dataset header minimization flag"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5FA.c b/src/H5FA.c index 26895b1..cf4a1d9 100644 --- a/src/H5FA.c +++ b/src/H5FA.c @@ -111,25 +111,25 @@ H5FA__new(H5F_t *f, haddr_t fa_addr, hbool_t from_open, void *ctx_udata) /* Allocate fixed array wrapper */ if (NULL == (fa = H5FL_CALLOC(H5FA_t))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array info") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array info"); /* Lock the array header into memory */ if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to load fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to load fixed array header"); /* Check for pending array deletion */ if (from_open && hdr->pending_delete) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTOPENOBJ, NULL, "can't open fixed array pending deletion") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTOPENOBJ, NULL, "can't open fixed array pending deletion"); /* Point fixed array wrapper at header and bump it's ref count */ fa->hdr = hdr; if (H5FA__hdr_incr(fa->hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); /* Increment # of files using this array header */ if (H5FA__hdr_fuse_incr(fa->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, - "can't increment file reference count on shared array header") + "can't increment file reference count on shared array header"); /* Set file pointer for this array open context */ fa->f = f; @@ -175,12 +175,12 @@ H5FA_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata) /* Create fixed array header */ if (HADDR_UNDEF == (fa_addr = H5FA__hdr_create(f, cparam, ctx_udata))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "can't create fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "can't create fixed array header"); /* Allocate and initialize new fixed array wrapper */ if (NULL == (fa = H5FA__new(f, fa_addr, FALSE, ctx_udata))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, - "allocation and/or initialization failed for fixed array wrapper") + "allocation and/or initialization failed for fixed array wrapper"); /* Set the return value */ ret_value = fa; @@ -218,7 +218,7 @@ H5FA_open(H5F_t *f, haddr_t fa_addr, void *ctx_udata) /* Allocate and initialize new fixed array wrapper */ if (NULL == (fa = H5FA__new(f, fa_addr, TRUE, ctx_udata))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, - "allocation and/or initialization failed for fixed array wrapper") + "allocation and/or initialization failed for fixed array wrapper"); /* Set the return value */ ret_value = fa; @@ -315,7 +315,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt) /* Create the data block */ hdr->dblk_addr = H5FA__dblock_create(hdr, &hdr_dirty); if (!H5_addr_defined(hdr->dblk_addr)) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create fixed array data block"); } assert(idx < hdr->cparam.nelmts); @@ -324,7 +324,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt) if (NULL == (dblock = H5FA__dblock_protect(hdr, hdr->dblk_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array data block, address = %llu", - (unsigned long long)hdr->dblk_addr) + (unsigned long long)hdr->dblk_addr); /* Check for paging data block */ if (!dblock->npages) { @@ -357,7 +357,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt) if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) { /* Create the data block page */ if (H5FA__dblk_page_create(hdr, dblk_page_addr, dblk_page_nelmts) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, "unable to create data block page"); /* Mark data block page as initialized in data block */ H5VM_bit_set(dblock->dblk_page_init, page_idx, TRUE); @@ -369,7 +369,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt) (dblk_page = H5FA__dblk_page_protect(hdr, dblk_page_addr, dblk_page_nelmts, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Set the element in the data block page */ H5MM_memcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt, @@ -422,7 +422,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt) if (!H5_addr_defined(hdr->dblk_addr)) { /* Call the class's 'fill' callback */ if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value"); } /* end if */ else { /* Get the data block */ @@ -430,7 +430,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt) 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", - (unsigned long long)hdr->dblk_addr) + (unsigned long long)hdr->dblk_addr); /* Check for paged data block */ if (!dblock->npages) @@ -447,7 +447,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt) if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) { /* Call the class's 'fill' callback */ if ((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "can't set element to class's fill value"); /* We've retrieved the value, leave now */ HGOTO_DONE(SUCCEED); @@ -475,7 +475,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt) H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Retrieve element from data block */ H5MM_memcpy(elmt, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), @@ -545,7 +545,7 @@ H5FA_close(H5FA_t *fa) /* Check the header's status in the metadata cache */ if (H5AC_get_entry_status(fa->f, fa_addr, &hdr_status) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, - "unable to check metadata cache status for fixed array header") + "unable to check metadata cache status for fixed array header"); /* Sanity checks on header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -557,7 +557,7 @@ H5FA_close(H5FA_t *fa) /* Lock the array header into memory */ /* (OK to pass in NULL for callback context, since we know the header must be in the cache) */ if (NULL == (hdr = H5FA__hdr_protect(fa->f, fa_addr, NULL, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTLOAD, FAIL, "unable to load fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTLOAD, FAIL, "unable to load fixed array header"); /* Set the shared array header's file context for this operation */ hdr->f = fa->f; @@ -568,11 +568,11 @@ H5FA_close(H5FA_t *fa) */ if (H5FA__hdr_decr(fa->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); /* Delete array, starting with header (unprotects header) */ if (H5FA__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array"); } /* end if */ else { /* Decrement the reference count on the array header */ @@ -581,7 +581,7 @@ H5FA_close(H5FA_t *fa) */ if (H5FA__hdr_decr(fa->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); } /* end else */ } /* end if */ @@ -616,7 +616,7 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata) /* Lock the array header into memory */ if (NULL == (hdr = H5FA__hdr_protect(f, fa_addr, ctx_udata, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array header, address = %llu", - (unsigned long long)fa_addr) + (unsigned long long)fa_addr); /* Check for files using shared array header */ if (hdr->file_rc) @@ -627,7 +627,7 @@ H5FA_delete(H5F_t *f, haddr_t fa_addr, void *ctx_udata) /* Delete array now, starting with header (unprotects header) */ if (H5FA__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array"); hdr = NULL; } @@ -668,13 +668,13 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata) /* Allocate space for a native array element */ if (NULL == (elmt = H5FL_BLK_MALLOC(fa_native_elmt, fa->hdr->cparam.cls->nat_elmt_size))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, H5_ITER_ERROR, - "memory allocation failed for fixed array element") + "memory allocation failed for fixed array element"); /* Iterate over all elements in array */ for (u = 0; u < fa->hdr->stats.nelmts && ret_value == H5_ITER_CONT; u++) { /* Get array element */ if (H5FA_get(fa, u, elmt) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, H5_ITER_ERROR, "unable to delete fixed array"); /* Invoke callback */ if ((ret_value = (*op)(u, elmt, udata)) < 0) { @@ -727,7 +727,7 @@ H5FA_depend(H5FA_t *fa, H5AC_proxy_entry_t *parent) /* Add the fixed array as a child of the parent (proxy) */ if (H5AC_proxy_entry_add_child(parent, hdr->f, hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "unable to add fixed array as child of proxy") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, "unable to add fixed array as child of proxy"); hdr->parent = parent; } diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 18c83cf..d614360 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -242,24 +242,25 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len /* Allocate space for the fixed array data structure */ if (NULL == (hdr = H5FA__hdr_alloc(udata->f))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array shared header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, + "memory allocation failed for fixed array shared header"); /* Set the fixed array header's address */ hdr->addr = udata->addr; /* Magic number */ if (memcmp(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header signature") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5FA_HDR_VERSION) - HGOTO_ERROR(H5E_FARRAY, H5E_VERSION, NULL, "wrong fixed array header version") + HGOTO_ERROR(H5E_FARRAY, H5E_VERSION, NULL, "wrong fixed array header version"); /* Fixed array class */ id = (H5FA_cls_id_t)*image++; if (id >= H5FA_NUM_CLS_ID) - HGOTO_ERROR(H5E_FARRAY, H5E_BADTYPE, NULL, "incorrect fixed array class") + HGOTO_ERROR(H5E_FARRAY, H5E_BADTYPE, NULL, "incorrect fixed array class"); hdr->cparam.cls = H5FA_client_class_g[id]; /* General array creation/configuration information */ @@ -307,7 +308,7 @@ H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED 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") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, NULL, "initialization failed for fixed array header"); assert(hdr->size == len); /* Set return value */ @@ -454,7 +455,7 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child((H5AC_proxy_entry_t *)hdr->parent, (void *)hdr->top_proxy) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between fixed array and proxy") + "unable to destroy flush dependency between fixed array and proxy"); hdr->parent = NULL; } /* end if */ @@ -463,14 +464,14 @@ H5FA__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(hdr->top_proxy, hdr) < 0) HGOTO_ERROR( H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency between header and fixed array 'top' proxy") + "unable to destroy flush dependency between header and fixed array 'top' proxy"); /* Don't reset hdr->top_proxy here, it's destroyed when the header is freed -QAK */ } /* end if */ break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -506,7 +507,7 @@ H5FA__cache_hdr_free_icr(void *thing) /* Release the extensible array header */ if (H5FA__hdr_dest((H5FA_hdr_t *)thing) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -623,7 +624,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* 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") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array data block"); assert(((!dblock->npages) && (len == (size_t)H5FA_DBLOCK_SIZE(dblock))) || (len == (size_t)H5FA_DBLOCK_PREFIX_SIZE(dblock))); @@ -633,21 +634,21 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Magic number */ 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") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array data block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5FA_DBLOCK_VERSION) - HGOTO_ERROR(H5E_FARRAY, H5E_VERSION, NULL, "wrong fixed array data block version") + HGOTO_ERROR(H5E_FARRAY, H5E_VERSION, NULL, "wrong fixed array data block version"); /* Fixed array type */ if (*image++ != (uint8_t)udata->hdr->cparam.cls->id) - HGOTO_ERROR(H5E_FARRAY, H5E_BADTYPE, NULL, "incorrect fixed array class") + HGOTO_ERROR(H5E_FARRAY, H5E_BADTYPE, NULL, "incorrect fixed array class"); /* Address of header for array that owns this block (just for file integrity checks) */ H5F_addr_decode(udata->hdr->f, &image, &arr_addr); if (H5_addr_ne(arr_addr, udata->hdr->addr)) - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header address") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, NULL, "wrong fixed array header address"); /* Page initialization flags */ if (dblock->npages > 0) { @@ -661,7 +662,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Convert from raw elements on disk into native elements in memory */ if ((udata->hdr->cparam.cls->decode)(image, dblock->elmts, (size_t)udata->hdr->cparam.nelmts, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDECODE, NULL, "can't decode fixed array data elements") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDECODE, NULL, "can't decode fixed array data elements"); image += (udata->hdr->cparam.nelmts * udata->hdr->cparam.raw_elmt_size); } @@ -775,7 +776,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED H5_CHECK_OVERFLOW(dblock->hdr->cparam.nelmts, /* From: */ hsize_t, /* To: */ size_t); if ((dblock->hdr->cparam.cls->encode)(image, dblock->elmts, (size_t)dblock->hdr->cparam.nelmts, dblock->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTENCODE, FAIL, "can't encode fixed array data elements") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTENCODE, FAIL, "can't encode fixed array data elements"); image += (dblock->hdr->cparam.nelmts * dblock->hdr->cparam.raw_elmt_size); } @@ -823,7 +824,7 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_FARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block and header, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -838,21 +839,21 @@ H5FA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if (H5FA__destroy_flush_depend((H5AC_info_t *)dblock->hdr, (H5AC_info_t *)dblock) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); /* Detach from 'top' proxy for fixed array */ if (dblock->top_proxy) { if (H5AC_proxy_entry_remove_child(dblock->top_proxy, dblock) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block " - "and fixed array 'top' proxy") + "and fixed array 'top' proxy"); dblock->top_proxy = NULL; } break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else assert(0 && "Unknown action?!?"); #endif @@ -886,7 +887,7 @@ H5FA__cache_dblock_free_icr(void *_thing) /* Release the fixed array data block */ if (H5FA__dblock_dest(dblock) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array data block") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array data block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1027,7 +1028,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, /* Allocate the fixed array data block page */ if (NULL == (dblk_page = H5FA__dblk_page_alloc(udata->hdr, udata->nelmts))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for fixed array data block page") + "memory allocation failed for fixed array data block page"); /* Set the fixed array data block's information */ dblk_page->addr = udata->dblk_page_addr; @@ -1037,7 +1038,7 @@ H5FA__cache_dblk_page_deserialize(const void *_image, size_t len, void *_udata, /* Decode elements in data block page */ /* Convert from raw elements on disk into native elements in memory */ if ((udata->hdr->cparam.cls->decode)(image, dblk_page->elmts, udata->nelmts, udata->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDECODE, NULL, "can't decode fixed array data elements") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDECODE, NULL, "can't decode fixed array data elements"); image += (udata->nelmts * udata->hdr->cparam.raw_elmt_size); /* Sanity check */ @@ -1127,7 +1128,7 @@ H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *_ima /* Convert from native elements in memory into raw elements on disk */ if ((dblk_page->hdr->cparam.cls->encode)(image, dblk_page->elmts, dblk_page->nelmts, dblk_page->hdr->cb_ctx) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTENCODE, FAIL, "can't encode fixed array data elements") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTENCODE, FAIL, "can't encode fixed array data elements"); image += (dblk_page->nelmts * dblk_page->hdr->cparam.raw_elmt_size); /* Compute metadata checksum */ @@ -1177,7 +1178,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) if (H5AC_proxy_entry_remove_child(dblk_page->top_proxy, dblk_page) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency between data block page " - "and fixed array 'top' proxy") + "and fixed array 'top' proxy"); dblk_page->top_proxy = NULL; } /* end if */ break; @@ -1193,7 +1194,7 @@ H5FA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -1225,7 +1226,7 @@ H5FA__cache_dblk_page_free_icr(void *thing) /* Release the fixed array data block page */ if (H5FA__dblk_page_dest((H5FA_dblk_page_t *)thing) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array data block page") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTFREE, FAIL, "can't free fixed array data block page"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index a62b530..e28f678 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -99,11 +99,11 @@ H5FA__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context"); /* Load the fixed array header */ if (NULL == (hdr = H5FA__hdr_protect(f, addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header"); /* Print opening message */ fprintf(stream, "%*sFixed Array Header...\n", indent, ""); @@ -170,16 +170,16 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, if (cls->crt_dbg_ctx) /* Create debugging context */ if (NULL == (dbg_ctx = cls->crt_dbg_ctx(f, obj_addr))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to create fixed array debugging context"); /* Load the fixed array header */ if (NULL == (hdr = H5FA__hdr_protect(f, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to load fixed array header"); /* Protect data block */ if (NULL == (dblock = H5FA__dblock_protect(hdr, addr, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, - "unable to protect fixed array data block, address = %llu", (unsigned long long)addr) + "unable to protect fixed array data block, address = %llu", (unsigned long long)addr); /* Print opening message */ fprintf(stream, "%*sFixed Array data Block...\n", indent, ""); @@ -224,7 +224,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, "unable to protect fixed array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); fprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx); for (u = 0; u < dblk_page_nelmts; u++) { @@ -232,11 +232,11 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "can't get element for debugging") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "can't get element for debugging"); } /* end for */ if (H5FA__dblk_page_unprotect(dblk_page, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPROTECT, FAIL, - "unable to release fixed array data block page") + "unable to release fixed array data block page"); /* Advance to next page address */ dblk_page_addr += dblock->dblk_page_size; @@ -251,7 +251,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * u)) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "can't get element for debugging") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "can't get element for debugging"); } /* end for */ } /* end else */ diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 4d40882..d51f31a 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -94,11 +94,11 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts) /* Allocate memory for the data block */ if (NULL == (dblk_page = H5FL_CALLOC(H5FA_dblk_page_t))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for fixed array data block page") + "memory allocation failed for fixed array data block page"); /* Share common array information */ if (H5FA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); dblk_page->hdr = hdr; /* Set non-zero internal fields */ @@ -107,7 +107,7 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts) /* Allocate buffer for elements in data block page */ if (NULL == (dblk_page->elmts = H5FL_BLK_MALLOC(page_elmts, nelmts * hdr->cparam.cls->nat_elmt_size))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block page element buffer") + "memory allocation failed for data block page element buffer"); /* Set the return value */ ret_value = dblk_page; @@ -149,7 +149,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) /* Allocate the data block page */ if (NULL == (dblk_page = H5FA__dblk_page_alloc(hdr, nelmts))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, FAIL, - "memory allocation failed for fixed array data block page") + "memory allocation failed for fixed array data block page"); /* Set info about data block page on disk */ dblk_page->addr = addr; @@ -161,18 +161,18 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) /* Clear any elements in data block page to fill value */ if ((hdr->cparam.cls->fill)(dblk_page->elmts, nelmts) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, - "can't set fixed array data block page elements to class's fill value") + "can't set fixed array data block page elements to class's fill value"); /* Cache the new fixed array data block page */ if (H5AC_insert_entry(hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, FAIL, "can't add fixed array data block page to cache") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, FAIL, "can't add fixed array data block page to cache"); inserted = TRUE; /* Add data block page as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -233,14 +233,14 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag &udata, flags))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to protect fixed array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == dblk_page->top_proxy) { /* Add data block page as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, NULL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -290,7 +290,7 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags) if (H5AC_unprotect(dblk_page->hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect fixed array data block page, address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -326,7 +326,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page) /* Decrement reference count on shared info */ if (H5FA__hdr_decr(dblk_page->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); dblk_page->hdr = NULL; } /* end if */ diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c index a5489f1..e8cff4f 100644 --- a/src/H5FAdblock.c +++ b/src/H5FAdblock.c @@ -98,11 +98,11 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr) /* Allocate memory for the data block */ if (NULL == (dblock = H5FL_CALLOC(H5FA_dblock_t))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array data block") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for fixed array data block"); /* Share common array information */ if (H5FA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); dblock->hdr = hdr; /* Set non-zero internal fields */ @@ -125,7 +125,7 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr) /* Allocate space for 'page init' flags */ if (NULL == (dblock->dblk_page_init = H5FL_BLK_CALLOC(fa_page_init, dblock->dblk_page_init_size))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for page init bitmask") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for page init bitmask"); /* Compute data block page size */ dblock->dblk_page_size = (dblock->dblk_page_nelmts * hdr->cparam.raw_elmt_size) + H5FA_SIZEOF_CHKSUM; @@ -143,7 +143,7 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr) H5_CHECK_OVERFLOW(dblk_size, /* From: */ hsize_t, /* To: */ size_t); if (NULL == (dblock->elmts = H5FL_BLK_MALLOC(chunk_elmts, (size_t)dblk_size))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block element buffer") + "memory allocation failed for data block element buffer"); } /* end else */ /* Set the return value */ @@ -183,7 +183,7 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty) /* Allocate the data block */ if (NULL == (dblock = H5FA__dblock_alloc(hdr))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for fixed array data block") + "memory allocation failed for fixed array data block"); /* Set size of data block on disk */ hdr->stats.dblk_size = dblock->size = H5FA_DBLOCK_SIZE(dblock); @@ -191,7 +191,7 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty) /* Allocate space for the data block on disk */ if (HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FARRAY_DBLOCK, (hsize_t)dblock->size))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "file allocation failed for fixed array data block") + "file allocation failed for fixed array data block"); dblock->addr = dblock_addr; /* Don't initialize elements if paged */ @@ -199,18 +199,18 @@ H5FA__dblock_create(H5FA_hdr_t *hdr, hbool_t *hdr_dirty) /* Clear any elements in data block to fill value */ if ((hdr->cparam.cls->fill)(dblock->elmts, (size_t)hdr->cparam.nelmts) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, HADDR_UNDEF, - "can't set fixed array data block elements to class's fill value") + "can't set fixed array data block elements to class's fill value"); /* Cache the new fixed array data block */ if (H5AC_insert_entry(hdr->f, H5AC_FARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array data block to cache") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array data block to cache"); inserted = TRUE; /* Add data block as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblock) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -278,14 +278,15 @@ H5FA__dblock_protect(H5FA_hdr_t *hdr, haddr_t dblk_addr, unsigned flags) if (NULL == (dblock = (H5FA_dblock_t *)H5AC_protect(hdr->f, H5AC_FARRAY_DBLOCK, dblk_addr, &udata, flags))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, - "unable to protect fixed array data block, address = %llu", (unsigned long long)dblk_addr) + "unable to protect fixed array data block, address = %llu", + (unsigned long long)dblk_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == dblock->top_proxy) { /* Add data block as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblock) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, NULL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblock->top_proxy = hdr->top_proxy; } /* end if */ @@ -328,7 +329,7 @@ H5FA__dblock_unprotect(H5FA_dblock_t *dblock, unsigned cache_flags) if (H5AC_unprotect(dblock->hdr->f, H5AC_FARRAY_DBLOCK, dblock->addr, dblock, cache_flags) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect fixed array data block, address = %llu", - (unsigned long long)dblock->addr) + (unsigned long long)dblock->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -358,7 +359,8 @@ H5FA__dblock_delete(H5FA_hdr_t *hdr, haddr_t dblk_addr) /* Protect data block */ if (NULL == (dblock = H5FA__dblock_protect(hdr, dblk_addr, H5AC__NO_FLAGS_SET))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, FAIL, - "unable to protect fixed array data block, address = %llu", (unsigned long long)dblk_addr) + "unable to protect fixed array data block, address = %llu", + (unsigned long long)dblk_addr); /* Check if data block is paged */ if (dblock->npages) { @@ -374,7 +376,7 @@ H5FA__dblock_delete(H5FA_hdr_t *hdr, haddr_t dblk_addr) /* (OK to call if it doesn't exist in the cache) */ if (H5AC_expunge_entry(hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page_addr, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTEXPUNGE, FAIL, - "unable to remove array data block page from metadata cache") + "unable to remove array data block page from metadata cache"); /* Advance to next page address */ dblk_page_addr += dblock->dblk_page_size; @@ -429,7 +431,7 @@ H5FA__dblock_dest(H5FA_dblock_t *dblock) /* Decrement reference count on shared info */ if (H5FA__hdr_decr(dblock->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); dblock->hdr = NULL; } /* end if */ diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 419a933..37d3e39 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -91,7 +91,8 @@ H5FA__hdr_alloc(H5F_t *f) /* Allocate space for the shared information */ if (NULL == (hdr = H5FL_CALLOC(H5FA_hdr_t))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "memory allocation failed for Fixed Array shared header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, + "memory allocation failed for Fixed Array shared header"); /* Set non-zero internal fields */ hdr->addr = HADDR_UNDEF; @@ -141,7 +142,7 @@ H5FA__hdr_init(H5FA_hdr_t *hdr, void *ctx_udata) if (hdr->cparam.cls->crt_context) if (NULL == (hdr->cb_ctx = (*hdr->cparam.cls->crt_context)(ctx_udata))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, FAIL, - "unable to create fixed array client callback context") + "unable to create fixed array client callback context"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -174,19 +175,19 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata) { /* Check for valid parameters */ if (cparam->raw_elmt_size == 0) - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, HADDR_UNDEF, "element size must be greater than zero") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, HADDR_UNDEF, "element size must be greater than zero"); if (cparam->max_dblk_page_nelmts_bits == 0) HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, HADDR_UNDEF, - "max. # of elements bits must be greater than zero") + "max. # of elements bits must be greater than zero"); if (cparam->nelmts == 0) - HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, HADDR_UNDEF, "# of elements must be greater than zero") + HGOTO_ERROR(H5E_FARRAY, H5E_BADVALUE, HADDR_UNDEF, "# of elements must be greater than zero"); } #endif /* NDEBUG */ /* Allocate space for the shared information */ if (NULL == (hdr = H5FA__hdr_alloc(f))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, HADDR_UNDEF, - "memory allocation failed for Fixed Array shared header") + "memory allocation failed for Fixed Array shared header"); hdr->dblk_addr = HADDR_UNDEF; @@ -195,27 +196,27 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata) /* Finish initializing fixed array header */ if (H5FA__hdr_init(hdr, ctx_udata) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, HADDR_UNDEF, "initialization failed for fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINIT, HADDR_UNDEF, "initialization failed for fixed array header"); /* Allocate space for the header on disk */ if (HADDR_UNDEF == (hdr->addr = H5MF_alloc(f, H5FD_MEM_FARRAY_HDR, (hsize_t)hdr->size))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for Fixed Array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for Fixed Array header"); /* Create 'top' proxy for extensible array entries */ if (hdr->swmr_write) if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, HADDR_UNDEF, "can't create fixed array entry proxy") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, HADDR_UNDEF, "can't create fixed array entry proxy"); /* Cache the new Fixed Array header */ if (H5AC_insert_entry(f, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array header to cache") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, HADDR_UNDEF, "can't add fixed array header to cache"); inserted = TRUE; /* Add header as child of 'top' proxy */ if (hdr->top_proxy) if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, HADDR_UNDEF, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); /* Set address of array header to return */ ret_value = hdr->addr; @@ -264,7 +265,7 @@ H5FA__hdr_incr(H5FA_hdr_t *hdr) /* Mark header as un-evictable when something is depending on it */ if (hdr->rc == 0) if (H5AC_pin_protected_entry(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTPIN, FAIL, "unable to pin fixed array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTPIN, FAIL, "unable to pin fixed array header"); /* Increment reference count on shared header */ hdr->rc++; @@ -300,7 +301,7 @@ H5FA__hdr_decr(H5FA_hdr_t *hdr) if (hdr->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") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPIN, FAIL, "unable to unpin fixed array header"); } done: @@ -381,7 +382,7 @@ H5FA__hdr_modified(H5FA_hdr_t *hdr) /* Mark header as dirty in cache */ if (H5AC_mark_entry_dirty(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTMARKDIRTY, FAIL, "unable to mark fixed array header as dirty") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTMARKDIRTY, FAIL, "unable to mark fixed array header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -420,19 +421,19 @@ H5FA__hdr_protect(H5F_t *f, haddr_t fa_addr, void *ctx_udata, unsigned flags) /* Protect the header */ if (NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, H5AC_FARRAY_HDR, fa_addr, &udata, flags))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to protect fixed array header, address = %llu", - (unsigned long long)fa_addr) + (unsigned long long)fa_addr); hdr->f = f; /* (Must be set again here, in case the header was already in the cache -QAK) */ /* Create top proxy, if it doesn't exist */ if (hdr->swmr_write && NULL == hdr->top_proxy) { /* Create 'top' proxy for fixed array entries */ if (NULL == (hdr->top_proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, NULL, "can't create fixed array entry proxy") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTCREATE, NULL, "can't create fixed array entry proxy"); /* Add header as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, f, hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, NULL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); } /* Set return value */ @@ -464,7 +465,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags) /* Unprotect the header */ if (H5AC_unprotect(hdr->f, H5AC_FARRAY_HDR, hdr->addr, hdr, cache_flags) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect fixed array hdr, address = %llu", (unsigned long long)hdr->addr) + "unable to unprotect fixed array hdr, address = %llu", (unsigned long long)hdr->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -497,7 +498,7 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr) /* Check the array header's status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, hdr->addr, &hdr_status) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTGET, FAIL, "unable to check metadata cache status for array header"); /* Sanity checks on array header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -509,7 +510,7 @@ H5FA__hdr_delete(H5FA_hdr_t *hdr) if (H5_addr_defined(hdr->dblk_addr)) { /* Delete Fixed Array Data block */ if (H5FA__dblock_delete(hdr, hdr->dblk_addr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array data block") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDELETE, FAIL, "unable to delete fixed array data block"); } /* Set flags to finish deleting header on unprotect */ @@ -547,14 +548,14 @@ H5FA__hdr_dest(H5FA_hdr_t *hdr) if (hdr->cb_ctx) { if ((*hdr->cparam.cls->dst_context)(hdr->cb_ctx) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTRELEASE, FAIL, - "unable to destroy fixed array client callback context") + "unable to destroy fixed array client callback context"); } hdr->cb_ctx = NULL; /* Destroy the 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_dest(hdr->top_proxy) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTRELEASE, FAIL, "unable to destroy fixed array 'top' proxy") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTRELEASE, FAIL, "unable to destroy fixed array 'top' proxy"); hdr->top_proxy = NULL; } diff --git a/src/H5FAint.c b/src/H5FAint.c index 38fd043..f4070ee 100644 --- a/src/H5FAint.c +++ b/src/H5FAint.c @@ -86,7 +86,7 @@ H5FA__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Create a flush dependency between parent and child entry */ if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -114,7 +114,7 @@ H5FA__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Destroy a flush dependency between parent and child entry */ if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FAtest.c b/src/H5FAtest.c index 9a979b2..abd9388 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -118,7 +118,7 @@ H5FA__test_crt_context(void H5_ATTR_UNUSED *udata) /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context"); /* Initialize the context */ ctx->bogus = H5FA__TEST_BOGUS_VAL; @@ -311,7 +311,7 @@ H5FA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_a /* Allocate new context structure */ if (NULL == (ctx = H5FL_MALLOC(H5FA__test_ctx_t))) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, "can't allocate fixed array client callback context"); /* Initialize the context */ ctx->bogus = H5FA__TEST_BOGUS_VAL; diff --git a/src/H5FD.c b/src/H5FD.c index 473410d..4909a25 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -107,7 +107,7 @@ H5FD_init(void) FUNC_ENTER_NOAPI(FAIL) if (H5I_register_type(H5I_VFL_CLS) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize interface"); /* Reset the file serial numbers */ H5FD_file_serial_no_g = 0; @@ -177,7 +177,7 @@ H5FD__free_cls(H5FD_class_t *cls, void H5_ATTR_UNUSED **request) */ if (cls->terminate && cls->terminate() < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEOBJ, FAIL, "virtual file driver '%s' did not terminate cleanly", - cls->name) + cls->name); H5MM_xfree(cls); @@ -212,27 +212,27 @@ H5FDregister(const H5FD_class_t *cls) /* Check arguments */ if (!cls) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null class pointer is disallowed") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null class pointer is disallowed"); if (cls->version != H5FD_CLASS_VERSION) - HGOTO_ERROR(H5E_ARGS, H5E_VERSION, H5I_INVALID_HID, "wrong file driver version #") + HGOTO_ERROR(H5E_ARGS, H5E_VERSION, H5I_INVALID_HID, "wrong file driver version #"); if (!cls->open || !cls->close) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "'open' and/or 'close' methods are not defined") + "'open' and/or 'close' methods are not defined"); if (!cls->get_eoa || !cls->set_eoa) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "'get_eoa' and/or 'set_eoa' methods are not defined") + "'get_eoa' and/or 'set_eoa' methods are not defined"); if (!cls->get_eof) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "'get_eof' method is not defined") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "'get_eof' method is not defined"); if (!cls->read || !cls->write) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "'read' and/or 'write' method is not defined") + "'read' and/or 'write' method is not defined"); for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) if (cls->fl_map[type] < H5FD_MEM_NOLIST || cls->fl_map[type] >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid free-list mapping") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid free-list mapping"); /* Create the new class ID */ if ((ret_value = H5FD_register(cls, sizeof(H5FD_class_t), TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID"); done: FUNC_LEAVE_API(ret_value) @@ -277,12 +277,12 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref) /* Copy the class structure so the caller can reuse or free it */ if (NULL == (saved = (H5FD_class_t *)H5MM_malloc(size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, - "memory allocation failed for file driver class struct") + "memory allocation failed for file driver class struct"); H5MM_memcpy(saved, cls, size); /* Create the new class ID */ if ((ret_value = H5I_register(H5I_VFL, saved, app_ref)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file driver ID"); done: if (H5I_INVALID_HID == ret_value) @@ -314,7 +314,7 @@ H5FDis_driver_registered_by_name(const char *driver_name) /* Check if driver with this name is registered */ if ((ret_value = H5FD_is_driver_registered_by_name(driver_name, NULL)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFD is registered") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFD is registered"); done: FUNC_LEAVE_API(ret_value) @@ -342,7 +342,7 @@ H5FDis_driver_registered_by_value(H5FD_class_value_t driver_value) /* Check if driver with this value is registered */ if ((ret_value = H5FD_is_driver_registered_by_value(driver_value, NULL)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFD is registered") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFD is registered"); done: FUNC_LEAVE_API(ret_value) @@ -370,11 +370,11 @@ H5FDunregister(hid_t driver_id) /* Check arguments */ if (NULL == H5I_object_verify(driver_id, H5I_VFL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver"); /* The H5FD_class_t struct will be freed by this function */ if (H5I_dec_app_ref(driver_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "unable to unregister file driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "unable to unregister file driver"); done: FUNC_LEAVE_API(ret_value) @@ -411,17 +411,17 @@ H5FD_get_class(hid_t id) /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID"); if (TRUE == H5P_isa_class(id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID & info"); ret_value = H5FD_get_class(driver_prop.driver_id); } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a driver id or file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a driver id or file access property list"); } /* end if */ done: @@ -486,7 +486,7 @@ H5FD_sb_encode(H5FD_t *file, char *name /*out*/, uint8_t *buf) /* Dispatch to driver */ if (file->cls->sb_encode && (file->cls->sb_encode)(file, name /*out*/, buf /*out*/) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_encode request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_encode request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -514,7 +514,7 @@ H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf) /* Dispatch to driver */ if (file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_decode request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_decode request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -544,13 +544,13 @@ H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf) * function to each specific driver because we're checking if the driver is correct. */ if (!HDstrncmp(name, "NCSAfami", (size_t)8) && HDstrcmp(file->cls->name, "family") != 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "family driver should be used") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "family driver should be used"); if (!HDstrncmp(name, "NCSAmult", (size_t)8) && HDstrcmp(file->cls->name, "multi") != 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "multi driver should be used") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "multi driver should be used"); /* Decode driver information */ if (H5FD__sb_decode(file, name, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode driver information") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode driver information"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -617,14 +617,14 @@ H5FD_free_driver_info(hid_t driver_id, const void *driver_info) /* Retrieve the driver for the ID */ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a driver ID"); /* Allow driver to free info or do it ourselves */ if (driver->fapl_free) { /* Free the const pointer */ /* Cast through uintptr_t to de-const memory */ if ((driver->fapl_free)((void *)(uintptr_t)driver_info) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed"); } else driver_info = H5MM_xfree_const(driver_info); @@ -696,11 +696,11 @@ H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) if (H5P_DEFAULT == fapl_id) fapl_id = H5P_FILE_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); /* Call private function */ if (NULL == (ret_value = H5FD_open(name, flags, fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to open file") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to open file"); done: FUNC_LEAVE_API(ret_value) @@ -732,41 +732,41 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* Sanity checks */ if (0 == maxaddr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "zero format address range") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "zero format address range"); /* Get file access property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); /* Get the VFD to open the file with */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver ID & info"); /* Get driver info */ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_prop.driver_id))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid driver ID in file access property list") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid driver ID in file access property list"); if (NULL == driver->open) - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `open' method") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `open' method"); /* Query driver flag */ if (H5FD_driver_query(driver, &driver_flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't query VFD flags") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't query VFD flags"); /* Get initial file image info */ if (H5P_peek(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file image info") + 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 */ 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.") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file image set, but not supported."); /* Dispatch to file driver */ if (HADDR_UNDEF == maxaddr) maxaddr = driver->maxaddr; if (NULL == (file = (driver->open)(name, flags, fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "open failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "open failed"); /* Set the file access flags */ file->access_flags = flags; @@ -776,22 +776,22 @@ H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) */ file->driver_id = driver_prop.driver_id; if (H5I_inc_ref(file->driver_id, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver"); file->cls = driver; file->maxaddr = maxaddr; if (H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(file->threshold)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold"); if (H5P_get(plist, H5F_ACS_ALIGN_NAME, &(file->alignment)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment"); /* Retrieve the VFL driver feature flags */ if (H5FD__query(file, &(file->feature_flags)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to query file driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to query file driver"); /* Increment the global serial number & assign it to this H5FD_t object */ if (++H5FD_file_serial_no_g == 0) { /* (Just error out if we wrap around for now...) */ - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to get file serial number") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "unable to get file serial number"); } /* end if */ file->fileno = H5FD_file_serial_no_g; @@ -830,13 +830,13 @@ H5FDclose(H5FD_t *file) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); /* Call private function */ if (H5FD_close(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file"); done: FUNC_LEAVE_API(ret_value) @@ -866,14 +866,14 @@ H5FD_close(H5FD_t *file) /* Prepare to close file by clearing all public fields */ driver = file->cls; if (H5I_dec_ref(file->driver_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID"); /* Dispatch to the driver for actual close. If the driver fails to * close the file then the file will be in an unusable state. */ assert(driver->close); if ((driver->close)(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -978,15 +978,15 @@ H5FDquery(const H5FD_t *file, unsigned long *flags /*out*/) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "file class pointer cannot be NULL"); if (!flags) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "flags parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "flags parameter cannot be NULL"); /* Call private function */ if (H5FD__query(file, flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "unable to query feature flags") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "unable to query feature flags"); done: FUNC_LEAVE_API(ret_value) @@ -1016,7 +1016,7 @@ H5FD__query(const H5FD_t *file, unsigned long *flags /*out*/) /* Dispatch to driver (if available) */ if (file->cls->query) { if ((file->cls->query)(file, flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to query feature flags") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to query feature flags"); } else *flags = 0; @@ -1071,24 +1071,24 @@ H5FDalloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL"); if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid request type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid request type"); if (size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "zero-size request") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "zero-size request"); if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Call private function */ if (HADDR_UNDEF == (ret_value = H5FD__alloc_real(file, type, size, NULL, NULL))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file memory") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file memory"); /* (Note compensating for base address subtraction in internal routine) */ ret_value += file->base_addr; @@ -1121,15 +1121,15 @@ H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t siz /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request type"); if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1137,7 +1137,7 @@ H5FDfree(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t siz /* Call private function */ /* (Note compensating for base address addition in internal routine) */ if (H5FD__free_real(file, type, addr - file->base_addr, size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "file deallocation request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "file deallocation request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1164,15 +1164,15 @@ H5FDget_eoa(H5FD_t *file, H5FD_mem_t type) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL"); if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "invalid file type"); /* Call private function */ if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eoa request failed"); /* (Note compensating for base address subtraction in internal routine) */ ret_value += file->base_addr; @@ -1212,18 +1212,18 @@ H5FDset_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file type"); if (!H5_addr_defined(addr) || addr > file->maxaddr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid end-of-address value"); /* Call private function */ /* (Note compensating for base address addition in internal routine) */ if (H5FD_set_eoa(file, type, addr - file->base_addr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file set eoa request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1260,13 +1260,13 @@ H5FDget_eof(H5FD_t *file, H5FD_mem_t type) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, HADDR_UNDEF, "file class pointer cannot be NULL"); /* Call private function */ if (HADDR_UNDEF == (ret_value = H5FD_get_eof(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "file get eof request failed"); /* (Note compensating for base address subtraction in internal routine) */ ret_value += file->base_addr; @@ -1373,7 +1373,7 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map) if (file->cls->get_type_map) { /* Retrieve type mapping for this file */ if ((file->cls->get_type_map)(file, type_map) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get type map failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get type map failed"); } /* end if */ else /* Copy class's default free space type mapping */ @@ -1410,17 +1410,17 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1428,7 +1428,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size /* Call private function */ /* (Note compensating for base address addition in internal routine) */ if (H5FD_read(file, type, addr - file->base_addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1456,17 +1456,17 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (!buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1474,7 +1474,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz /* Call private function */ /* (Note compensating for base address addition in internal routine) */ if (H5FD_write(file, type, addr - file->base_addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1512,28 +1512,28 @@ H5FDread_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[], /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if ((!types) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "types parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "types parameter can't be NULL if count is positive"); if ((!addrs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addrs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addrs parameter can't be NULL if count is positive"); if ((!sizes) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes parameter can't be NULL if count is positive"); if ((!bufs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive"); if ((count > 0) && (sizes[0] == 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0"); if ((count > 0) && (types[0] == H5FD_MEM_NOLIST)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count[0] can't be H5FD_MEM_NOLIST") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count[0] can't be H5FD_MEM_NOLIST"); /* Get the default dataset transfer property list if the user * didn't provide one @@ -1543,7 +1543,7 @@ H5FDread_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[], } else { if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); } /* Set DXPL for operation */ @@ -1552,7 +1552,7 @@ H5FDread_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[], /* Call private function */ /* (Note compensating for base addresses addition in internal routine) */ if (H5FD_read_vector(file, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file vector read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file vector read request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1588,28 +1588,28 @@ H5FDwrite_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[] /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if ((!types) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "types parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "types parameter can't be NULL if count is positive"); if ((!addrs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addrs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addrs parameter can't be NULL if count is positive"); if ((!sizes) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes parameter can't be NULL if count is positive"); if ((!bufs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive"); if ((count > 0) && (sizes[0] == 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0"); if ((count > 0) && (types[0] == H5FD_MEM_NOLIST)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count[0] can't be H5FD_MEM_NOLIST") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "count[0] can't be H5FD_MEM_NOLIST"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) { @@ -1617,7 +1617,7 @@ H5FDwrite_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[] } else { if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); } /* Set DXPL for operation */ @@ -1626,7 +1626,7 @@ H5FDwrite_vector(H5FD_t *file, hid_t dxpl_id, uint32_t count, H5FD_mem_t types[] /* Call private function */ /* (Note compensating for base address addition in internal routine) */ if (H5FD_write_vector(file, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file vector write request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file vector write request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1682,32 +1682,32 @@ H5FDread_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count, /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if ((!mem_space_ids) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_spaces parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_spaces parameter can't be NULL if count is positive"); if ((!file_space_ids) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_spaces parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_spaces parameter can't be NULL if count is positive"); if ((!offsets) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offsets parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offsets parameter can't be NULL if count is positive"); if ((!element_sizes) && (count > 0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "element_sizes parameter can't be NULL if count is positive") + "element_sizes parameter can't be NULL if count is positive"); if ((!bufs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive"); if ((count > 0) && (element_sizes[0] == 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0"); if ((count > 0) && (bufs[0] == NULL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs[0] can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs[0] can't be NULL"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) { @@ -1715,7 +1715,7 @@ H5FDread_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count, } else { if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); } /* Set DXPL for operation */ @@ -1725,7 +1725,7 @@ H5FDread_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count, /* (Note compensating for base address addition in internal routine) */ if (H5FD_read_selection_id(file, type, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file selection read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file selection read request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1779,32 +1779,32 @@ H5FDwrite_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if ((!mem_space_ids) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_spaces parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_spaces parameter can't be NULL if count is positive"); if ((!file_space_ids) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_spaces parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_spaces parameter can't be NULL if count is positive"); if ((!offsets) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offsets parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offsets parameter can't be NULL if count is positive"); if ((!element_sizes) && (count > 0)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "element_sizes parameter can't be NULL if count is positive") + "element_sizes parameter can't be NULL if count is positive"); if ((!bufs) && (count > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs parameter can't be NULL if count is positive"); if ((count > 0) && (element_sizes[0] == 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sizes[0] can't be 0"); if ((count > 0) && (bufs[0] == NULL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs[0] can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bufs[0] can't be NULL"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) { @@ -1812,7 +1812,7 @@ H5FDwrite_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count } else { if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); } /* Set DXPL for operation */ @@ -1822,7 +1822,7 @@ H5FDwrite_selection(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uint32_t count /* (Note compensating for base address addition in internal routine) */ if (H5FD_write_selection_id(file, type, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file selection write request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file selection write request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1848,21 +1848,21 @@ H5FDflush(H5FD_t *file, hid_t dxpl_id, hbool_t closing) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Call private function */ if (H5FD_flush(file, closing) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "file flush request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "file flush request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1890,7 +1890,7 @@ H5FD_flush(H5FD_t *file, hbool_t closing) /* Dispatch to driver */ if (file->cls->flush && (file->cls->flush)(file, H5CX_get_dxpl(), closing) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver flush request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver flush request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1915,20 +1915,20 @@ H5FDtruncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Call private function */ if (H5FD_truncate(file, closing) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "file flush request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "file flush request failed"); done: FUNC_LEAVE_API(ret_value) @@ -1956,7 +1956,7 @@ H5FD_truncate(H5FD_t *file, hbool_t closing) /* Dispatch to driver */ if (file->cls->truncate && (file->cls->truncate)(file, H5CX_get_dxpl(), closing) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "driver truncate request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "driver truncate request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1981,13 +1981,13 @@ H5FDlock(H5FD_t *file, hbool_t rw) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); /* Call private function */ if (H5FD_lock(file, rw) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "file lock request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "file lock request failed"); done: FUNC_LEAVE_API(ret_value) @@ -2015,7 +2015,7 @@ H5FD_lock(H5FD_t *file, hbool_t rw) /* Dispatch to driver */ if (file->cls->lock && (file->cls->lock)(file, rw) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "driver lock request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "driver lock request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2040,13 +2040,13 @@ H5FDunlock(H5FD_t *file) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); /* Call private function */ if (H5FD_unlock(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "file unlock request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "file unlock request failed"); done: FUNC_LEAVE_API(ret_value) @@ -2074,7 +2074,7 @@ H5FD_unlock(H5FD_t *file) /* Dispatch to driver */ if (file->cls->unlock && (file->cls->unlock)(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "driver unlock request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "driver unlock request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2108,10 +2108,10 @@ H5FDctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); /* Don't attempt to validate the op code. If appropriate, that will * be done by the underlying VFD callback, along with the input and @@ -2120,7 +2120,7 @@ H5FDctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void /* Call private function */ if (H5FD_ctl(file, op_code, flags, input, output) < 0) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed"); done: @@ -2167,12 +2167,12 @@ H5FD_ctl(H5FD_t *file, uint64_t op_code, uint64_t flags, const void *input, void if ((file->cls->ctl)(file, op_code, flags, input, output) < 0) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed"); } else if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) { HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, - "VFD ctl request failed (no ctl callback and fail if unknown flag is set)") + "VFD ctl request failed (no ctl callback and fail if unknown flag is set)"); } done: @@ -2227,17 +2227,17 @@ H5FDget_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle /*out*/) /* Check arguments */ if (!file) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file pointer cannot be NULL"); if (!file->cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file class pointer cannot be NULL"); if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fapl_id parameter is not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fapl_id parameter is not a file access property list"); if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle parameter cannot be NULL"); /* Call private function */ if (H5FD_get_vfd_handle(file, fapl_id, file_handle) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver"); done: if (FAIL == ret_value) { @@ -2271,9 +2271,9 @@ H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle) /* Dispatch to driver */ if (NULL == file->cls->get_handle) - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no `get_vfd_handle' method") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no `get_vfd_handle' method"); if ((file->cls->get_handle)(file, fapl_id, file_handle) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2371,13 +2371,13 @@ H5FDdriver_query(hid_t driver_id, unsigned long *flags /*out*/) /* Check arguments */ if (NULL == flags) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "flags parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "flags parameter cannot be NULL"); /* Check for the driver to query and then query it */ if (NULL == (driver = (H5FD_class_t *)H5I_object_verify(driver_id, H5I_VFL))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a VFL ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a VFL ID"); if (H5FD_driver_query(driver, flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "driver flag query failed") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "driver flag query failed"); done: FUNC_LEAVE_API(ret_value) @@ -2402,16 +2402,16 @@ H5FDdelete(const char *filename, hid_t fapl_id) /* Check arguments */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified"); if (H5P_DEFAULT == fapl_id) fapl_id = H5P_FILE_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Call private function */ if (H5FD_delete(filename, fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file") + HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 9c2f1a4..a48a314 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -287,7 +287,7 @@ H5FD__core_add_dirty_region(H5FD_core_t *file, haddr_t start, haddr_t end) item->end = end; if (H5SL_insert(file->dirty_list, item, &item->start) < 0) HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't insert new dirty region: (%llu, %llu)\n", - (unsigned long long)start, (unsigned long long)end) + (unsigned long long)start, (unsigned long long)end); } /* end if */ else { /* Store the new item endpoint if it's bigger */ @@ -330,7 +330,7 @@ H5FD__core_destroy_dirty_list(H5FD_core_t *file) region = H5FL_FREE(H5FD_core_region_t, region); if (H5SL_close(file->dirty_list) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CLOSEERROR, FAIL, "can't close core vfd dirty list") + HGOTO_ERROR(H5E_SLIST, H5E_CLOSEERROR, FAIL, "can't close core vfd dirty list"); file->dirty_list = NULL; } /* end if */ @@ -363,7 +363,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size) #ifndef H5_HAVE_PREADWRITE /* Seek to the correct location (if we don't have pwrite) */ if ((HDoff_t)addr != HDlseek(file->fd, (off_t)addr, SEEK_SET)) - HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store") + HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store"); #endif /* H5_HAVE_PREADWRITE */ while (size > 0) { @@ -522,13 +522,13 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size) /* The page size cannot be zero */ if (page_size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID"); if (H5FD_CORE != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (NULL == (old_fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist))) old_fa = H5FD__core_get_default_config(); @@ -541,7 +541,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size) /* Set the property values & the driver for the FAPL */ if (H5P_set_driver(plist, H5FD_CORE, &fa, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver"); done: FUNC_LEAVE_API(ret_value) @@ -569,11 +569,11 @@ H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled /*out*/, size_t * /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID"); if (H5FD_CORE != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist))) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); /* Get values */ if (is_enabled) @@ -608,7 +608,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store) /* Check argument */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Set VFD info values */ memset(&fa, 0, sizeof(H5FD_core_fapl_t)); @@ -619,7 +619,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store) /* Set the property values & the driver for the FAPL */ if (H5P_set_driver(plist, H5FD_CORE, &fa, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set core VFD as driver"); done: FUNC_LEAVE_API(ret_value) @@ -645,11 +645,11 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor H5TRACE3("e", "ixx", fapl_id, increment, backing_store); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_CORE != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist))) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); if (increment) *increment = fa->increment; @@ -680,7 +680,7 @@ H5FD__core_fapl_get(H5FD_t *_file) FUNC_ENTER_PACKAGE if (NULL == (fa = (H5FD_core_fapl_t *)H5MM_calloc(sizeof(H5FD_core_fapl_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); fa->increment = file->increment; fa->backing_store = (hbool_t)(file->fd >= 0); @@ -725,14 +725,14 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow"); 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") + 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))) fa = H5FD__core_get_default_config(); @@ -747,7 +747,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Retrieve initial file image info */ if (H5P_peek(plist, H5F_ACS_FILE_IMAGE_INFO_NAME, &file_image_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial file image info") + 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 */ assert(((file_image_info.buffer != NULL) && (file_image_info.size > 0)) || @@ -755,7 +755,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr 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") + HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file already exists"); /* If backing store is requested, create and stat the file * Note: We are forcing the O_CREAT flag here, even though this is @@ -763,7 +763,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr */ if (fa->backing_store) { if ((fd = HDopen(name, o_flags | O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file"); if (HDfstat(fd, &sb) < 0) HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file") } /* end if */ @@ -773,14 +773,14 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr * on. */ else if (fa->backing_store || !(H5F_ACC_CREAT & flags)) { if ((fd = HDopen(name, o_flags, H5_POSIX_CREATE_MODE_RW)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file"); if (HDfstat(fd, &sb) < 0) HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, NULL, "unable to fstat file") } /* end if */ /* Create the new file struct */ if (NULL == (file = (H5FD_core_t *)H5MM_calloc(sizeof(H5FD_core_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); file->fd = fd; if (name && *name) file->name = H5MM_xstrdup(name); @@ -804,7 +804,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr else { /* Use the value in the property list */ if (H5P_get(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, &file->ignore_disabled_file_locks) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property"); } if (fd >= 0) { @@ -812,10 +812,10 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr #ifdef H5_HAVE_WIN32_API file->hFile = (HANDLE)_get_osfhandle(fd); if (INVALID_HANDLE_VALUE == file->hFile) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle"); if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information"); file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; @@ -842,11 +842,11 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr if (file->fi_callbacks.image_malloc) { if (NULL == (file->mem = (unsigned char *)file->fi_callbacks.image_malloc( size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "image malloc callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "image malloc callback failed"); } /* end if */ else { if (NULL == (file->mem = (unsigned char *)H5MM_malloc(size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "unable to allocate memory block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "unable to allocate memory block"); } /* end else */ /* Set up data structures */ @@ -858,7 +858,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr if (file->mem != file->fi_callbacks.image_memcpy(file->mem, file_image_info.buffer, size, H5FD_FILE_IMAGE_OP_FILE_OPEN, file->fi_callbacks.udata)) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, NULL, "image_memcpy callback failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, NULL, "image_memcpy callback failed"); } /* end if */ else H5MM_memcpy(file->mem, file_image_info.buffer, size); @@ -978,12 +978,12 @@ H5FD__core_close(H5FD_t *_file) /* Flush any changed buffers */ if (H5FD__core_flush(_file, (hid_t)-1, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush core vfd backing store") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush core vfd backing store"); /* Destroy the dirty region list */ if (file->dirty_list) if (H5FD__core_destroy_dirty_list(file) != SUCCEED) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free core vfd dirty region list") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free core vfd dirty region list"); /* Release resources */ if (file->fd >= 0) @@ -995,7 +995,7 @@ H5FD__core_close(H5FD_t *_file) if (file->fi_callbacks.image_free) { if (file->fi_callbacks.image_free(file->mem, H5FD_FILE_IMAGE_OP_FILE_CLOSE, file->fi_callbacks.udata) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "image_free callback failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "image_free callback failed"); } /* end if */ else H5MM_xfree(file->mem); @@ -1173,7 +1173,7 @@ H5FD__core_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr) FUNC_ENTER_PACKAGE if (ADDR_OVERFLOW(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow"); file->eoa = addr; @@ -1223,7 +1223,7 @@ H5FD__core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Check args */ if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); /* Check for non-default FAPL */ if (H5P_FILE_ACCESS_DEFAULT != fapl && H5P_DEFAULT != fapl) { @@ -1231,7 +1231,7 @@ H5FD__core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get the FAPL */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list"); /* Check if private property for retrieving the backing store POSIX * file descriptor is set. (This should not be set except within the @@ -1242,7 +1242,7 @@ H5FD__core_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get property */ if (H5P_get(plist, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get property of retrieving file descriptor") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get property of retrieving file descriptor"); /* If property is set, pass back the file descriptor instead of the memory address */ if (want_posix_fd) @@ -1287,9 +1287,9 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* Check for overflow conditions */ if (HADDR_UNDEF == addr) - HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") + HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed"); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") + HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed"); /* Read the part which is before the EOF marker */ if (addr < file->eof) { @@ -1343,7 +1343,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN /* Check for overflow conditions */ if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") + HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed"); /* * Allocate more memory if necessary, careful of overflow. Also, if the @@ -1366,12 +1366,12 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes with callback", - (unsigned long long)new_eof) + (unsigned long long)new_eof); } /* end if */ else { if (NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof) + "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof); } /* end else */ memset(x + file->eof, 0, (size_t)(new_eof - file->eof)); @@ -1389,7 +1389,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN HGOTO_ERROR( H5E_VFL, H5E_CANTINSERT, FAIL, "unable to add core VFD dirty region during write call - addresses: start=%llu end=%llu", - (unsigned long long)start, (unsigned long long)end) + (unsigned long long)start, (unsigned long long)end); } /* Write from BUF to memory */ @@ -1440,7 +1440,7 @@ H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UN size = (size_t)((item->end - item->start) + 1); if (H5FD__core_write_to_bstore(file, item->start, size) != SUCCEED) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store"); } /* end if */ item = H5FL_FREE(H5FD_core_region_t, item); @@ -1450,7 +1450,7 @@ H5FD__core_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UN /* Otherwise, write the entire file out at once */ else { if (H5FD__core_write_to_bstore(file, (haddr_t)0, (size_t)file->eof) != SUCCEED) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write to backing store"); } /* end else */ file->dirty = FALSE; @@ -1524,11 +1524,11 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing (x = (unsigned char *)file->fi_callbacks.image_realloc( file->mem, new_eof, H5FD_FILE_IMAGE_OP_FILE_RESIZE, file->fi_callbacks.udata))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "unable to allocate memory block with callback") + "unable to allocate memory block with callback"); } /* end if */ else { if (NULL == (x = (unsigned char *)H5MM_realloc(file->mem, new_eof))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to allocate memory block"); } /* end else */ if (file->eof < new_eof) @@ -1557,12 +1557,12 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing if (INVALID_SET_FILE_POINTER == dwPtrLow) { dwError = GetLastError(); if (dwError != NO_ERROR) - HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer") + HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer"); } bError = SetEndOfFile(file->hFile); if (0 == bError) - HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") + HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly"); #else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") @@ -1682,7 +1682,7 @@ H5FD__core_delete(const char *filename, hid_t fapl_id) 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (NULL == (fa = (const H5FD_core_fapl_t *)H5P_peek_driver_info(plist))) fa = H5FD__core_get_default_config(); diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index d3332c8..30a3c90 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -266,10 +266,10 @@ H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbu H5TRACE4("e", "izzz", fapl_id, boundary, block_size, cbuf_size); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD__direct_populate_config(boundary, block_size, cbuf_size, &fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info"); ret_value = H5P_set_driver(plist, H5FD_DIRECT, &fa, NULL); @@ -301,11 +301,11 @@ H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size / H5TRACE4("e", "ixxx", fapl_id, boundary, block_size, cbuf_size); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_DIRECT != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (NULL == (fa = H5P_peek_driver_info(plist))) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); if (boundary) *boundary = fa->mboundary; if (block_size) @@ -358,7 +358,7 @@ H5FD__direct_populate_config(size_t boundary, size_t block_size, size_t cbuf_siz /* Copy buffer size must be a multiple of file block size */ if (fa_out->cbsize % fa_out->fbsize != 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "copy buffer size must be a multiple of block size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "copy buffer size must be a multiple of block size"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -456,11 +456,11 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); /* Build the open flags */ o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY; @@ -483,14 +483,14 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad /* Create the new file struct */ if (NULL == (file = H5FL_CALLOC(H5FD_direct_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); /* Get the driver specific information */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (NULL == (fa = (const H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) { if (H5FD__direct_populate_config(0, 0, 0, &default_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't initialize driver configuration info"); fa = &default_fa; } @@ -518,7 +518,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad else { /* Use the value in the property list */ if (H5P_get(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, &file->ignore_disabled_file_locks) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property"); } /* Try to decide if data alignment is required. The reason to check it here @@ -530,12 +530,12 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad */ buf1 = malloc(sizeof(int)); if (posix_memalign(&buf2, file->fa.mboundary, file->fa.fbsize) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "posix_memalign failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "posix_memalign failed"); if (o_flags & O_CREAT) { if (HDwrite(file->fd, buf1, sizeof(int)) < 0) { if (HDwrite(file->fd, buf2, file->fa.fbsize) < 0) - HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, NULL, "file system may not support Direct I/O") + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, NULL, "file system may not support Direct I/O"); else file->fa.must_align = TRUE; } @@ -548,7 +548,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad else { if (HDread(file->fd, buf1, sizeof(int)) < 0) { if (HDread(file->fd, buf2, file->fa.fbsize) < 0) - HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "file system may not support Direct I/O") + HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "file system may not support Direct I/O"); else file->fa.must_align = TRUE; } @@ -794,7 +794,7 @@ H5FD__direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_ha FUNC_ENTER_PACKAGE if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = &(file->fd); done: @@ -839,9 +839,9 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U /* Check for overflow conditions */ if (HADDR_UNDEF == addr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined"); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow"); /* If the system doesn't require data to be aligned, read the data in * the same way as sec2 driver. @@ -897,7 +897,7 @@ H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U alloc_size = _cbsize; assert(!(alloc_size % _fbsize)); if (posix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed"); /* look for the aligned position for reading the data */ assert(!(((addr / _fbsize) * _fbsize) % _fbsize)); @@ -1019,9 +1019,9 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_ /* Check for overflow conditions */ if (HADDR_UNDEF == addr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined"); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow"); /* If the system doesn't require data to be aligned, read the data in * the same way as sec2 driver. @@ -1075,7 +1075,7 @@ H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_ assert(!(alloc_size % _fbsize)); if (posix_memalign(©_buf, _boundary, alloc_size) != 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "posix_memalign failed"); /* look for the right position for reading or writing the data */ if (HDlseek(file->fd, (HDoff_t)write_addr, SEEK_SET) < 0) @@ -1241,7 +1241,7 @@ H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_AT li.QuadPart = (LONGLONG)file->eoa; (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN); if (SetEndOfFile((HANDLE)filehandle) == 0) - HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") + HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly"); #else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 036bb4a..8d1ed48 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -179,13 +179,13 @@ H5FD__family_get_default_config(H5FD_family_fapl_t *fa_out) * would cause recursion badness in the child members. */ if (NULL == (def_plist = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if ((fa_out->memb_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list"); if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa_out->memb_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on member FAPL") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on member FAPL"); done: if (ret_value < 0 && fa_out->memb_fapl_id >= 0) { @@ -227,11 +227,11 @@ H5FD__family_get_default_printf_filename(const char *old_filename) old_filename_len = HDstrlen(old_filename); if (0 == old_filename_len) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid filename") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid filename"); new_filename_len = old_filename_len + HDstrlen(suffix) + 1; if (NULL == (tmp_buffer = H5MM_malloc(new_filename_len))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate new filename buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate new filename buffer"); /* Determine if filename contains a ".h5" extension. */ if ((file_extension = HDstrstr(old_filename, ".h5"))) { @@ -340,14 +340,14 @@ H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id) /* Check arguments */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_DEFAULT == memb_fapl_id) { /* Get default configuration for member FAPL */ if (H5FD__family_get_default_config(&fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default driver configuration info"); } else if (TRUE != H5P_isa_class(memb_fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); /* Initialize driver specific information. */ fa.memb_size = msize; @@ -355,7 +355,7 @@ H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id) fa.memb_fapl_id = memb_fapl_id; if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); ret_value = H5P_set_driver(plist, H5FD_FAMILY, &fa, NULL); done: @@ -385,16 +385,16 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /* H5TRACE3("e", "ixx", fapl_id, msize, memb_fapl_id); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_FAMILY != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (NULL == (fa = (const H5FD_family_fapl_t *)H5P_peek_driver_info(plist))) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); if (msize) *msize = fa->memb_size; if (memb_fapl_id) { if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); *memb_fapl_id = H5P_copy_plist(plist, TRUE); } /* end if */ @@ -425,11 +425,11 @@ H5FD__family_fapl_get(H5FD_t *_file) FUNC_ENTER_PACKAGE if (NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); fa->memb_size = file->memb_size; if (NULL == (plist = (H5P_genplist_t *)H5I_object(file->memb_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); fa->memb_fapl_id = H5P_copy_plist(plist, FALSE); /* Set return value */ @@ -465,7 +465,7 @@ H5FD__family_fapl_copy(const void *_old_fa) FUNC_ENTER_PACKAGE if (NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the fields of the structure */ H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t)); @@ -473,11 +473,11 @@ H5FD__family_fapl_copy(const void *_old_fa) /* Deep copy the property list objects in the structure */ if (old_fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) { if (H5I_inc_ref(new_fa->memb_fapl_id, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver"); } /* end if */ else { if (NULL == (plist = (H5P_genplist_t *)H5I_object(old_fa->memb_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); new_fa->memb_fapl_id = H5P_copy_plist(plist, FALSE); } /* end else */ @@ -512,7 +512,7 @@ H5FD__family_fapl_free(void *_fa) FUNC_ENTER_PACKAGE if (H5I_dec_ref(fa->memb_fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID"); H5MM_xfree(fa); done: @@ -622,7 +622,7 @@ H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const uns if (msize != file->pmem_size) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Family member size should be %lu. But the size from file access property is %lu", - (unsigned long)msize, (unsigned long)file->pmem_size) + (unsigned long)msize, (unsigned long)file->pmem_size); /* Update member file size to the size saved in the superblock. * That's the size intended to be. */ @@ -667,19 +667,19 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); /* Initialize file from file access properties */ if (NULL == (file = (H5FD_family_t *)H5MM_calloc(sizeof(H5FD_family_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); if (H5P_FILE_ACCESS_DEFAULT == fapl_id) { H5FD_family_fapl_t default_fa; /* Get default configuration */ if (H5FD__family_get_default_config(&default_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default driver configuration info"); file->memb_fapl_id = default_fa.memb_fapl_id; file->memb_size = H5FD_FAM_DEF_MEM_SIZE; /* Actual member size to be updated later */ @@ -694,10 +694,10 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad H5FD_family_fapl_t default_fa; if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (NULL == (fa = (const H5FD_family_fapl_t *)H5P_peek_driver_info(plist))) { if (H5FD__family_get_default_config(&default_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default family VFD configuration") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default family VFD configuration"); fa = &default_fa; default_config = TRUE; } @@ -706,7 +706,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad if (H5P_exist_plist(plist, H5F_ACS_FAMILY_NEWSIZE_NAME) > 0) { /* Get the new family file size */ if (H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &file->mem_newsize) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size"); /* Set flag for later */ file->repart_members = TRUE; @@ -714,28 +714,28 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad if (fa->memb_fapl_id == H5P_FILE_ACCESS_DEFAULT) { if (H5I_inc_ref(fa->memb_fapl_id, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, NULL, "unable to increment ref count on VFL driver"); file->memb_fapl_id = fa->memb_fapl_id; } /* end if */ else { if (NULL == (plist = (H5P_genplist_t *)H5I_object(fa->memb_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); file->memb_fapl_id = H5P_copy_plist(plist, FALSE); } /* end else */ file->memb_size = fa->memb_size; /* Actual member size to be updated later */ file->pmem_size = fa->memb_size; /* Member size passed in through property */ if (default_config && H5I_dec_ref(fa->memb_fapl_id) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, NULL, "can't decrement ref. count on member FAPL") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, NULL, "can't decrement ref. count on member FAPL"); } /* end else */ file->name = H5MM_strdup(name); file->flags = flags; /* Allocate space for the string buffers */ if (NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate member name") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate member name"); if (NULL == (temp = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate temporary member name") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate temporary member name"); /* Check that names are unique */ HDsnprintf(memb_name, H5FD_FAM_MEMB_NAME_BUF_SIZE, name, 0); @@ -744,11 +744,11 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad if (default_config) { temp = H5MM_xfree(temp); if (NULL == (temp = H5FD__family_get_default_printf_filename(name))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default printf-style filename") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get default printf-style filename"); name = temp; } else - HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file names not unique") + HGOTO_ERROR(H5E_FILE, H5E_FILEEXISTS, NULL, "file names not unique"); } /* Open all the family members */ @@ -762,7 +762,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to reallocate members"); file->amembs = n; file->memb = x; } /* end if */ @@ -780,7 +780,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad H5E_END_TRY if (!file->memb[file->nmembs]) { if (0 == file->nmembs) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open member file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open member file"); H5E_clear_stack(NULL); break; } @@ -815,7 +815,7 @@ done: if (H5FD_close(file->memb[u]) < 0) nerrors++; if (nerrors) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close member files") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close member files"); if (file->memb) H5MM_xfree(file->memb); @@ -997,7 +997,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa) /* Allocate space for the member name buffer */ if (NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate member name") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate member name"); for (u = 0; addr || u < file->nmembs; u++) { @@ -1007,7 +1007,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa) H5FD_t **x = (H5FD_t **)H5MM_realloc(file->memb, n * sizeof(H5FD_t *)); if (!x) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block"); file->amembs = n; file->memb = x; file->nmembs = u; @@ -1025,7 +1025,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa) } H5E_END_TRY if (NULL == file->memb[u]) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open member file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open member file"); } /* end if */ /* Set the EOA marker for the member */ @@ -1033,12 +1033,12 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa) H5_CHECK_OVERFLOW(file->memb_size, hsize_t, haddr_t); if (addr > (haddr_t)file->memb_size) { if (H5FD_set_eoa(file->memb[u], type, ((haddr_t)file->memb_size - file->pub.base_addr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa"); addr -= file->memb_size; } /* end if */ else { if (H5FD_set_eoa(file->memb[u], type, (addr - file->pub.base_addr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set file eoa"); addr = 0; } /* end else */ } /* end for */ @@ -1128,12 +1128,12 @@ H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get the plist structure and family offset */ if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get offset for family driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get offset for family driver"); if (offset > (file->memb_size * file->nmembs)) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "offset is bigger than file size") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "offset is bigger than file size"); memb = (int)(offset / file->memb_size); ret_value = H5FD_get_vfd_handle(file->memb[memb], fapl, file_handle); @@ -1176,7 +1176,7 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s * list does not belong to this driver then assume defaults */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Read from each member */ while (size > 0) { @@ -1195,7 +1195,7 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s 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") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed"); addr += req; buf += req; @@ -1238,7 +1238,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, * list does not belong to this driver then assume defaults. */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Write to each member */ while (size > 0) { @@ -1257,7 +1257,7 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, 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") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "member file write failed"); addr += req; buf += req; @@ -1292,7 +1292,7 @@ H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) nerrors++; if (nerrors) - HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files") + HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1323,7 +1323,7 @@ H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closi nerrors++; if (nerrors) - HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files") + HGOTO_ERROR(H5E_IO, H5E_BADVALUE, FAIL, "unable to flush member files"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1367,7 +1367,7 @@ H5FD__family_lock(H5FD_t *_file, hbool_t rw) /* Push error, but keep going */ HDONE_ERROR(H5E_IO, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock member files"); } /* end for */ - HGOTO_ERROR(H5E_IO, H5E_CANTLOCKFILE, FAIL, "unable to lock member files") + HGOTO_ERROR(H5E_IO, H5E_CANTLOCKFILE, FAIL, "unable to lock member files"); } /* end if */ done: @@ -1396,7 +1396,7 @@ H5FD__family_unlock(H5FD_t *_file) for (u = 0; u < file->nmembs; u++) if (file->memb[u]) if (H5FD_unlock(file->memb[u]) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock member files") + HGOTO_ERROR(H5E_IO, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock member files"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1434,16 +1434,16 @@ H5FD__family_delete(const char *filename, hid_t fapl_id) */ if (H5P_FILE_ACCESS_DEFAULT == fapl_id) { if (H5FD__family_get_default_config(&default_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration"); memb_fapl_id = default_fa.memb_fapl_id; default_config = TRUE; } else { if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (NULL == (fa = (const H5FD_family_fapl_t *)H5P_peek_driver_info(plist))) { if (H5FD__family_get_default_config(&default_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default family VFD configuration"); fa = &default_fa; default_config = TRUE; } @@ -1452,9 +1452,9 @@ H5FD__family_delete(const char *filename, hid_t fapl_id) /* Allocate space for the string buffers */ if (NULL == (member_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate member name") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate member name"); if (NULL == (temp = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate temporary member name") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate temporary member name"); /* Sanity check to make sure that generated names are unique */ H5_GCC_CLANG_DIAG_OFF("format-nonliteral") @@ -1466,12 +1466,12 @@ H5FD__family_delete(const char *filename, hid_t fapl_id) if (default_config) { temp = H5MM_xfree(temp); if (NULL == (temp = H5FD__family_get_default_printf_filename(filename))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default printf-style filename") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get default printf-style filename"); filename = temp; } else HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, - "provided file name cannot generate unique sub-files") + "provided file name cannot generate unique sub-files"); } /* Delete all the family members */ @@ -1496,7 +1496,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id) H5E_END_TRY if (FAIL == delete_error) { if (0 == current_member) - HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete member file") + HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete member file"); else H5E_clear_stack(NULL); break; diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 61cbea7..7dcd194 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -402,17 +402,17 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_ #endif if (path == NULL || path[0] == '\0') - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "path cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "path cannot be null"); if (namenode_name == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode name cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode name cannot be null"); if (namenode_port < 0 || namenode_port > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode port must be non-negative and <= 65535") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode port must be non-negative and <= 65535"); if (stream_buffer_size < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "buffer size must non-negative") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "buffer size must non-negative"); handle = (hdfs_t *)H5MM_malloc(sizeof(hdfs_t)); if (handle == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle") + HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle"); handle->magic = (unsigned long)HDFS_HDFST_MAGIC; handle->filesystem = NULL; /* TODO: not a pointer; NULL may cause bug */ @@ -421,7 +421,7 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_ builder = hdfsNewBuilder(); if (!builder) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) failed to create builder") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) failed to create builder"); hdfsBuilderSetNameNode(builder, namenode_name); hdfsBuilderSetNameNodePort(builder, (tPort)namenode_port); if (user_name != NULL && user_name[0] != '\0') @@ -432,13 +432,13 @@ H5FD__hdfs_handle_open(const char *path, const char *namenode_name, const int32_ /* Call to `hdfsBuilderConnect` releases builder, regardless of success. */ handle->filesystem = hdfsBuilderConnect(builder); if (!handle->filesystem) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) could not connect to default namenode") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) could not connect to default namenode"); handle->fileinfo = hdfsGetPathInfo(handle->filesystem, path); if (!handle->fileinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "hdfsGetPathInfo failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "hdfsGetPathInfo failed"); handle->file = hdfsOpenFile(handle->filesystem, path, O_RDONLY, stream_buffer_size, 0, 0); if (!handle->file) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "(hdfs) could not open") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "(hdfs) could not open"); ret_value = handle; @@ -484,9 +484,9 @@ H5FD__hdfs_handle_close(hdfs_t *handle) #endif if (handle == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null"); if (handle->magic != HDFS_HDFST_MAGIC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic"); handle->magic++; if (handle->file != NULL) @@ -570,9 +570,9 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa) plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); if (plist == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (FAIL == H5FD__hdfs_validate_config(fa)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid hdfs config") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid hdfs config"); ret_value = H5P_set_driver(plist, H5FD_HDFS, (void *)fa, NULL); @@ -607,17 +607,17 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/) #endif if (fa_dst == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst ptr is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst ptr is NULL"); plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); if (plist == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_HDFS != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); fa_src = (const H5FD_hdfs_fapl_t *)H5P_peek_driver_info(plist); if (fa_src == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); /* Copy the hdfs fapl data out */ H5MM_memcpy(fa_dst, fa_src, sizeof(H5FD_hdfs_fapl_t)); @@ -649,7 +649,7 @@ H5FD__hdfs_fapl_get(H5FD_t *_file) fa = (H5FD_hdfs_fapl_t *)H5MM_calloc(sizeof(H5FD_hdfs_fapl_t)); if (fa == NULL) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Copy the fields of the structure */ H5MM_memcpy(fa, &(file->fa), sizeof(H5FD_hdfs_fapl_t)); @@ -685,7 +685,7 @@ H5FD__hdfs_fapl_copy(const void *_old_fa) new_fa = (H5FD_hdfs_fapl_t *)H5MM_malloc(sizeof(H5FD_hdfs_fapl_t)); if (new_fa == NULL) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed"); H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_hdfs_fapl_t)); ret_value = new_fa; @@ -752,7 +752,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file) #endif if (file == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null"); for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) { file->raw[i].bytes = 0; @@ -811,35 +811,35 @@ H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!path || !*path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); if (flags != H5F_ACC_RDONLY) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed"); if (fapl_id == H5P_DEFAULT || fapl_id == H5P_FILE_ACCESS_DEFAULT) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "fapl cannot be H5P_DEFAULT") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "fapl cannot be H5P_DEFAULT"); if (FAIL == H5Pget_fapl_hdfs(fapl_id, &fa)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list"); handle = H5FD__hdfs_handle_open(path, fa.namenode_name, fa.namenode_port, fa.user_name, fa.kerberos_ticket_cache, fa.stream_buffer_size); if (handle == NULL) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open"); assert(handle->magic == HDFS_HDFST_MAGIC); /* Create new file struct */ file = H5FL_CALLOC(H5FD_hdfs_t); if (file == NULL) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct"); file->hdfs_handle = handle; H5MM_memcpy(&(file->fa), &fa, sizeof(H5FD_hdfs_fapl_t)); #if HDFS_STATS if (FAIL == hdfs__reset_stats(file)) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics"); #endif /* HDFS_STATS */ ret_value = (H5FD_t *)file; @@ -933,13 +933,13 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file) FUNC_ENTER_PACKAGE if (stream == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null"); if (file == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null"); if (file->hdfs_handle == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle cannot be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle cannot be null"); if (file->hdfs_handle->magic != HDFS_HDFST_MAGIC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle has invalid magic") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle has invalid magic"); /******************* * AGGREGATE STATS * @@ -1147,12 +1147,12 @@ H5FD__hdfs_close(H5FD_t *_file) /* Close the underlying request handle */ if (file->hdfs_handle != NULL) if (FAIL == H5FD__hdfs_handle_close(file->hdfs_handle)) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close HDFS file handle") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close HDFS file handle"); #if HDFS_STATS /* TODO: mechanism to re-target stats printout */ if (FAIL == hdfs__fprint_stats(stdout, file)) - HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics") + HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics"); #endif /* HDFS_STATS */ /* Release the file info */ @@ -1389,7 +1389,7 @@ H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand #endif /* HDFS_DEBUG */ if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = file->hdfs_handle; @@ -1443,11 +1443,11 @@ H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU filesize = (size_t)file->hdfs_handle->fileinfo->mSize; if ((addr > filesize) || ((addr + size) > filesize)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address"); if (FAIL == hdfsPread(file->hdfs_handle->filesystem, file->hdfs_handle->file, (tOffset)addr, buf, (tSize)size)) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read"); #if HDFS_STATS @@ -1504,7 +1504,7 @@ H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h fprintf(stdout, "called %s.\n", __func__); #endif - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1539,7 +1539,7 @@ H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, fprintf(stdout, "called %s.\n", __func__); #endif - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDint.c b/src/H5FDint.c index d202a94..65b1424 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -164,7 +164,7 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr) eoa = H5FD_get_eoa(file, H5FD_MEM_SUPER); addr = MAX(eof, eoa); if (HADDR_UNDEF == addr) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to obtain EOF/EOA value"); for (maxpow = 0; addr; maxpow++) addr >>= 1; maxpow = MAX(maxpow, 9); @@ -175,9 +175,9 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr) for (n = 8; n < maxpow; n++) { addr = (8 == n) ? 0 : (haddr_t)1 << n; if (H5FD_set_eoa(file, H5FD_MEM_SUPER, addr + H5F_SIGNATURE_LEN) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to set EOA value for file signature") + 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") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to read file signature"); if (!memcmp(buf, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) break; } @@ -187,7 +187,7 @@ H5FD_locate_signature(H5FD_t *file, haddr_t *sig_addr) */ if (n >= maxpow) { if (H5FD_set_eoa(file, H5FD_MEM_SUPER, eoa) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to reset EOA value") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to reset EOA value"); *sig_addr = HADDR_UNDEF; } else @@ -243,17 +243,17 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /* haddr_t eoa; if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); if ((addr + file->base_addr + size) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu, eoa = %llu", (unsigned long long)(addr + file->base_addr), (unsigned long long)size, - (unsigned long long)eoa) + (unsigned long long)eoa); } /* Dispatch to driver */ if ((file->cls->read)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -296,15 +296,15 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void #endif /* H5_HAVE_PARALLEL */ if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); if ((addr + file->base_addr + size) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size=%llu, eoa=%llu", (unsigned long long)(addr + file->base_addr), (unsigned long long)size, - (unsigned long long)eoa) + (unsigned long long)eoa); /* Dispatch to driver */ if ((file->cls->write)(file, type, dxpl_id, addr + file->base_addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -443,14 +443,14 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs } if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); if ((addrs[i] + size) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addrs[%d] = %llu, sizes[%d] = %llu, eoa = %llu", (int)i, (unsigned long long)(addrs[i]), (int)i, (unsigned long long)size, - (unsigned long long)eoa) + (unsigned long long)eoa); } } @@ -459,7 +459,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs if ((file->cls->read_vector)(file, dxpl_id, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read vector request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read vector request failed"); } else { @@ -503,7 +503,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs } if ((file->cls->read)(file, type, dxpl_id, addrs[i], size, bufs[i]) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed"); } /* Add H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB to no selection I/O cause */ @@ -649,14 +649,14 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); if ((addrs[i] + size) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addrs[%d] = %llu, sizes[%d] = %llu, \ eoa = %llu", (int)i, (unsigned long long)(addrs[i]), (int)i, (unsigned long long)size, - (unsigned long long)eoa) + (unsigned long long)eoa); } /* if the underlying VFD supports vector write, make the call */ @@ -664,7 +664,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr if ((file->cls->write_vector)(file, dxpl_id, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write vector request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write vector request failed"); } else { /* otherwise, implement the vector write as a sequence of regular @@ -707,7 +707,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr } if ((file->cls->write)(file, type, dxpl_id, addrs[i], size, bufs[i]) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver write request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver write request failed"); } /* Add H5D_SEL_IO_NO_VECTOR_OR_SELECTION_IO_CB to no selection I/O cause */ @@ -807,9 +807,9 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Allocate sequence lists for memory and file spaces */ if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate file selection iterator") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate file selection iterator"); if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate memory selection iterator") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate memory selection iterator"); } /* Loop over dataspaces */ @@ -846,22 +846,22 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Initialize sequence lists for memory and file spaces */ if (H5S_select_iter_init(file_iter, file_spaces[i], element_size, 0) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space"); file_iter_init = TRUE; if (H5S_select_iter_init(mem_iter, mem_spaces[i], element_size, 0) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space"); mem_iter_init = TRUE; /* Get the number of elements in selection */ if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(file_spaces[i])) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); H5_CHECKED_ASSIGN(nelmts, size_t, hss_nelmts, hssize_t); #ifndef NDEBUG /* Verify mem space has the same number of elements */ { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); assert((hssize_t)nelmts == hss_nelmts); } #endif /* NDEBUG */ @@ -879,7 +879,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin if (file_seq_i == H5FD_SEQ_LIST_LEN) { 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") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); assert(file_nseq > 0); nelmts -= seq_nelem; @@ -891,7 +891,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin 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") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); assert(mem_nseq > 0); mem_seq_i = 0; @@ -913,13 +913,13 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Allocate dynamic arrays */ if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for address list") + "memory allocation failed for address list"); if (NULL == (sizes = H5MM_malloc(sizeof(sizes_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for size list") + "memory allocation failed for size list"); if (NULL == (vec_bufs = H5MM_malloc(sizeof(vec_bufs_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for buffer list") + "memory allocation failed for buffer list"); /* Copy the existing data */ (void)H5MM_memcpy(addrs, addrs_local, sizeof(addrs_local)); @@ -932,16 +932,16 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Reallocate arrays */ if (NULL == (tmp_ptr = H5MM_realloc(addrs, vec_arr_nalloc * sizeof(*addrs) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for address list") + "memory reallocation failed for address list"); addrs = tmp_ptr; if (NULL == (tmp_ptr = H5MM_realloc(sizes, vec_arr_nalloc * sizeof(*sizes) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for size list") + "memory reallocation failed for size list"); sizes = tmp_ptr; if (NULL == (tmp_ptr = H5MM_realloc(vec_bufs, vec_arr_nalloc * sizeof(*vec_bufs) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for buffer list") + "memory reallocation failed for buffer list"); vec_bufs = tmp_ptr; } @@ -959,7 +959,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Issue scalar read call */ if ((file->cls->read)(file, type, dxpl_id, offsets[i] + file_off[file_seq_i], io_len, (void *)((uint8_t *)buf + mem_off[mem_seq_i])) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read request failed"); /* Update file sequence */ if (io_len == file_len[file_seq_i]) @@ -980,14 +980,15 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin /* Make sure both memory and file sequences terminated at the same time */ if (mem_seq_i < mem_nseq) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "file selection terminated before memory selection") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, + "file selection terminated before memory selection"); /* Terminate iterators */ if (H5S_SELECT_ITER_RELEASE(file_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator"); file_iter_init = FALSE; if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator"); mem_iter_init = FALSE; } @@ -996,7 +997,7 @@ H5FD__read_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, uin H5_CHECK_OVERFLOW(vec_arr_nused, size_t, uint32_t); if ((file->cls->read_vector)(file, dxpl_id, (uint32_t)vec_arr_nused, types, addrs, sizes, vec_bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read vector request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read vector request failed"); } else { uint32_t no_selection_io_cause; @@ -1011,12 +1012,12 @@ done: /* Terminate and free iterators */ if (file_iter) { if (file_iter_init && H5S_SELECT_ITER_RELEASE(file_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator"); file_iter = H5FL_FREE(H5S_sel_iter_t, file_iter); } if (mem_iter) { if (mem_iter_init && H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator"); mem_iter = H5FL_FREE(H5S_sel_iter_t, mem_iter); } @@ -1145,14 +1146,14 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s haddr_t eoa; if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); for (i = 0; i < count; i++) { if ((offsets[i]) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, offsets[%d] = %llu, eoa = %llu", - (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa) + (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa); } } @@ -1162,27 +1163,27 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s * buffers */ if (count > sizeof(mem_space_ids_local) / sizeof(mem_space_ids_local[0])) { if (NULL == (mem_space_ids = H5MM_malloc(count * sizeof(hid_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); if (NULL == (file_space_ids = H5MM_malloc(count * sizeof(hid_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); } /* Create IDs for all dataspaces */ for (; num_spaces < count; num_spaces++) { if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], TRUE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], TRUE)) < 0) { if (NULL == H5I_remove(mem_space_ids[num_spaces])) HDONE_ERROR(H5E_VFL, H5E_CANTREMOVE, FAIL, "problem removing id"); - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } } if ((file->cls->read_selection)(file, type, dxpl_id, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read selection request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read selection request failed"); } else /* Otherwise, implement the selection read as a sequence of regular @@ -1190,7 +1191,7 @@ H5FD_read_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_s */ if (H5FD__read_selection_translate(file, type, dxpl_id, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "translation to vector or scalar read failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "translation to vector or scalar read failed"); done: /* undo the base addr offset to the offsets array if necessary */ @@ -1307,14 +1308,14 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_ haddr_t eoa; if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); for (i = 0; i < count; i++) { if ((offsets[i]) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, offsets[%d] = %llu, eoa = %llu", - (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa) + (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa); } } @@ -1322,7 +1323,7 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_ if (file->cls->read_selection) { if ((file->cls->read_selection)(file, type, dxpl_id, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read selection request failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "driver read selection request failed"); } else { /* Otherwise, implement the selection read as a sequence of regular @@ -1333,23 +1334,23 @@ H5FD_read_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem_ * buffers */ if (count > sizeof(mem_spaces_local) / sizeof(mem_spaces_local[0])) { if (NULL == (mem_spaces = H5MM_malloc(count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); if (NULL == (file_spaces = H5MM_malloc(count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); } /* Get object pointers for all dataspaces */ for (i = 0; i < count; i++) { if (NULL == (mem_spaces[i] = (H5S_t *)H5I_object_verify(mem_space_ids[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve memory dataspace from ID") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve memory dataspace from ID"); if (NULL == (file_spaces[i] = (H5S_t *)H5I_object_verify(file_space_ids[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve file dataspace from ID") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve file dataspace from ID"); } /* Translate to vector or scalar I/O */ if (H5FD__read_selection_translate(file, type, dxpl_id, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "translation to vector or scalar read failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "translation to vector or scalar read failed"); } done: @@ -1448,9 +1449,9 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Allocate sequence lists for memory and file spaces */ if (NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate file selection iterator") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate file selection iterator"); if (NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate memory selection iterator") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "couldn't allocate memory selection iterator"); } /* Loop over dataspaces */ @@ -1487,22 +1488,22 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Initialize sequence lists for memory and file spaces */ if (H5S_select_iter_init(file_iter, file_spaces[i], element_size, 0) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for file space"); file_iter_init = TRUE; if (H5S_select_iter_init(mem_iter, mem_spaces[i], element_size, 0) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize sequence list for memory space"); mem_iter_init = TRUE; /* Get the number of elements in selection */ if ((hss_nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(file_spaces[i])) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); H5_CHECKED_ASSIGN(nelmts, size_t, hss_nelmts, hssize_t); #ifndef NDEBUG /* Verify mem space has the same number of elements */ { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); assert((hssize_t)nelmts == hss_nelmts); } #endif /* NDEBUG */ @@ -1520,7 +1521,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui if (file_seq_i == H5FD_SEQ_LIST_LEN) { 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") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); assert(file_nseq > 0); nelmts -= seq_nelem; @@ -1532,7 +1533,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui 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") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); assert(mem_nseq > 0); mem_seq_i = 0; @@ -1554,13 +1555,13 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Allocate dynamic arrays */ if (NULL == (addrs = H5MM_malloc(sizeof(addrs_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for address list") + "memory allocation failed for address list"); if (NULL == (sizes = H5MM_malloc(sizeof(sizes_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for size list") + "memory allocation failed for size list"); if (NULL == (vec_bufs = H5MM_malloc(sizeof(vec_bufs_local) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for buffer list") + "memory allocation failed for buffer list"); /* Copy the existing data */ (void)H5MM_memcpy(addrs, addrs_local, sizeof(addrs_local)); @@ -1573,16 +1574,16 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Reallocate arrays */ if (NULL == (tmp_ptr = H5MM_realloc(addrs, vec_arr_nalloc * sizeof(*addrs) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for address list") + "memory reallocation failed for address list"); addrs = tmp_ptr; if (NULL == (tmp_ptr = H5MM_realloc(sizes, vec_arr_nalloc * sizeof(*sizes) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for size list") + "memory reallocation failed for size list"); sizes = tmp_ptr; if (NULL == (tmp_ptr = H5MM_realloc(vec_bufs, vec_arr_nalloc * sizeof(*vec_bufs) * 2))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory reallocation failed for buffer list") + "memory reallocation failed for buffer list"); vec_bufs = tmp_ptr; } @@ -1600,7 +1601,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Issue scalar write call */ if ((file->cls->write)(file, type, dxpl_id, offsets[i] + file_off[file_seq_i], io_len, (const void *)((const uint8_t *)buf + mem_off[mem_seq_i])) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write request failed"); /* Update file sequence */ if (io_len == file_len[file_seq_i]) @@ -1621,14 +1622,15 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui /* Make sure both memory and file sequences terminated at the same time */ if (mem_seq_i < mem_nseq) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "file selection terminated before memory selection") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, + "file selection terminated before memory selection"); /* Terminate iterators */ if (H5S_SELECT_ITER_RELEASE(file_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator"); file_iter_init = FALSE; if (H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator"); mem_iter_init = FALSE; } @@ -1637,7 +1639,7 @@ H5FD__write_selection_translate(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, ui H5_CHECK_OVERFLOW(vec_arr_nused, size_t, uint32_t); if ((file->cls->write_vector)(file, dxpl_id, (uint32_t)vec_arr_nused, types, addrs, sizes, vec_bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write vector request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write vector request failed"); } else { uint32_t no_selection_io_cause; @@ -1652,12 +1654,12 @@ done: /* Terminate and free iterators */ if (file_iter) { if (file_iter_init && H5S_SELECT_ITER_RELEASE(file_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release file selection iterator"); file_iter = H5FL_FREE(H5S_sel_iter_t, file_iter); } if (mem_iter) { if (mem_iter_init && H5S_SELECT_ITER_RELEASE(mem_iter) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "can't release memory selection iterator"); mem_iter = H5FL_FREE(H5S_sel_iter_t, mem_iter); } @@ -1778,14 +1780,14 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_ haddr_t eoa; if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); for (i = 0; i < count; i++) { if ((offsets[i]) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, offsets[%d] = %llu, eoa = %llu", - (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa) + (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa); } } @@ -1795,27 +1797,27 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_ * buffers */ if (count > sizeof(mem_space_ids_local) / sizeof(mem_space_ids_local[0])) { if (NULL == (mem_space_ids = H5MM_malloc(count * sizeof(hid_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); if (NULL == (file_space_ids = H5MM_malloc(count * sizeof(hid_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); } /* Create IDs for all dataspaces */ for (; num_spaces < count; num_spaces++) { if ((mem_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, mem_spaces[num_spaces], TRUE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); if ((file_space_ids[num_spaces] = H5I_register(H5I_DATASPACE, file_spaces[num_spaces], TRUE)) < 0) { if (NULL == H5I_remove(mem_space_ids[num_spaces])) HDONE_ERROR(H5E_VFL, H5E_CANTREMOVE, FAIL, "problem removing id"); - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } } if ((file->cls->write_selection)(file, type, dxpl_id, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write selection request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write selection request failed"); } else /* Otherwise, implement the selection write as a sequence of regular @@ -1823,7 +1825,7 @@ H5FD_write_selection(H5FD_t *file, H5FD_mem_t type, uint32_t count, H5S_t **mem_ */ if (H5FD__write_selection_translate(file, type, dxpl_id, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "translation to vector or scalar write failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "translation to vector or scalar write failed"); done: /* undo the base addr offset to the offsets array if necessary */ @@ -1931,14 +1933,14 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem haddr_t eoa; if (HADDR_UNDEF == (eoa = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver get_eoa request failed"); for (i = 0; i < count; i++) { if ((offsets[i]) > eoa) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, offsets[%d] = %llu, eoa = %llu", - (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa) + (int)i, (unsigned long long)(offsets[i]), (unsigned long long)eoa); } } @@ -1946,7 +1948,7 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem if (file->cls->write_selection) { if ((file->cls->write_selection)(file, type, dxpl_id, count, mem_space_ids, file_space_ids, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write selection request failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "driver write selection request failed"); } else { /* Otherwise, implement the selection write as a sequence of regular @@ -1957,23 +1959,23 @@ H5FD_write_selection_id(H5FD_t *file, H5FD_mem_t type, uint32_t count, hid_t mem * buffers */ if (count > sizeof(mem_spaces_local) / sizeof(mem_spaces_local[0])) { if (NULL == (mem_spaces = H5MM_malloc(count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); if (NULL == (file_spaces = H5MM_malloc(count * sizeof(H5S_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed for dataspace list"); } /* Get object pointers for all dataspaces */ for (i = 0; i < count; i++) { if (NULL == (mem_spaces[i] = (H5S_t *)H5I_object_verify(mem_space_ids[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve memory dataspace from ID") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve memory dataspace from ID"); if (NULL == (file_spaces[i] = (H5S_t *)H5I_object_verify(file_space_ids[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve file dataspace from ID") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve file dataspace from ID"); } /* Translate to vector or scalar I/O */ if (H5FD__write_selection_translate(file, type, dxpl_id, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "translation to vector or scalar write failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "translation to vector or scalar write failed"); } done: @@ -2023,7 +2025,7 @@ H5FD_set_eoa(H5FD_t *file, H5FD_mem_t type, haddr_t addr) /* Dispatch to driver, convert to absolute address */ if ((file->cls->set_eoa)(file, type, addr + file->base_addr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver set_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver set_eoa request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2056,7 +2058,7 @@ H5FD_get_eoa(const H5FD_t *file, H5FD_mem_t type) /* Dispatch to driver */ if (HADDR_UNDEF == (ret_value = (file->cls->get_eoa)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed"); /* Adjust for base address in file (convert to relative address) */ ret_value -= file->base_addr; @@ -2093,7 +2095,7 @@ H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type) /* Dispatch to driver */ if (file->cls->get_eof) { if (HADDR_UNDEF == (ret_value = (file->cls->get_eof)(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "driver get_eof request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "driver get_eof request failed"); } else ret_value = file->maxaddr; @@ -2229,7 +2231,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t if (H5_addr_gt(addrs[i - 1], addrs[i])) break; else if (H5_addr_eq(addrs[i - 1], addrs[i])) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector"); } /* if we traversed the entire array without breaking out, then @@ -2269,7 +2271,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t if (NULL == (srt_tmp = (H5FD_vsrt_tmp_t *)malloc(srt_tmp_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc srt_tmp") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc srt_tmp"); for (i = 0; i < count; i++) { srt_tmp[i].addr = addrs[i]; @@ -2286,7 +2288,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t assert(H5_addr_lt(srt_tmp[i - 1].addr, srt_tmp[i].addr)); if (H5_addr_eq(addrs[i - 1], addrs[i])) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "duplicate addr in vector"); } if ((NULL == (*s_types_ptr = (H5FD_mem_t *)malloc(count * sizeof(H5FD_mem_t)))) || @@ -2295,7 +2297,7 @@ H5FD_sort_vector_io_req(hbool_t *vector_was_sorted, uint32_t _count, H5FD_mem_t (NULL == (*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)") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sorted vector(s)"); } assert(sizes[0] != 0); @@ -2401,21 +2403,21 @@ H5FD_delete(const char *filename, hid_t fapl_id) /* Get file access property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Get the VFD to open the file with */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info"); /* Get driver info */ if (NULL == (driver = (H5FD_class_t *)H5I_object(driver_prop.driver_id))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver ID in file access property list") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver ID in file access property list"); if (NULL == driver->del) - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no 'del' method") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "file driver has no 'del' method"); /* Dispatch to file driver */ if ((driver->del)(filename, fapl_id)) - HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "delete failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "delete failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2529,14 +2531,14 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref) /* Check if driver is already registered */ if ((driver_is_registered = H5FD_is_driver_registered_by_name(name, &driver_id)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't check if driver is already registered") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't check if driver is already registered"); /* If driver is already registered, increment ref count on ID and return ID */ if (driver_is_registered) { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD"); } /* end if */ else { H5PL_key_t key; @@ -2546,11 +2548,11 @@ H5FD_register_driver_by_name(const char *name, hbool_t app_ref) key.vfd.kind = H5FD_GET_DRIVER_BY_NAME; key.vfd.u.name = name; if (NULL == (cls = (const H5FD_class_t *)H5PL_load(H5PL_TYPE_VFD, &key))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VFD") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VFD"); /* Register the driver we loaded */ if ((driver_id = H5FD_register(cls, sizeof(*cls), app_ref)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VFD ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VFD ID"); } /* end else */ ret_value = driver_id; @@ -2583,14 +2585,14 @@ H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref) /* Check if driver is already registered */ if ((driver_is_registered = H5FD_is_driver_registered_by_value(value, &driver_id)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't check if driver is already registered") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't check if driver is already registered"); /* If driver is already registered, increment ref count on ID and return ID */ if (driver_is_registered) { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFD"); } /* end if */ else { H5PL_key_t key; @@ -2600,11 +2602,11 @@ H5FD_register_driver_by_value(H5FD_class_value_t value, hbool_t app_ref) key.vfd.kind = H5FD_GET_DRIVER_BY_VALUE; key.vfd.u.value = value; if (NULL == (cls = (const H5FD_class_t *)H5PL_load(H5PL_TYPE_VFD, &key))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VFD") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VFD"); /* Register the driver we loaded */ if ((driver_id = H5FD_register(cls, sizeof(*cls), app_ref)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VFD ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VFD ID"); } /* end else */ ret_value = driver_id; @@ -2642,7 +2644,7 @@ H5FD_is_driver_registered_by_name(const char *driver_name, hid_t *registered_id) /* Find driver with name */ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs"); /* Found a driver with that name */ if (op_data.found_id != H5I_INVALID_HID) { @@ -2684,7 +2686,7 @@ H5FD_is_driver_registered_by_value(H5FD_class_value_t driver_value, hid_t *regis /* Find driver with value */ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, FAIL, "can't iterate over VFDs"); /* Found a driver with that value */ if (op_data.found_id != H5I_INVALID_HID) { @@ -2723,13 +2725,13 @@ H5FD_get_driver_id_by_name(const char *name, hbool_t is_api) /* Find driver with specified name */ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers"); /* Found a driver with that name */ if (op_data.found_id != H5I_INVALID_HID) { ret_value = op_data.found_id; if (H5I_inc_ref(ret_value, is_api) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFL driver"); } done: @@ -2762,13 +2764,13 @@ H5FD_get_driver_id_by_value(H5FD_class_value_t value, hbool_t is_api) /* Find driver with specified value */ if (H5I_iterate(H5I_VFL, H5FD__get_driver_cb, &op_data, FALSE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers") + HGOTO_ERROR(H5E_VFL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VFL drivers"); /* Found a driver with that value */ if (op_data.found_id != H5I_INVALID_HID) { ret_value = op_data.found_id; if (H5I_inc_ref(ret_value, is_api) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VFL driver"); } done: diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 2f86609..660f266 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -308,7 +308,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si /* Check arguments */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Duplicate the log file string * A little wasteful, since this string will just be copied later, but @@ -316,7 +316,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si * const cast warnings. */ if (logfile != NULL && NULL == (fa.logfile = H5MM_xstrdup(logfile))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to copy log file name") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to copy log file name"); fa.flags = flags; fa.buf_size = buf_size; @@ -379,7 +379,7 @@ H5FD__log_fapl_copy(const void *_old_fa) /* Allocate the new FAPL info */ if (NULL == (new_fa = (H5FD_log_fapl_t *)H5MM_calloc(sizeof(H5FD_log_fapl_t)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL"); /* Copy the general information */ H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_log_fapl_t)); @@ -387,7 +387,7 @@ H5FD__log_fapl_copy(const void *_old_fa) /* Deep copy the log file name */ if (old_fa->logfile != NULL) if (NULL == (new_fa->logfile = H5MM_strdup(old_fa->logfile))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate log file name") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate log file name"); /* Set return value */ ret_value = new_fa; @@ -463,11 +463,11 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); /* Initialize timers */ H5_timer_init(&open_timer); @@ -484,7 +484,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* Get the driver specific information */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (NULL == (fa = (const H5FD_log_fapl_t *)H5P_peek_driver_info(plist))) { /* Use default driver configuration*/ fa = &default_fa; @@ -522,7 +522,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* Create the new file struct */ if (NULL == (file = H5FL_CALLOC(H5FD_log_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); file->fd = fd; H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t); @@ -531,10 +531,10 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) #ifdef H5_HAVE_WIN32_API file->hFile = (HANDLE)_get_osfhandle(fd); if (INVALID_HANDLE_VALUE == file->hFile) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle"); if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information"); file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; @@ -601,7 +601,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) else { /* Use the value in the property list */ if (H5P_get(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, &file->ignore_disabled_file_locks) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property"); } /* Check for non-default FAPL */ @@ -613,7 +613,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) */ if (H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SINGLE_NAME) > 0) if (H5P_get(plist, H5F_ACS_FAMILY_TO_SINGLE_NAME, &file->fam_to_single) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to single") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to single"); } /* Set return value */ @@ -1089,7 +1089,7 @@ H5FD__log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handl FUNC_ENTER_PACKAGE if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = &(file->fd); @@ -1132,9 +1132,9 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Check for overflow conditions */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr); /* Log the I/O information about the read */ if (file->fa.flags != 0) { @@ -1352,10 +1352,10 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha /* Check for overflow conditions */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr); if (REGION_OVERFLOW(addr, size)) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu", - (unsigned long long)addr, (unsigned long long)size) + (unsigned long long)addr, (unsigned long long)size); /* Log the I/O information about the write */ if (file->fa.flags & H5FD_LOG_FILE_WRITE) { @@ -1578,11 +1578,11 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ dwError = GetLastError(); if (dwError != NO_ERROR) - HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer") + HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer"); } if (0 == SetEndOfFile(file->hFile)) - HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") + HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly"); } #else /* H5_HAVE_WIN32_API */ /* Truncate/extend the file */ diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c index d2c0416..9b5f4e8 100644 --- a/src/H5FDmpi.c +++ b/src/H5FDmpi.c @@ -53,7 +53,7 @@ H5FD_mpi_get_rank(H5FD_t *file) /* 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_rank request failed"); assert(rank >= 0); @@ -92,10 +92,10 @@ H5FD_mpi_get_size(H5FD_t *file) /* Dispatch to driver */ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_SIZE_OPCODE, flags, NULL, &size_ptr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request failed"); if (0 >= size) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request returned bad value") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_size request returned bad value"); ret_value = size; @@ -132,10 +132,10 @@ H5FD_mpi_get_comm(H5FD_t *file) /* Dispatch to driver */ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_COMMUNICATOR_OPCODE, flags, NULL, &comm_ptr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed"); if (comm == MPI_COMM_NULL) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed -- bad comm") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed -- bad comm"); ret_value = comm; @@ -230,7 +230,7 @@ H5FD_mpi_get_file_sync_required(H5FD_t *file, hbool_t *file_sync_required) /* Dispatch to driver */ if ((cls->ctl)(file, H5FD_CTL_GET_MPI_FILE_SYNC_OPCODE, flags, NULL, file_sync_required_ptr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_mpi_file_synce request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_mpi_file_synce request failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index e4a78b9..a76b183 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -268,10 +268,10 @@ H5FD_mpio_init(void) /* Initialize MPI if not already initialized */ if (MPI_SUCCESS != MPI_Initialized(&mpi_initialized)) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, H5I_INVALID_HID, "can't check if MPI is initialized") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, H5I_INVALID_HID, "can't check if MPI is initialized"); if (!mpi_initialized) { if (MPI_SUCCESS != MPI_Init(NULL, NULL)) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't initialize MPI") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, H5I_INVALID_HID, "can't initialize MPI"); H5FD_mpi_self_initialized = TRUE; } } @@ -375,17 +375,17 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) /* Check arguments */ if (fapl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); if (MPI_COMM_NULL == comm) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "MPI_COMM_NULL is not a valid communicator") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "MPI_COMM_NULL is not a valid communicator"); /* Set the MPI communicator and info object */ if (H5P_set(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI communicator"); if (H5P_set(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI info object"); /* duplication is done during driver setting. */ ret_value = H5P_set_driver(plist, H5FD_MPIO, NULL, NULL); @@ -431,17 +431,17 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/) /* Check arguments */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_MPIO != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "VFL driver is not MPI-I/O") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "VFL driver is not MPI-I/O"); /* Get the MPI communicator and info object */ if (comm) if (H5P_get(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI communicator"); if (info) if (H5P_get(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI info object"); done: /* Clean up anything duplicated on errors. The free calls will set @@ -489,15 +489,15 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); if (H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode"); /* Set the transfer mode */ if (H5P_set(plist, H5D_XFER_IO_XFER_MODE_NAME, &xfer_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -527,12 +527,12 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/) /* Check arguments */ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Get the transfer mode */ if (xfer_mode) if (H5P_get(plist, H5D_XFER_IO_XFER_MODE_NAME, xfer_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -565,13 +565,13 @@ H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mo /* Check arguments */ if (dxpl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the transfer mode */ if (H5P_set(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, &opt_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -604,13 +604,13 @@ H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the transfer mode */ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, &opt_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -641,13 +641,13 @@ H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc) /* Check arguments */ if (dxpl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the transfer mode */ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, &num_chunk_per_proc) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -681,13 +681,13 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch /* Check arguments */ if (dxpl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the transfer mode */ if (H5P_set(plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, &percent_num_proc_per_chunk) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -816,7 +816,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR /* Get a pointer to the fapl */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (H5FD_mpi_self_initialized) { comm = MPI_COMM_WORLD; @@ -824,9 +824,9 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR else { /* Get the MPI communicator and info object from the property list */ if (H5P_get(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get MPI communicator") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get MPI communicator"); if (H5P_get(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get MPI info object") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get MPI info object"); } /* Get the MPI rank of this process and the total number of processes */ @@ -912,12 +912,12 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR } /* Add info to the file access property list */ if (H5P_set(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't set MPI info object") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't set MPI info object"); } /* Build the return value and initialize it */ if (NULL == (file = (H5FD_mpio_t *)H5MM_calloc(sizeof(H5FD_mpio_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); file->f = fh; file->comm = comm; file->info = info; @@ -926,7 +926,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR /* Retrieve the flag indicating whether MPI_File_sync is needed after each write */ if (H5_mpio_get_file_sync_required(fh, &file->mpi_file_sync_required) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "unable to get mpi_file_sync_required hint") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "unable to get mpi_file_sync_required hint"); /* Only processor p0 will get the filesize and broadcast it. */ if (mpi_rank == 0) { @@ -1168,7 +1168,7 @@ H5FD__mpio_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand FUNC_ENTER_PACKAGE if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = &(file->f); @@ -1242,7 +1242,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* some numeric conversions */ if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off /*out*/) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off"); size_i = (int)size; /* Only look for MPI views for raw data transfers */ @@ -1251,7 +1251,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* Get the transfer mode from the API context */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* * Set up for a fancy xfer using complex types, or single byte block. We @@ -1267,7 +1267,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* Prepare for a full-blown xfer using btype, ftype, and disp */ if (H5CX_get_mpi_coll_datatypes(&buf_type, &file_type) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O datatypes") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O datatypes"); /* * Set the file view when we are using MPI derived types @@ -1293,7 +1293,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU #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) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property"); if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG @@ -1356,7 +1356,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU */ if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); derived_type = TRUE; size_i = 1; @@ -1420,7 +1420,7 @@ H5FD__mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* Check for read failure */ if (bytes_read < 0 || bytes_read > io_size) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed"); #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_r_flag) @@ -1512,12 +1512,12 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* some numeric conversions */ if (H5FD_mpi_haddr_to_MPIOff(addr, &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off"); size_i = (int)size; /* Get the transfer mode from the API context */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); /* * Set up for a fancy xfer using complex types, or single byte block. We @@ -1533,7 +1533,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* Prepare for a full-blown xfer using btype, ftype, and disp */ if (H5CX_get_mpi_coll_datatypes(&buf_type, &file_type) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O datatypes") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O datatypes"); /* * Set the file view when we are using MPI derived types @@ -1559,7 +1559,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* 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) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property"); if (coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO) { #ifdef H5FDmpio_DEBUG @@ -1580,7 +1580,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h else { if (type != H5FD_MEM_DRAW) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, - "Metadata Coll opt property should be collective at this point") + "Metadata Coll opt property should be collective at this point"); #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) @@ -1607,7 +1607,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h */ if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); derived_type = TRUE; size_i = 1; @@ -1644,7 +1644,7 @@ H5FD__mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* Check for write failure */ if (bytes_written != io_size || bytes_written < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); #ifdef H5FDmpio_DEBUG if (H5FD_mpio_debug_w_flag) @@ -1747,7 +1747,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ /* some numeric conversions */ if (H5FD_mpi_haddr_to_MPIOff(addrs[0], mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI offset") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI offset"); /* Check for size overflow */ if (sizes[0] > bigio_count) { @@ -1757,11 +1757,11 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ * count) to 1 when using the derived_type. */ if (H5_mpio_create_large_type(sizes[0], 0, MPI_BYTE, buf_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); *buf_type_created = TRUE; if (H5_mpio_create_large_type(sizes[0], 0, MPI_BYTE, file_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); *file_type_created = TRUE; *size_i = 1; @@ -1780,13 +1780,13 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ */ if (H5FD_sort_vector_io_req(vector_was_sorted, count, types, addrs, sizes, bufs, &s_types, s_addrs, s_sizes, s_bufs) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't sort vector I/O request") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't sort vector I/O request"); 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc mpi block lengths / displacement"); } /* when we setup mpi_bufs[] below, all addresses are offsets from @@ -1859,11 +1859,11 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ assert(!sub_types_created); if (NULL == (sub_types = malloc((size_t)count * sizeof(MPI_Datatype)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types array"); 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't alloc sub types created array"); } /* Initialize sub_types to all MPI_BYTE */ @@ -1874,7 +1874,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ /* Create type for large block */ if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &sub_types[i]) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); sub_types_created[i] = TRUE; /* Only one of these large types for this vector element */ @@ -1944,7 +1944,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ /* some numeric conversions */ if (H5FD_mpi_haddr_to_MPIOff((haddr_t)0, mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0"); } else { /* setup for null participation in the collective operation. */ @@ -1959,7 +1959,7 @@ H5FD__mpio_vector_build_types(uint32_t count, H5FD_mem_t types[], haddr_t addrs[ /* some numeric conversions */ if (H5FD_mpi_haddr_to_MPIOff((haddr_t)0, mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0"); } done: @@ -2115,7 +2115,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou * read, it does mean that all ranks are here, so we can use MPI_File_set_view(). */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); if (xfer_mode == H5FD_MPIO_COLLECTIVE) { /* Build MPI types, etc. */ @@ -2124,7 +2124,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou &vector_was_sorted, &mpi_off, (H5_flexible_const_ptr_t *)&mpi_bufs_base, &size_i, &buf_type, &buf_type_created, &file_type, &file_type_created, &unused) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O"); /* free sorted addrs vector if it exists */ if (!vector_was_sorted) @@ -2148,13 +2148,13 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou /* Reset mpi_off to 0 since the view now starts at the data offset */ if (H5FD_mpi_haddr_to_MPIOff((haddr_t)0, &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0"); /* 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) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property"); /* Read the data. */ #ifdef H5FDmpio_DEBUG @@ -2245,7 +2245,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou /* Check for read failure */ if (bytes_read < 0 || bytes_read > io_size) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed"); /* Check for incomplete read */ n = io_size - bytes_read; @@ -2301,7 +2301,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou for (i = 0; i < (int)count; i++) { /* Convert address to mpi offset */ if (H5FD_mpi_haddr_to_MPIOff(addrs[i], &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off"); /* Calculate I/O size */ if (!fixed_size) { @@ -2324,7 +2324,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou */ if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); buf_type_created = TRUE; size_i = 1; @@ -2358,7 +2358,7 @@ H5FD__mpio_read_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t cou /* Check for read failure */ if (bytes_read < 0 || bytes_read > io_size) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed"); /* * If we didn't read the entire I/O, fill in zeroes beyond end of @@ -2508,7 +2508,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co * write, it does mean that all ranks are here, so we can use MPI_File_set_view(). */ if (H5CX_get_io_xfer_mode(&xfer_mode) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O transfer mode"); if (xfer_mode == H5FD_MPIO_COLLECTIVE) { /* Build MPI types, etc. */ @@ -2517,7 +2517,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co &vector_was_sorted, &mpi_off, (H5_flexible_const_ptr_t *)&mpi_bufs_base, &size_i, &buf_type, &buf_type_created, &file_type, &file_type_created, &unused) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't build MPI datatypes for I/O"); /* Compute max addr writted to */ if (count > 0) @@ -2554,12 +2554,12 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co /* Reset mpi_off to 0 since the view now starts at the data offset */ if (H5FD_mpi_haddr_to_MPIOff((haddr_t)0, &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't set MPI off to 0"); /* 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) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI-I/O collective_op property"); /* Write the data. */ #ifdef H5FDmpio_DEBUG @@ -2626,7 +2626,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co for (i = 0; i < (int)count; i++) { /* Convert address to mpi offset */ if (H5FD_mpi_haddr_to_MPIOff(addrs[i], &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "can't convert from haddr to MPI off"); /* Calculate I/O size */ if (!fixed_size) { @@ -2649,7 +2649,7 @@ H5FD__mpio_write_vector(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, uint32_t co */ if (H5_mpio_create_large_type(size, 0, MPI_BYTE, &buf_type) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "can't create MPI-I/O datatype"); buf_type_created = TRUE; size_i = 1; @@ -2836,7 +2836,7 @@ H5FD__mpio_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR HMPI_GOTO_ERROR(FAIL, "MPI_File_get_size failed", mpi_code) if (H5FD_mpi_haddr_to_MPIOff(file->eoa, &needed_eof) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset"); /* EOA != EOF. Set EOF to EOA */ if (size != needed_eof) { @@ -2894,7 +2894,7 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id) 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); assert(H5FD_MPIO == H5P_peek_driver(plist)); if (H5FD_mpi_self_initialized) { @@ -2903,9 +2903,9 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id) else { /* Get the MPI communicator and info from the fapl */ if (H5P_get(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI info object") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI info object"); if (H5P_get(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator"); } /* Get the MPI rank of this process */ @@ -3009,7 +3009,7 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT default: /* unknown op code */ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) { - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown"); } break; } diff --git a/src/H5FDonion.c b/src/H5FDonion.c index 1daaeee..dcec221 100644 --- a/src/H5FDonion.c +++ b/src/H5FDonion.c @@ -284,16 +284,16 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out) H5TRACE2("e", "i*!", fapl_id, fa_out); if (NULL == fa_out) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info-out pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info-out pointer"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID"); if (H5FD_ONION != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Incorrect VFL driver") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Incorrect VFL driver"); 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad VFL driver info"); memcpy(fa_out, info_ptr, sizeof(H5FD_onion_fapl_info_t)); @@ -407,7 +407,7 @@ H5FD__onion_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*ou 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -434,7 +434,7 @@ H5FD__onion_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -470,20 +470,20 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file) if ((TRUE == file->is_open_rw) && (H5FD__onion_merge_revision_index_into_archival_index( file->rev_index, &file->curr_rev_record.archival_index) < 0)) - HGOTO_ERROR(H5E_VFL, H5E_INTERNAL, FAIL, "unable to update index to write") + HGOTO_ERROR(H5E_VFL, H5E_INTERNAL, FAIL, "unable to update index to write"); if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_REVISION_RECORD + (size_t)rec->comment_size + (H5FD_ONION_ENCODED_SIZE_INDEX_ENTRY * rec->archival_index.n_entries)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer for encoded revision record") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer for encoded revision record"); if (0 == (size = H5FD__onion_revision_record_encode(rec, buf, &checksum))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding revision record") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding revision record"); phys_addr = file->onion_eof; if (H5FD_set_eoa(file->onion_file, H5FD_MEM_DRAW, phys_addr + size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA for new revision record") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA for new revision record"); if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, phys_addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write new revision record") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write new revision record"); file->onion_eof = phys_addr + size; if (TRUE == file->align_history_on_pages) @@ -497,7 +497,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate temporary record pointer list"); history->record_locs[0].phys_addr = phys_addr; history->record_locs[0].record_size = size; @@ -513,7 +513,7 @@ H5FD__onion_commit_new_revision_record(H5FD_onion_t *file) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to resize record pointer list"); 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; @@ -565,20 +565,20 @@ H5FD__onion_close(H5FD_t *_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") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write revision record to backing store"); if (H5FD__onion_write_final_history(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write history to backing store") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write history to backing store"); /* Unset write-lock flag and write header */ if (file->is_open_rw) file->header.flags &= (uint32_t)~H5FD_ONION_HEADER_FLAG_WRITE_LOCK; if (H5FD__onion_write_header(&(file->header), file->onion_file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write updated header to backing store") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "Can't write updated header to backing store"); } } else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid history target") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid history target"); done: @@ -709,37 +709,37 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons backing_fapl_id = H5FD__onion_get_legit_fapl_id(file->fa.backing_fapl_id); if (H5I_INVALID_HID == backing_fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid backing FAPL ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid backing FAPL ID"); /* Create backing files for onion history */ if (NULL == (file->original_file = H5FD_open(filename, flags, backing_fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing file"); if (NULL == (file->onion_file = H5FD_open(name_onion, flags, backing_fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing onion file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing onion file"); if (NULL == (file->recovery_file = H5FD_open(recovery_file_nameery, flags, backing_fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "cannot open the backing file"); /* Write "empty" .h5 file contents (signature ONIONEOF) */ if (H5FD_set_eoa(file->original_file, H5FD_MEM_DRAW, 8) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA"); if (H5FD_write(file->original_file, H5FD_MEM_DRAW, 0, 8, "ONIONEOF") < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write header to the backing h5 file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write header to the backing h5 file"); /* Write nascent history (with no revisions) to "recovery" */ if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HISTORY))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer"); size = H5FD__onion_history_encode(history, buf, &history->checksum); if (H5FD_ONION_ENCODED_SIZE_HISTORY != size) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't encode history") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't encode history"); if (H5FD_set_eoa(file->recovery_file, H5FD_MEM_DRAW, size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA"); if (H5FD_write(file->recovery_file, H5FD_MEM_DRAW, 0, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write history to the backing recovery file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write history to the backing recovery file"); hdr->history_size = size; /* record for later use */ H5MM_xfree(buf); buf = NULL; @@ -749,14 +749,14 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons */ if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HEADER))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer"); size = H5FD__onion_header_encode(hdr, buf, &hdr->checksum); if (H5FD_ONION_ENCODED_SIZE_HEADER != size) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't encode history header") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't encode history header"); if (H5FD_set_eoa(file->onion_file, H5FD_MEM_DRAW, size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't extend EOA"); if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, 0, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write header to the backing onion file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "cannot write header to the backing onion file"); file->onion_eof = (haddr_t)size; if (TRUE == file->align_history_on_pages) file->onion_eof = (file->onion_eof + (hdr->page_size - 1)) & (~(hdr->page_size - 1)); @@ -764,7 +764,7 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons rec->archival_index.list = NULL; if (NULL == (file->rev_index = H5FD__onion_revision_index_init(file->fa.page_size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize revision index") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize revision index"); done: H5MM_xfree(buf); @@ -800,7 +800,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa) FUNC_ENTER_PACKAGE if (!HDstrcmp(config_str, "")) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty"); /* Initialize to the default values */ fa->version = H5FD_ONION_FAPL_INFO_VERSION_CURR; @@ -823,14 +823,14 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa) /* Duplicate the configure string since strtok will mess with it */ if (NULL == (config_str_copy = H5MM_strdup(config_str))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't duplicate configure string") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't duplicate configure string"); /* Remove the curly brackets and space from the configure string */ H5FD__onion_remove_unused_symbols(config_str_copy); /* The configure string can't be empty after removing the curly brackets */ if (!HDstrcmp(config_str_copy, "")) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty"); token1 = HDstrtok(config_str_copy, ":"); token2 = HDstrtok(NULL, ";"); @@ -869,7 +869,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa) } else HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unknown token in the configure string: %s", - token1) + token1); } token1 = HDstrtok(NULL, ":"); @@ -923,12 +923,12 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma /* Check arguments */ if (!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); /* This VFD can be invoked by either H5Pset_fapl_onion() or * H5Pset_driver_by_name(). When invoked by the former, there will be @@ -938,39 +938,39 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma if (NULL == fa) { if (NULL == (config_str = H5P_peek_driver_config_str(plist))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "missing VFL driver configure string") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "missing VFL driver configure string"); /* Allocate a new onion fapl info struct and fill it from the * configuration string */ if (NULL == (new_fa = H5MM_calloc(sizeof(H5FD_onion_fapl_info_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate memory for onion fapl info struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate memory for onion fapl info struct"); if (H5FD__onion_parse_config_str(config_str, new_fa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "failed to parse configure string") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "failed to parse configure string"); fa = new_fa; } /* Check for unsupported target values */ if (H5FD_ONION_STORE_TARGET_ONION != fa->store_target) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid store target") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid store target"); /* Allocate space for the file struct */ if (NULL == (file = H5FL_CALLOC(H5FD_onion_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct"); /* Allocate space for onion VFD file names */ if (NULL == (name_onion = H5MM_malloc(sizeof(char) * (HDstrlen(filename) + 7)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate onion name string") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate onion name string"); HDsnprintf(name_onion, HDstrlen(filename) + 7, "%s.onion", filename); if (NULL == (recovery_file_nameery = H5MM_malloc(sizeof(char) * (HDstrlen(name_onion) + 10)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string"); HDsnprintf(recovery_file_nameery, HDstrlen(name_onion) + 10, "%s.recovery", name_onion); file->recovery_file_name = recovery_file_nameery; if (NULL == (file->recovery_file_name = H5MM_malloc(sizeof(char) * (HDstrlen(name_onion) + 10)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate recovery name string"); HDsnprintf(file->recovery_file_name, HDstrlen(name_onion) + 10, "%s.recovery", name_onion); /* Translate H5P_DEFAULT to a real fapl ID, if necessary */ @@ -992,7 +992,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma /* Check that the page size is a power of two */ if ((fa->page_size == 0) || ((fa->page_size & (fa->page_size - 1)) != 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "page size is not a power of two") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "page size is not a power of two"); /* Assign the page size */ log2_page_size = HDlog2((double)(fa->page_size)); @@ -1013,7 +1013,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma /* Truncate and create everything as necessary */ if (H5FD__onion_create_truncate_onion(file, filename, name_onion, file->recovery_file_name, flags, maxaddr) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL, "unable to create/truncate onionized files") + HGOTO_ERROR(H5E_VFL, H5E_CANTCREATE, NULL, "unable to create/truncate onionized files"); file->is_open_rw = TRUE; } else { @@ -1022,7 +1022,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma /* Open the existing file using the specified fapl */ if (NULL == (file->original_file = H5FD_open(filename, flags, backing_fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open canonical file (does not exist?)") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open canonical file (does not exist?)"); /* Try to open any existing onion file */ H5E_BEGIN_TRY @@ -1057,23 +1057,23 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma } if (HADDR_UNDEF == (canon_eof = H5FD_get_eof(file->original_file, H5FD_MEM_DEFAULT))) { - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "cannot get size of canonical file") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "cannot get size of canonical file"); } if (H5FD_set_eoa(file->original_file, H5FD_MEM_DRAW, canon_eof) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA"); hdr->origin_eof = canon_eof; file->logical_eof = canon_eof; backing_fapl_id = H5FD__onion_get_legit_fapl_id(file->fa.backing_fapl_id); if (H5I_INVALID_HID == backing_fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid backing FAPL ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid backing FAPL ID"); /* Create backing files for onion history */ if ((file->onion_file = H5FD_open(name_onion, (H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC), backing_fapl_id, maxaddr)) == NULL) { - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "cannot open the backing onion file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "cannot open the backing onion file"); } /* Write history header with "no" history */ @@ -1082,27 +1082,27 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma H5FD_ONION_ENCODED_SIZE_HEADER + 1; /* TODO: comment these 2 or do some other way */ head_buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HEADER); if (NULL == head_buf) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate buffer"); size = H5FD__onion_header_encode(hdr, head_buf, &hdr->checksum); if (H5FD_ONION_ENCODED_SIZE_HEADER != size) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't encode history header") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't encode history header"); hist_buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HISTORY); if (NULL == hist_buf) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "can't allocate buffer"); saved_size = size; history->n_revisions = 0; size = H5FD__onion_history_encode(history, hist_buf, &history->checksum); file->header.history_size = size; /* record for later use */ if (H5FD_ONION_ENCODED_SIZE_HISTORY != size) { - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't encode history") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't encode history"); } if (H5FD_set_eoa(file->onion_file, H5FD_MEM_DRAW, saved_size + size + 1) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA"); if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, 0, saved_size, head_buf) < 0) { HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, NULL, - "cannot write header to the backing onion file") + "cannot write header to the backing onion file"); } file->onion_eof = (haddr_t)saved_size; @@ -1116,7 +1116,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma /* Write nascent history (with no revisions) to the backing onion file */ if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, saved_size + 1, size, hist_buf) < 0) { HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, NULL, - "cannot write history to the backing onion file") + "cannot write history to the backing onion file"); } file->header.history_size = size; /* record for later use */ @@ -1125,36 +1125,36 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma H5MM_xfree(hist_buf); } else { - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open onion file (does not exist?).") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open onion file (does not exist?)."); } } if (HADDR_UNDEF == (canon_eof = H5FD_get_eof(file->original_file, H5FD_MEM_DEFAULT))) { - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "cannot get size of canonical file") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "cannot get size of canonical file"); } if (H5FD_set_eoa(file->original_file, H5FD_MEM_DRAW, canon_eof) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't extend EOA"); /* Get the history header from the onion file */ if (H5FD__onion_ingest_header(&file->header, file->onion_file, 0) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get history header from backing store") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get history header from backing store"); file->align_history_on_pages = (file->header.flags & H5FD_ONION_HEADER_FLAG_PAGE_ALIGNMENT) ? TRUE : FALSE; if (H5FD_ONION_HEADER_FLAG_WRITE_LOCK & file->header.flags) { /* Opening a file twice in write mode is an error */ - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "Can't open file already opened in write-mode") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "Can't open file already opened in write-mode"); } else { /* Read in the history from the onion file */ if (H5FD__onion_ingest_history(&file->history, file->onion_file, file->header.history_addr, file->header.history_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get history from backing store") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get history from backing store"); /* Sanity check on revision ID */ if (fa->revision_num > file->history.n_revisions && fa->revision_num != H5FD_ONION_FAPL_INFO_REVISION_ID_LATEST) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "target revision ID out of range") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "target revision ID out of range"); if (fa->revision_num == 0) { file->curr_rev_record.logical_eof = canon_eof; @@ -1163,12 +1163,12 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma H5FD__onion_ingest_revision_record( &file->curr_rev_record, file->onion_file, &file->history, MIN(fa->revision_num - 1, (file->history.n_revisions - 1))) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get revision record from backing store") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, NULL, "can't get revision record from backing store"); } if (H5F_ACC_RDWR & flags) if (H5FD__onion_open_rw(file, flags, maxaddr, new_open) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "can't write-open write-locked file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "can't write-open write-locked file"); } } /* End if opening existing file */ @@ -1188,7 +1188,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma */ if (NULL == (file->curr_rev_record.comment = H5MM_strndup(fa->comment, H5FD_ONION_FAPL_INFO_COMMENT_MAX_LEN))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to duplicate comment string") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to duplicate comment string"); /* TODO: Lengths of strings should be size_t */ file->curr_rev_record.comment_size = (uint32_t)HDstrlen(fa->comment) + 1; @@ -1269,37 +1269,37 @@ H5FD__onion_open_rw(H5FD_onion_t *file, unsigned int flags, haddr_t maxaddr, boo */ if (file->header.flags & H5FD_ONION_HEADER_FLAG_WRITE_LOCK) - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "can't write-open write-locked file") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "can't write-open write-locked file"); /* Copy history to recovery file */ if (NULL == (file->recovery_file = H5FD_open(file->recovery_file_name, (flags | H5F_ACC_CREAT | H5F_ACC_TRUNC), file->fa.backing_fapl_id, maxaddr))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "unable to create recovery file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "unable to create recovery file"); if (0 == (size = H5FD__onion_write_history(&file->history, file->recovery_file, 0, 0))) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write history to recovery file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write history to recovery file"); if (size != file->header.history_size) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "written history differed from expected size") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "written history differed from expected size"); /* Set write-lock flag in onion header */ if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HEADER))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate space for encoded buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate space for encoded buffer"); file->header.flags |= H5FD_ONION_HEADER_FLAG_WRITE_LOCK; if (0 == (size = H5FD__onion_header_encode(&file->header, buf, &checksum))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding history header") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding history header"); if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, 0, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write updated history header") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write updated history header"); /* Prepare revision index and finalize write-mode open */ if (NULL == (file->rev_index = H5FD__onion_revision_index_init(file->fa.page_size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize revision index") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize revision index"); file->curr_rev_record.parent_revision_num = file->curr_rev_record.revision_num; if (!new_open) file->curr_rev_record.revision_num += 1; @@ -1352,7 +1352,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h assert(buf_out != NULL); if ((uint64_t)(offset + len) > file->logical_eoa) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Read extends beyond addressed space") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Read extends beyond addressed space"); if (0 == len) goto done; @@ -1389,14 +1389,14 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* Page exists in 'live' revision index */ if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr + page_gap_head, page_readsize, buf_out) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data"); } else if (file->fa.revision_num != 0 && H5FD__onion_archival_index_find(&file->curr_rev_record.archival_index, page_i, &entry_out)) { /* Page exists in archival index */ if (H5FD_read(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr + page_gap_head, page_readsize, buf_out) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get previously-amended file data") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get previously-amended file data"); } else { /* Page does not exist in either index */ @@ -1408,7 +1408,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h /* Get all original bytes in page range */ if ((read_size > 0) && H5FD_read(file->original_file, type, addr_start, read_size, buf_out) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get original file data") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get original file data"); } /* Fill with 0s any gaps after end of original bytes @@ -1478,7 +1478,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Write not allowed if file not opened in write mode"); if (0 == len) goto done; @@ -1489,7 +1489,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, n_pages = (len + page_size - 1) >> page_size_log2; if (NULL == (page_buf = H5MM_calloc(page_size * sizeof(unsigned char)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate temporary buffer") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate temporary buffer"); /* Write, page-by-page */ for (size_t i = 0; i < n_pages; i++) { @@ -1521,14 +1521,14 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, if (page_gap_head | page_gap_tail) { /* Copy existing page verbatim. */ 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") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get working file data"); /* Overlay delta from input buffer onto page buffer. */ memcpy(page_buf + page_gap_head, buf, page_n_used); write_buf = page_buf; } /* end if partial page */ if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, entry_out->phys_addr, page_size, write_buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "write amended page data to backing file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "write amended page data to backing file"); buf += page_n_used; /* overflow never touched */ bytes_to_write -= page_n_used; @@ -1543,7 +1543,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, /* Copy existing page verbatim */ 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 previously-amended data") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get previously-amended data"); } else { haddr_t addr_start = (haddr_t)(page_i * page_size); @@ -1553,7 +1553,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, /* Get all original bytes in page range */ if ((read_size > 0) && H5FD_read(file->original_file, type, addr_start, read_size, page_buf) < 0) { - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get original file data") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't get original file data"); } /* Fill with 0s any gaps after end of original bytes @@ -1580,13 +1580,13 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, new_entry.phys_addr = file->onion_eof; if (H5FD_set_eoa(file->onion_file, H5FD_MEM_DRAW, file->onion_eof + page_size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA for new page amendment") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA for new page amendment"); if (H5FD_write(file->onion_file, H5FD_MEM_DRAW, file->onion_eof, page_size, write_buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "write amended page data to backing file") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "write amended page data to backing file"); if (H5FD__onion_revision_index_insert(file->rev_index, &new_entry) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "can't insert new index entry into revision index") + HGOTO_ERROR(H5E_VFL, H5E_CANTINSERT, FAIL, "can't insert new index entry into revision index"); file->onion_eof += page_size; buf += page_n_used; /* possible overflow never touched */ @@ -1636,14 +1636,14 @@ H5FD__onion_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_A switch (op_code) { case H5FD_CTL_GET_NUM_REVISIONS: if (!output || !*output) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "the output parameter is null") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "the output parameter is null"); **((uint64_t **)output) = file->history.n_revisions; break; /* Unknown op code */ default: if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set"); break; } @@ -1671,28 +1671,28 @@ H5FDonion_get_revision_count(const char *filename, hid_t fapl_id, uint64_t *revi /* Check args */ if (!filename || !HDstrcmp(filename, "")) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid file name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid file name"); if (!revision_count) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "revision count can't be null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "revision count can't be null"); /* Make sure using the correct driver */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid FAPL ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid FAPL ID"); if (H5FD_ONION != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Onion VFL driver") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Onion VFL driver"); /* Open the file with the driver */ if (NULL == (file = H5FD_open(filename, H5F_ACC_RDONLY, fapl_id, HADDR_UNDEF))) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "unable to open file with onion driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "unable to open file with onion driver"); /* Call the private function */ if (H5FD__get_onion_revision_count(file, revision_count) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "failed to get the number of revisions") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "failed to get the number of revisions"); done: /* Close H5FD_t structure pointer */ if (file && H5FD_close(file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close file"); FUNC_LEAVE_API(ret_value) } @@ -1722,7 +1722,7 @@ H5FD__get_onion_revision_count(H5FD_t *file, uint64_t *revision_count) /* Get the number of revisions via the ctl callback */ if (H5FD_ctl(file, op_code, flags, NULL, (void **)&revision_count) < 0) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1747,10 +1747,10 @@ H5FD__onion_write_final_history(H5FD_onion_t *file) /* TODO: history EOF may not be correct (under what circumstances?) */ if (0 == (size = H5FD__onion_write_history(&(file->history), file->onion_file, file->onion_eof, file->onion_eof))) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write final history") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write final history"); if (size != file->header.history_size) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "written history differed from expected size") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "written history differed from expected size"); /* Is last write operation to history file; no need to extend to page * boundary if set to page-align. diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c index b9ab88a..a346ecf 100644 --- a/src/H5FDonion_header.c +++ b/src/H5FDonion_header.c @@ -47,23 +47,23 @@ H5FD__onion_ingest_header(H5FD_onion_header_t *hdr_out, H5FD_t *raw_file, haddr_ FUNC_ENTER_PACKAGE if (H5FD_get_eof(raw_file, H5FD_MEM_DRAW) < (addr + size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "header indicates history beyond EOF") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "header indicates history beyond EOF"); if (NULL == (buf = H5MM_malloc(sizeof(char) * size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space"); if (H5FD_set_eoa(raw_file, H5FD_MEM_DRAW, (addr + size)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't modify EOA"); if (H5FD_read(raw_file, H5FD_MEM_DRAW, addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read history header from file") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read history header from file"); if (H5FD__onion_header_decode(buf, hdr_out) == 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode history header") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode history header"); sum = H5_checksum_fletcher32(buf, size - 4); if (hdr_out->checksum != sum) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored"); done: H5MM_xfree(buf); @@ -91,13 +91,13 @@ H5FD__onion_write_header(H5FD_onion_header_t *header, H5FD_t *file) FUNC_ENTER_PACKAGE if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HEADER))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer for updated history header") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer for updated history header"); if (0 == (size = H5FD__onion_header_encode(header, buf, &sum))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding updated history header") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "problem encoding updated history header"); if (H5FD_write(file, H5FD_MEM_DRAW, 0, (haddr_t)size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write updated history header") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "can't write updated history header"); done: H5MM_xfree(buf); @@ -135,10 +135,10 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header) 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header signature"); if (buf[4] != H5FD_ONION_HEADER_VERSION_CURR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header version") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid header version"); ptr = buf + 5; ui32 = 0; @@ -175,7 +175,7 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header) ptr += 4; if (sum != header->checksum) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch"); ret_value = (size_t)(ptr - buf); diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c index 06a3e3b..e559e80 100644 --- a/src/H5FDonion_history.c +++ b/src/H5FDonion_history.c @@ -108,16 +108,16 @@ H5FD__onion_write_history(H5FD_onion_history_t *history, H5FD_t *file, haddr_t o if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HISTORY + (H5FD_ONION_ENCODED_SIZE_RECORD_POINTER * history->n_revisions)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, 0, "can't allocate buffer for updated history") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, 0, "can't allocate buffer for updated history"); if (0 == (size = H5FD__onion_history_encode(history, buf, &_sum))) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, 0, "problem encoding updated history") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, 0, "problem encoding updated history"); if ((size + off_start > filesize_curr) && (H5FD_set_eoa(file, H5FD_MEM_DRAW, off_start + size) < 0)) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, 0, "can't modify EOA for updated history") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, 0, "can't modify EOA for updated history"); if (H5FD_write(file, H5FD_MEM_DRAW, off_start, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, 0, "can't write history as intended") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, 0, "can't write history as intended"); ret_value = size; @@ -173,10 +173,10 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history) 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature"); if (H5FD_ONION_HISTORY_VERSION_CURR != buf[4]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid version") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid version"); ptr = buf + 8; @@ -192,9 +192,9 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history) else { if (history->n_revisions != n_revisions) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, - "history argument suggests different revision count than encoded buffer") + "history argument suggests different revision count than encoded buffer"); if (NULL == history->record_locs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "list is NULL -- cannot populate") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "list is NULL -- cannot populate"); for (uint64_t i = 0; i < n_revisions; i++) { H5FD_onion_record_loc_t *rloc = &history->record_locs[i]; @@ -234,7 +234,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history) ptr += 4; if (sum != history->checksum) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch"); ret_value = (size_t)(ptr - buf); diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c index 62cc009..a6215ab 100644 --- a/src/H5FDonion_index.c +++ b/src/H5FDonion_index.c @@ -75,7 +75,7 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t * r_out->archival_index.list = H5MM_xfree(r_out->archival_index.list); if (H5FD_get_eof(raw_file, H5FD_MEM_DRAW) < (addr + size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "at least one record extends beyond EOF") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "at least one record extends beyond EOF"); /* recovery-open may have EOA below revision record */ if ((H5FD_get_eoa(raw_file, H5FD_MEM_DRAW) < (addr + size)) && @@ -92,17 +92,17 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t * size = history->record_locs[n].record_size; if (NULL == (buf = H5MM_malloc(sizeof(char) * size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space"); if (H5FD_read(raw_file, H5FD_MEM_DRAW, addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file"); if (H5FD__onion_revision_record_decode(buf, r_out) != size) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (initial)") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (initial)"); sum = H5_checksum_fletcher32(buf, size - 4); if (r_out->checksum != sum) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored"); if (revision_num == r_out->revision_num) break; @@ -126,34 +126,34 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t * size = history->record_locs[n].record_size; if (NULL == (buf = H5MM_malloc(sizeof(char) * size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer space"); if (H5FD_read(raw_file, H5FD_MEM_DRAW, addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "can't read revision record from file"); if (H5FD__onion_revision_record_decode(buf, r_out) != size) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (initial)") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (initial)"); sum = H5_checksum_fletcher32(buf, size - 4); if (r_out->checksum != sum) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "checksum mismatch between buffer and stored"); if (revision_num != r_out->revision_num) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "could not find target revision!") /* TODO: corrupted? */ - } /* end if revision ID at 'leaf' in binary search */ + "could not find target revision!"); /* TODO: corrupted? */ + } /* end if revision ID at 'leaf' in binary search */ if (r_out->comment_size > 0) if (NULL == (r_out->comment = H5MM_malloc(sizeof(char) * r_out->comment_size))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate comment space") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate comment space"); if (r_out->archival_index.n_entries > 0) if (NULL == (r_out->archival_index.list = H5MM_calloc(r_out->archival_index.n_entries * sizeof(H5FD_onion_index_entry_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate index entry list") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate index entry list"); if (H5FD__onion_revision_record_decode(buf, r_out) != size) - HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (final)") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "can't decode revision record (final)"); done: H5MM_xfree(buf); @@ -342,11 +342,11 @@ H5FD__onion_revision_index_init(uint32_t 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate index"); if (NULL == (rix->_hash_table = H5MM_calloc(table_size * sizeof(H5FD_onion_revision_index_hash_chain_node_t *)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate hash table") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "cannot allocate hash table"); rix->version = H5FD_ONION_REVISION_INDEX_VERSION_CURR; rix->n_entries = 0; @@ -397,7 +397,7 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new hash table"); for (uint64_t i = 0; i < rix->_hash_table_size; i++) { while (rix->_hash_table[i] != NULL) { @@ -462,7 +462,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o if (rix->n_entries >= (rix->_hash_table_size * 2) || rix->_hash_table_n_keys_populated >= (rix->_hash_table_size / 2)) { if (H5FD__onion_revision_index_resize(rix) < 0) - HGOTO_ERROR(H5E_VFL, H5E_NONE_MINOR, FAIL, "unable to resize and hash table") + HGOTO_ERROR(H5E_VFL, H5E_NONE_MINOR, FAIL, "unable to resize and hash table"); } key = entry->logical_page & (rix->_hash_table_size - 1); @@ -493,7 +493,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o /* Add new entry to bucket chain */ if (append_dest != NULL) { if (NULL == (node = H5MM_malloc(sizeof(H5FD_onion_revision_index_hash_chain_node_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "cannot allocate new ash chain node") + 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; memcpy(&node->entry_data, entry, sizeof(H5FD_onion_index_entry_t)); @@ -605,10 +605,10 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid signature"); if (H5FD_ONION_REVISION_RECORD_VERSION_CURR != buf[4]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid record version") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid record version"); ptr = buf + 8; @@ -636,9 +636,9 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor ptr += 4; if (page_size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "page size is zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "page size is zero"); if (!POWER_OF_TWO(page_size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "page size not power of two") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "page size not power of two"); for (record->archival_index.page_size_log2 = 0; (((uint32_t)1 << record->archival_index.page_size_log2) & page_size) == 0; @@ -660,13 +660,13 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor ptr += H5FD_ONION_ENCODED_SIZE_INDEX_ENTRY * n_entries; } else if (n_entries != record->archival_index.n_entries) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "n_entries in archival index does not match decoded") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "n_entries in archival index does not match decoded"); } else { H5FD_onion_index_entry_t *entry = NULL; if (record->archival_index.list == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no archival index entry list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no archival index entry list"); for (size_t i = 0; i < n_entries; i++) { entry = &record->archival_index.list[i]; @@ -678,7 +678,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor /* logical_page actually encoded as address; check and convert */ if (entry->logical_page & (page_size - 1)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "logical address does not align with page size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "logical address does not align with page size"); entry->logical_page = entry->logical_page >> record->archival_index.page_size_log2; @@ -694,18 +694,18 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor ui32 = H5_checksum_fletcher32((ptr - 20), 16); if (ui32 != sum) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "index entry checksum mismatch") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "index entry checksum mismatch"); } } if (record->comment_size == 0) { if (record->comment != NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "comment pointer prematurely allocated") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "comment pointer prematurely allocated"); record->comment_size = comment_size; } else { if (record->comment == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "no comment pointer"); memcpy(record->comment, ptr, comment_size); } ptr += comment_size; @@ -718,7 +718,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor ptr += 4; if (sum != record->checksum) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "checksum mismatch"); ret_value = (size_t)(ptr - buf); @@ -870,7 +870,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i new_aix.page_size_log2 = aix->page_size_log2; if (NULL == (new_aix.list = H5MM_calloc(rix->n_entries * sizeof(H5FD_onion_index_entry_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate new archival index list") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate new archival index list"); for (uint64_t i = 0; i < rix->_hash_table_size; i++) { const H5FD_onion_revision_index_hash_chain_node_t *node = NULL; @@ -894,7 +894,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i */ if (aix->n_entries > 0) if (NULL == (kept_list = H5MM_calloc(aix->n_entries * sizeof(H5FD_onion_index_entry_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate larger archival index list") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate larger archival index list"); for (uint64_t i = 0; i < aix->n_entries; i++) { const H5FD_onion_index_entry_t *entry = NULL; @@ -911,7 +911,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i */ H5MM_xfree(aix->list); if (NULL == (aix->list = H5MM_calloc((new_aix.n_entries + n_kept) * sizeof(H5FD_onion_index_entry_t)))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate exact-size archival index list"); /* Copy (new) revision list entries to replacement list */ memcpy(aix->list, new_aix.list, sizeof(H5FD_onion_index_entry_t) * new_aix.n_entries); diff --git a/src/H5FDperform.c b/src/H5FDperform.c index 4a68c6e..62097f1 100644 --- a/src/H5FDperform.c +++ b/src/H5FDperform.c @@ -50,7 +50,7 @@ H5FDperform_init(H5FD_init_t op) * before `init` is run. */ if (H5_init_library() < 0) - HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, H5I_INVALID_HID, "library initialization failed") + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, H5I_INVALID_HID, "library initialization failed"); ret_value = op(); diff --git a/src/H5FDros3.c b/src/H5FDros3.c index c9ff5da..c6414af 100644 --- a/src/H5FDros3.c +++ b/src/H5FDros3.c @@ -382,10 +382,10 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa) plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); if (plist == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (FAIL == H5FD__ros3_validate_config(fa)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid ros3 config") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid ros3 config"); ret_value = H5P_set_driver(plist, H5FD_ROS3, (const void *)fa, NULL); @@ -458,18 +458,18 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/) #endif if (fa_dst == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL"); plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS); if (plist == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); fa_src = (const H5FD_ros3_fapl_t *)H5P_peek_driver_info(plist); if (fa_src == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info"); /* Copy the ros3 fapl data out */ H5MM_memcpy(fa_dst, fa_src, sizeof(H5FD_ros3_fapl_t)); @@ -501,7 +501,7 @@ H5FD__ros3_fapl_get(H5FD_t *_file) fa = (H5FD_ros3_fapl_t *)H5MM_calloc(sizeof(H5FD_ros3_fapl_t)); if (fa == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the fields of the structure */ H5MM_memcpy(fa, &(file->fa), sizeof(H5FD_ros3_fapl_t)); @@ -607,19 +607,19 @@ H5Pget_fapl_ros3_token(hid_t fapl_id, size_t size, char *token_dst /*out*/) #endif if (size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size cannot be zero.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size cannot be zero."); if (token_dst == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token_dst is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token_dst is NULL"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if ((token_exists = H5P_exist_plist(plist, ROS3_TOKEN_PROP_NAME)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to check if property token exists in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to check if property token exists in plist"); if (token_exists) { if (H5P_get(plist, ROS3_TOKEN_PROP_NAME, &token_src) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get token value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get token value"); } /* Copy the token data out */ @@ -660,7 +660,7 @@ H5FD__ros3_str_token_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED if (*value) if (NULL == (*value = HDstrdup(*value))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy string property token") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy string property token"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -793,21 +793,21 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token) #endif if (fapl_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_ROS3 != H5P_peek_driver(plist)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); if (HDstrlen(token) > H5FD_ROS3_MAX_SECRET_TOK_LEN) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, - "specified token exceeds the internally specified maximum string length") + "specified token exceeds the internally specified maximum string length"); if ((token_exists = H5P_exist_plist(plist, ROS3_TOKEN_PROP_NAME)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to check if property token exists in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to check if property token exists in plist"); if (token_exists) { if (H5P_get(plist, ROS3_TOKEN_PROP_NAME, &token_src) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get token value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get token value"); memcpy(token_src, token, HDstrlen(token) + 1); } @@ -819,7 +819,7 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token) if (H5P_insert(plist, ROS3_TOKEN_PROP_NAME, sizeof(char *), &token_src, NULL, NULL, NULL, NULL, H5FD__ros3_str_token_delete, H5FD__ros3_str_token_copy, H5FD__ros3_str_token_cmp, H5FD__ros3_str_token_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist"); } done: @@ -930,28 +930,28 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* Check arguments */ if (!url || !*url) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); if (flags != H5F_ACC_RDONLY) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed"); if (FAIL == H5Pget_fapl_ros3(fapl_id, &fa)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list"); if (CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to initialize curl global (placeholder flags)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to initialize curl global (placeholder flags)"); /* Session/security token */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list"); if ((token_exists = H5P_exist_plist(plist, ROS3_TOKEN_PROP_NAME)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "failed to check if property token exists in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "failed to check if property token exists in plist"); if (token_exists) { if (H5P_get(plist, ROS3_TOKEN_PROP_NAME, &token) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get token value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get token value"); } /* open file; procedure depends on whether or not the fapl instructs to @@ -965,10 +965,10 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr) now = gmnow(); assert(now != NULL); if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while writing iso8601 timestamp") + 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, (const char *)fa.aws_region, (const char *)iso8601now)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while computing signing key") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while computing signing key"); if (token_exists) handle = H5FD_s3comms_s3r_open(url, (const char *)fa.aws_region, (const char *)fa.secret_id, @@ -990,14 +990,14 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr) /* create new file struct */ file = H5FL_CALLOC(H5FD_ros3_t); if (file == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); file->s3r_handle = handle; H5MM_memcpy(&(file->fa), &fa, sizeof(H5FD_ros3_fapl_t)); #if ROS3_STATS if (FAIL == ros3_reset_stats(file)) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics"); #endif /* ROS3_STATS */ ret_value = (H5FD_t *)file; @@ -1326,12 +1326,12 @@ H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file) /* Close the underlying request handle */ if (FAIL == H5FD_s3comms_s3r_close(file->s3r_handle)) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close S3 request handle") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close S3 request handle"); #if ROS3_STATS /* TODO: mechanism to re-target stats printout */ if (ros3_fprint_stats(stdout, file) == FAIL) - HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics") + HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics"); #endif /* ROS3_STATS */ /* Release the file info */ @@ -1620,7 +1620,7 @@ H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand #endif if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = file->s3r_handle; @@ -1673,10 +1673,10 @@ H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU filesize = H5FD_s3comms_s3r_get_filesize(file->s3r_handle); if ((addr > filesize) || ((addr + size) > filesize)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address"); if (H5FD_s3comms_s3r_read(file->s3r_handle, addr, size, buf) == FAIL) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read"); #if ROS3_STATS @@ -1733,7 +1733,7 @@ H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, h fprintf(stdout, "H5FD__ros3_write() called.\n"); #endif - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1768,7 +1768,7 @@ H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id, fprintf(stdout, "H5FD__ros3_truncate() called.\n"); #endif - HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.") + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file."); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 5b69712..8a433d5 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -290,7 +290,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) if (*L == NULL) { if (value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list"); else { #if S3COMMS_DEBUG printf("CREATE NEW\n"); @@ -401,7 +401,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) is_looking = FALSE; if (value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head"); else { #if S3COMMS_DEBUG printf("PREPEND NEW HEAD\n"); @@ -430,7 +430,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) is_looking = FALSE; if (value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node"); else { #if S3COMMS_DEBUG printf("APPEND A NODE\n"); @@ -453,7 +453,7 @@ H5FD_s3comms_hrb_node_set(hrb_node_t **L, const char *name, const char *value) is_looking = FALSE; if (value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node"); else { #if S3COMMS_DEBUG printf("INSERT A NODE\n"); @@ -782,7 +782,7 @@ H5FD_s3comms_s3r_close(s3r_t *handle) H5MM_xfree(handle->httpverb); if (FAIL == H5FD_s3comms_free_purl(handle->purl)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to release parsed url structure") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to release parsed url structure"); H5MM_xfree(handle); @@ -872,7 +872,7 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) if (handle->magic != S3COMMS_S3R_MAGIC) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic."); if (handle->curlhandle == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle."); /******************** * PREPARE FOR HEAD * @@ -908,9 +908,9 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem in reading during getsize."); if (sds.size > CURL_MAX_HTTP_HEADER) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun"); else if (sds.size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata"); #if S3COMMS_DEBUG else fprintf(stdout, "GETSIZE: OK\n"); @@ -1225,12 +1225,12 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) if (handle->magic != S3COMMS_S3R_MAGIC) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic."); if (handle->curlhandle == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.") + 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.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url."); 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF"); curlh = handle->curlhandle; @@ -1365,13 +1365,13 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not format ISO8601 time."); if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-date", (const char *)iso8601now)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header") + 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."); 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") + 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."); assert(headers->magic == S3COMMS_HRB_NODE_MAGIC); @@ -1379,7 +1379,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) if (HDstrlen((const char *)handle->token) > 0) { if (FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-security-token", (const char *)handle->token)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-security-token header") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-security-token header"); if (headers == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list."); assert(headers->magic == S3COMMS_HRB_NODE_MAGIC); @@ -1387,14 +1387,14 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) 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") + 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."); 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") + 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."); assert(headers->magic == S3COMMS_HRB_NODE_MAGIC); @@ -1430,7 +1430,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) /* append authorization header to http request buffer */ if (H5FD_s3comms_hrb_node_set(&headers, "Authorization", (const char *)authorization) == FAIL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set Authorization header") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set Authorization header"); if (headers == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list."); @@ -1473,26 +1473,26 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) curlerrbuf[0] = '\0'; if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem setting error buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem setting error buffer"); p_status = curl_easy_perform(curlh); 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code"); fprintf(stdout, "CURL ERROR CODE: %d\nHTTP CODE: %ld\n", p_status, httpcode); fprintf(stdout, "%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)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem unsetting error buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem unsetting error buffer"); } /* verbose error reporting */ #else p_status = curl_easy_perform(curlh); if (p_status != CURLE_OK) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "curl cannot perform request") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "curl cannot perform request"); #endif #if S3COMMS_DEBUG @@ -1769,9 +1769,9 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len, #endif if (dest == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hex destination cannot be null.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hex destination cannot be null."); if (msg == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null."); for (i = 0; i < msg_len; i++) { int chars_written = HDsnprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */ @@ -1958,7 +1958,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha /* format target line for start of profile */ if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label") + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label"); /* look for start of profile */ do { @@ -1991,7 +1991,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha setting_name = setting_names[setting_i]; setting_name_len = HDstrlen(setting_name); if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix") + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix"); /* found a matching name? */ if (!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) { @@ -2007,7 +2007,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha } while (*line_buffer != 0 && *line_buffer != '='); if (*line_buffer == 0 || *(line_buffer + 1) == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incomplete assignment in file") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incomplete assignment in file"); line_buffer++; /* was pointing at '='; advance */ /* copy line buffer into out pointer */ @@ -2079,33 +2079,33 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char * ret = HDsnprintf(awspath, 117, "%s/.aws/", HDgetenv("HOME")); #endif if (ret < 0 || (size_t)ret >= 117) - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path") + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path"); ret = HDsnprintf(filepath, 128, "%s%s", awspath, "credentials"); if (ret < 0 || (size_t)ret >= 128) - HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path") + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path"); 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) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws credentials") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws credentials"); if (fclose(credfile) == EOF) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close credentials file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close credentials file"); credfile = NULL; } /* end if credential file opened */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path"); 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, (*secret_access_key_out == 0) ? secret_access_key_out : NULL, (*aws_region_out == 0) ? aws_region_out : NULL) == FAIL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws config") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws config"); if (fclose(credfile) == EOF) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close config file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close config file"); credfile = NULL; } /* end if credential file opened */ @@ -2283,7 +2283,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) } /* end else (IPv4) */ len = tmpstr - curstr; if (len == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty"); else if (len > urllen) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of HOST substring"); @@ -2305,7 +2305,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) tmpstr++; len = tmpstr - curstr; if (len == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty"); else if (len > urllen) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PORT substring"); for (i = 0; i < len; i++) @@ -2355,7 +2355,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl) tmpstr++; len = tmpstr - curstr; if (len == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty"); else if (len > urllen) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of QUERY substring"); purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1)); @@ -2430,7 +2430,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr #endif if (repr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`."); #if S3COMMS_DEBUG H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE); @@ -2575,18 +2575,18 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi #endif if (md == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Destination `md` cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Destination `md` cannot be NULL."); if (secret == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`secret` cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`secret` cannot be NULL."); if (region == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`region` cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`region` cannot be NULL."); if (iso8601now == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL."); AWS4_secret_len = 4 + HDstrlen(secret) + 1; AWS4_secret = (char *)H5MM_malloc(sizeof(char *) * AWS4_secret_len); if (AWS4_secret == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space."); /* prepend "AWS4" to start of the secret key */ ret = HDsnprintf(AWS4_secret, AWS4_secret_len, "%s%s", "AWS4", secret); @@ -2664,13 +2664,13 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const #endif if (dest == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer cannot be null.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer cannot be null."); if (req == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request cannot be null.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request cannot be null."); if (now == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Timestring cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Timestring cannot be NULL."); if (region == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Region cannot be NULL.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Region cannot be NULL."); for (i = 0; i < 128; i++) tmp[i] = '\0'; @@ -2682,7 +2682,7 @@ H5FD_s3comms_tostringtosign(char *dest, const char *req, const char *now, const day[8] = '\0'; ret = HDsnprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region); if (ret <= 0 || ret >= 127) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string"); H5MM_memcpy((dest + d), "AWS4-HMAC-SHA256\n", 17); d = 17; @@ -2748,7 +2748,7 @@ H5FD_s3comms_trim(char *dest, char *s, size_t s_len, size_t *n_written) #endif if (dest == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null."); if (s == NULL) s_len = 0; diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 8bca57b..a964a69 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -262,7 +262,7 @@ H5Pset_fapl_sec2(hid_t fapl_id) H5TRACE1("e", "i", fapl_id); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); ret_value = H5P_set_driver(plist, H5FD_SEC2, NULL, NULL); @@ -302,11 +302,11 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); /* Build the open flags */ o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY; @@ -331,7 +331,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Create the new file struct */ if (NULL == (file = H5FL_CALLOC(H5FD_sec2_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct"); file->fd = fd; H5_CHECKED_ASSIGN(file->eof, haddr_t, sb.st_size, h5_stat_size_t); @@ -340,10 +340,10 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr #ifdef H5_HAVE_WIN32_API file->hFile = (HANDLE)_get_osfhandle(fd); if (INVALID_HANDLE_VALUE == file->hFile) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file handle"); if (!GetFileInformationByHandle((HANDLE)file->hFile, &fileinfo)) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to get Windows file information"); file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; @@ -355,7 +355,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Get the FAPL */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, NULL, "not a file access property list"); /* Check the file locking flags in the fapl */ if (ignore_disabled_file_locks_s != FAIL) @@ -364,7 +364,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr else { /* Use the value in the property list */ if (H5P_get(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, &file->ignore_disabled_file_locks) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get ignore disabled file locks property"); } /* Retain a copy of the name used to open the file, for possible error reporting */ @@ -381,7 +381,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr */ if (H5P_exist_plist(plist, H5F_ACS_FAMILY_TO_SINGLE_NAME) > 0) if (H5P_get(plist, H5F_ACS_FAMILY_TO_SINGLE_NAME, &file->fam_to_single) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to single") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get property of changing family to single"); } /* end if */ /* Set return value */ @@ -621,7 +621,7 @@ H5FD__sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_hand FUNC_ENTER_PACKAGE if (!file_handle) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); *file_handle = &(file->fd); @@ -657,9 +657,9 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU /* Check for overflow conditions */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr); #ifndef H5_HAVE_PREADWRITE /* Seek to the correct location (if we don't have pread) */ @@ -762,10 +762,10 @@ H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN /* Check for overflow conditions */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr); if (REGION_OVERFLOW(addr, size)) HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu", - (unsigned long long)addr, (unsigned long long)size) + (unsigned long long)addr, (unsigned long long)size); #ifndef H5_HAVE_PREADWRITE /* Seek to the correct location (if we don't have pwrite) */ @@ -880,12 +880,12 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR if (INVALID_SET_FILE_POINTER == dwPtrLow) { dwError = GetLastError(); if (dwError != NO_ERROR) - HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer") + HGOTO_ERROR(H5E_FILE, H5E_FILEOPEN, FAIL, "unable to set file pointer"); } bError = SetEndOfFile(file->hFile); if (0 == bError) - HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") + HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly"); #else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") @@ -1034,7 +1034,7 @@ H5FD__sec2_ctl(H5FD_t H5_ATTR_UNUSED *_file, uint64_t H5_ATTR_UNUSED op_code, ui /* No op codes are understood. */ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 23f53b4..364a449 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -101,7 +101,7 @@ H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size) /* Check for overflow when extending */ if (H5_addr_overflow(eoa, size) || (eoa + size) > file->maxaddr) - HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed") + HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed"); /* Set the [NOT aligned] address to return */ ret_value = eoa; @@ -109,7 +109,7 @@ H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size) /* Extend the end-of-allocated space address */ eoa += size; if (file->cls->set_eoa(file, type, eoa) < 0) - HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed") + HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "file allocation request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -181,12 +181,12 @@ H5FD__alloc_real(H5FD_t *file, H5FD_mem_t type, hsize_t size, haddr_t *frag_addr if (file->cls->alloc) { ret_value = (file->cls->alloc)(file, type, H5CX_get_dxpl(), use_alloc_size ? size : size + extra); if (!H5_addr_defined(ret_value)) - HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver allocation request failed") + HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver allocation request failed"); } /* end if */ else { ret_value = H5FD__extend(file, type, size + extra); if (!H5_addr_defined(ret_value)) - HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver eoa update request failed") + HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver eoa update request failed"); } /* end else */ /* Set the [possibly aligned] address to return */ @@ -238,11 +238,11 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, H5F_t *f, hsize_t size, haddr_t *frag_ /* Call the real 'alloc' routine */ ret_value = H5FD__alloc_real(file, type, size, frag_addr, frag_size); if (!H5_addr_defined(ret_value)) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "real 'alloc' request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "real 'alloc' request failed"); /* Mark EOA info dirty in cache, so change will get encoded */ if (H5F_eoa_dirty(f) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark EOA info as dirty") + HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark EOA info as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -278,14 +278,14 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) /* Sanity checking */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file offset") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file offset"); /* Convert address to absolute file offset */ addr += file->base_addr; /* More sanity checking */ if (addr > file->maxaddr || H5_addr_overflow(addr, size) || (addr + size) > file->maxaddr) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file free space region to free") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid file free space region to free"); /* Check for file driver 'free' callback and call it if available */ if (file->cls->free) { @@ -293,7 +293,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "driver free request failed"); } /* end if */ /* Check if this free block is at the end of file allocated space. * Truncate it if this is true. @@ -310,7 +310,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "set end of space allocation request failed"); } /* end if */ } /* end else-if */ else { @@ -355,11 +355,11 @@ H5FD_free(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t addr, hsize_t size) /* Call the real 'free' routine */ if (H5FD__free_real(file, type, addr, size) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "real 'free' request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "real 'free' request failed"); /* Mark EOA info dirty in cache, so change will get encoded */ if (H5F_eoa_dirty(f) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA info as dirty") + HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA info as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -397,7 +397,7 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_ /* Retrieve the end of the address space */ if (HADDR_UNDEF == (eoa = file->cls->get_eoa(file, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* Adjust block end by base address of the file, to create absolute address */ blk_end += file->base_addr; @@ -406,11 +406,11 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_ if (H5_addr_eq(blk_end, eoa)) { /* Extend the object by extending the underlying file */ if (HADDR_UNDEF == H5FD__extend(file, type, extra_requested)) - HGOTO_ERROR(H5E_VFL, H5E_CANTEXTEND, FAIL, "driver extend request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTEXTEND, FAIL, "driver extend request failed"); /* Mark EOA info dirty in cache, so change will get encoded */ if (H5F_eoa_dirty(f) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA info as dirty") + HGOTO_ERROR(H5E_VFL, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA info as dirty"); /* Indicate success */ HGOTO_DONE(TRUE); diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 159a161..cf893f3 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -81,7 +81,7 @@ typedef struct H5FD_splitter_t { { \ H5FD__splitter_log_error((file), (funcname), (mesg)); \ if (FALSE == (file)->fa.ignore_wo_errs) \ - HGOTO_ERROR((errmajor), (errminor), (ret), (mesg)) \ + HGOTO_ERROR((errmajor), (errminor), (ret), (mesg)); \ } #define H5FD_SPLITTER_DEBUG_OP_CALLS 0 /* debugging print toggle; 0 disables */ @@ -292,18 +292,18 @@ H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *vfd_config) H5FD_SPLITTER_LOG_CALL(__func__); if (H5FD_SPLITTER_MAGIC != vfd_config->magic) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid configuration (magic number mismatch)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid configuration (magic number mismatch)"); if (H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != vfd_config->version) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid config (version number mismatch)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid config (version number mismatch)"); if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid property list"); info = H5FL_CALLOC(H5FD_splitter_fapl_t); if (NULL == info) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct"); if (H5FD__splitter_populate_config(vfd_config, info) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't setup driver configuration") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't setup driver configuration"); ret_value = H5P_set_driver(plist_ptr, H5FD_SPLITTER, info, NULL); @@ -341,13 +341,13 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/) /* Check arguments */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (config == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config pointer is null") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config pointer is null"); if (H5FD_SPLITTER_MAGIC != config->magic) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (magic number mismatch)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (magic number mismatch)"); if (H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != config->version) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (version unsafe)") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (version unsafe)"); /* Pre-set out FAPL IDs with intent to replace these values */ config->rw_fapl_id = H5I_INVALID_HID; @@ -355,15 +355,15 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/) /* Check and get the splitter fapl */ if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_SPLITTER != H5P_peek_driver(plist_ptr)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver"); fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist_ptr); if (NULL == fapl_ptr) { if (NULL == (default_fapl = H5FL_CALLOC(H5FD_splitter_fapl_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct"); if (H5FD__splitter_populate_config(NULL, default_fapl) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info"); fapl_ptr = default_fapl; } @@ -411,7 +411,7 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli if (!vfd_config) { vfd_config = H5MM_calloc(sizeof(H5FD_splitter_vfd_config_t)); if (NULL == vfd_config) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct"); vfd_config->magic = H5FD_SPLITTER_MAGIC; vfd_config->version = H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION; @@ -435,16 +435,16 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli wo_plist_ptr = (H5P_genplist_t *)H5I_object(vfd_config->wo_fapl_id); if (NULL == wo_plist_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_peek(wo_plist_ptr, H5F_ACS_FILE_DRV_NAME, &wo_driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info"); wo_driver = (H5FD_class_t *)H5I_object(wo_driver_prop.driver_id); if (NULL == wo_driver) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver ID in file access property list") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver ID in file access property list"); if (H5FD_driver_query(wo_driver, &wo_driver_flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't query VFD flags") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't query VFD flags"); if (0 == (H5FD_FEAT_DEFAULT_VFD_COMPATIBLE & wo_driver_flags)) - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unsuitable W/O driver") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unsuitable W/O driver"); } /* end if W/O VFD is non-default */ fapl_out->ignore_wo_errs = vfd_config->ignore_wo_errs; @@ -456,12 +456,12 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli fapl_out->wo_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */ if (NULL == (def_plist = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); /* Set non-default channel FAPL IDs in splitter configuration info */ if (H5P_DEFAULT != vfd_config->rw_fapl_id) { if (FALSE == H5P_isa_class(vfd_config->rw_fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); fapl_out->rw_fapl_id = vfd_config->rw_fapl_id; } else { @@ -471,15 +471,15 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli * would cause recursion badness. */ if ((fapl_out->rw_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list"); if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_out->rw_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL"); } if (H5P_DEFAULT != vfd_config->wo_fapl_id) { if (FALSE == H5P_isa_class(vfd_config->wo_fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list"); fapl_out->wo_fapl_id = vfd_config->wo_fapl_id; } else { @@ -489,11 +489,11 @@ H5FD__splitter_populate_config(H5FD_splitter_vfd_config_t *vfd_config, H5FD_spli * would cause recursion badness. */ if ((fapl_out->wo_fapl_id = H5P_copy_plist(def_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list") + HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "can't copy property list"); if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_out->wo_fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_set_driver_by_value(plist, H5_VFD_SEC2, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default driver on R/W channel FAPL"); } done: @@ -529,7 +529,7 @@ H5FD__splitter_get_default_wo_path(char *new_path, size_t new_path_len, const ch /* Check that output buffer can hold base filename + `_wo` suffix */ old_filename_len = HDstrlen(base_filename); if (old_filename_len > H5FD_SPLITTER_PATH_MAX - HDstrlen(suffix) - 1) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "filename exceeds max length") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "filename exceeds max length"); /* Determine if filename contains a ".h5" extension. */ if ((file_extension = HDstrstr(base_filename, ".h5"))) { @@ -579,7 +579,7 @@ H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin /* Public API for dxpl "context" */ if (H5FDflush(file->rw_file, dxpl_id, closing) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush R/W file"); if (H5FDflush(file->wo_file, dxpl_id, closing) < 0) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file") @@ -617,14 +617,14 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR /* Check for overflow conditions */ if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr); if (REGION_OVERFLOW(addr, size)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr) + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr); /* Only read from R/W channel */ /* Public API for dxpl "context" */ if (H5FDread(file->rw_file, type, dxpl_id, addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "Reading from R/W channel failed") + HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "Reading from R/W channel failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -653,12 +653,12 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr H5FD_SPLITTER_LOG_CALL(__func__); if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Write to each file */ /* Public API for dxpl "context" */ if (H5FDwrite(file->rw_file, type, dxpl_id, addr, size, buf) < 0) - HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "R/W file write failed") + HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "R/W file write failed"); if (H5FDwrite(file->wo_file, type, dxpl_id, addr, size, buf) < 0) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file") @@ -717,7 +717,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa) new_fa_ptr = H5FL_CALLOC(H5FD_splitter_fapl_t); if (NULL == new_fa_ptr) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL"); H5MM_memcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_splitter_fapl_t)); HDstrncpy(new_fa_ptr->wo_path, old_fa_ptr->wo_path, H5FD_SPLITTER_PATH_MAX + 1); @@ -761,9 +761,9 @@ H5FD__splitter_fapl_free(void *_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") + HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close R/W FAPL ID"); if (H5I_dec_ref(fapl->wo_fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close W/O FAPL ID") + HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close W/O FAPL ID"); /* Free the property list */ fapl = H5FL_FREE(H5FD_splitter_fapl_t, fapl); @@ -798,36 +798,36 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name") + 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr"); if (ADDR_OVERFLOW(maxaddr)) - HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr") + HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr"); if (H5FD_SPLITTER != H5Pget_driver(splitter_fapl_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "driver is not splitter") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "driver is not splitter"); file_ptr = (H5FD_splitter_t *)H5FL_CALLOC(H5FD_splitter_t); if (NULL == file_ptr) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct"); file_ptr->fa.rw_fapl_id = H5I_INVALID_HID; file_ptr->fa.wo_fapl_id = H5I_INVALID_HID; /* Get the driver-specific file access properties */ plist_ptr = (H5P_genplist_t *)H5I_object(splitter_fapl_id); if (NULL == plist_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist_ptr); if (NULL == fapl_ptr) { if (NULL == (default_fapl = H5FL_CALLOC(H5FD_splitter_fapl_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file access property list struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file access property list struct"); if (H5FD__splitter_populate_config(NULL, default_fapl) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't initialize driver configuration info"); /* If W/O path is not set, use base filename with '_wo' suffix */ if (*default_fapl->wo_path == '\0') if (H5FD__splitter_get_default_wo_path(default_fapl->wo_path, H5FD_SPLITTER_PATH_MAX + 1, name) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't generate default filename for W/O channel") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, NULL, "can't generate default filename for W/O channel"); fapl_ptr = default_fapl; } @@ -851,13 +851,13 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha if (file_ptr->fa.log_file_path[0] != '\0') { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open log file"); } /* end if logfile path given */ } /* end if logfile pointer/handle does not exist */ file_ptr->rw_file = H5FD_open(name, flags, fapl_ptr->rw_fapl_id, HADDR_UNDEF); if (!file_ptr->rw_file) - HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open R/W file"); file_ptr->wo_file = H5FD_open(fapl_ptr->wo_path, flags, fapl_ptr->wo_fapl_id, HADDR_UNDEF); if (!file_ptr->wo_file) @@ -911,13 +911,13 @@ H5FD__splitter_close(H5FD_t *_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") + HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close R/W FAPL"); if (H5I_dec_ref(file->fa.wo_fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close W/O FAPL") + HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close W/O FAPL"); if (file->rw_file) if (H5FD_close(file->rw_file) == FAIL) - HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close R/W file"); if (file->wo_file) if (H5FD_close(file->wo_file) == FAIL) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTCLOSEFILE, FAIL, @@ -963,7 +963,7 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) 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") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, HADDR_UNDEF, "unable to get eoa"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -995,7 +995,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file"); if (H5FD_set_eoa(file->wo_file, type, addr) < 0) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file") @@ -1031,7 +1031,7 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "unable to get eof"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1060,7 +1060,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file"); if (H5FDtruncate(file->wo_file, dxpl_id, closing) < 0) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file") @@ -1126,7 +1126,7 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf / 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1157,7 +1157,7 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1217,7 +1217,7 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_ /* Only do for R/W channel */ if (H5FD_get_vfd_handle(file->rw_file, file->fa.rw_fapl_id, file_handle) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to get handle of R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to get handle of R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1246,7 +1246,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw) /* Place the lock on each file */ if (H5FD_lock(file->rw_file, rw) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock R/W file"); if (file->wo_file != NULL) if (H5FD_lock(file->wo_file, rw) < 0) @@ -1280,11 +1280,11 @@ H5FD__splitter_unlock(H5FD_t *_file) /* Remove the lock on each file */ if (H5FD_unlock(file->rw_file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock R/W file"); if (file->wo_file != NULL) if (H5FD_unlock(file->wo_file) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock W/O file") + HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock W/O file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1328,7 +1328,7 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void * if (flags & H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG) { /* Pass ctl call down to R/W channel VFD */ if (H5FDctl(file->rw_file, op_code, flags, input, output) < 0) - HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed") + HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "VFD ctl request failed"); } else { /* If no valid VFD routing flag is specified, fail for unknown op code @@ -1336,7 +1336,7 @@ H5FD__splitter_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void * */ if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG) HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, - "VFD ctl request failed (unknown op code and fail if unknown flag is set)") + "VFD ctl request failed (unknown op code and fail if unknown flag is set)"); } break; @@ -1408,7 +1408,7 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size /* 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) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate for R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate for R/W file"); if (H5FDalloc(file->wo_file, type, dxpl_id, size) == HADDR_UNDEF) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, @@ -1442,7 +1442,7 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map) /* Retrieve memory type mapping for R/W channel only */ if (H5FD_get_fs_type_map(file->rw_file, type_map) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to allocate for R/W file") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to allocate for R/W file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1471,7 +1471,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file"); if (H5FDfree(file->wo_file, type, dxpl_id, addr, size) < 0) H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file") @@ -1504,42 +1504,43 @@ H5FD__splitter_delete(const char *filename, hid_t fapl_id) /* Get the driver info */ if (H5P_FILE_ACCESS_DEFAULT == fapl_id) { if (NULL == (default_fapl = H5FL_CALLOC(H5FD_splitter_fapl_t))) - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct") + HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct"); if (H5FD__splitter_populate_config(NULL, default_fapl) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info"); /* If W/O path is not set, use base filename with '_wo' suffix */ if (*default_fapl->wo_path == '\0') if (H5FD__splitter_get_default_wo_path(default_fapl->wo_path, H5FD_SPLITTER_PATH_MAX + 1, filename) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't generate default filename for W/O channel") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't generate default filename for W/O channel"); fapl_ptr = default_fapl; } else { if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (NULL == (fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist))) { if (NULL == (default_fapl = H5FL_CALLOC(H5FD_splitter_fapl_t))) HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, - "unable to allocate file access property list struct") + "unable to allocate file access property list struct"); if (H5FD__splitter_populate_config(NULL, default_fapl) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't initialize driver configuration info"); /* If W/O path is not set, use base filename with '_wo' suffix */ if (*default_fapl->wo_path == '\0') if (H5FD__splitter_get_default_wo_path(default_fapl->wo_path, H5FD_SPLITTER_PATH_MAX + 1, filename) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't generate default filename for W/O channel") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, + "can't generate default filename for W/O channel"); fapl_ptr = default_fapl; } } if (H5FDdelete(filename, fapl_ptr->rw_fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file") + HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete file"); if (H5FDdelete(fapl_ptr->wo_path, fapl_ptr->wo_fapl_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete W/O channel file") + HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete W/O channel file"); done: if (default_fapl) diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c index a060e29..e38a4d3 100644 --- a/src/H5FDwindows.c +++ b/src/H5FDwindows.c @@ -50,7 +50,7 @@ H5Pset_fapl_windows(hid_t fapl_id) H5TRACE1("e", "i", fapl_id); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); ret_value = H5P_set_driver(plist, H5FD_WINDOWS, NULL, NULL); diff --git a/src/H5FL.c b/src/H5FL.c index 2b7896c..ec952b7 100644 --- a/src/H5FL.c +++ b/src/H5FL.c @@ -231,11 +231,11 @@ H5FL__malloc(size_t mem_size) if (NULL == (ret_value = H5MM_malloc(mem_size))) { /* If we can't allocate the memory now, try garbage collecting first */ if (H5FL_garbage_coll() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during allocation") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during allocation"); /* Now try allocating the memory again */ if (NULL == (ret_value = H5MM_malloc(mem_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk"); } /* end if */ done: @@ -263,7 +263,7 @@ H5FL__reg_init(H5FL_reg_head_t *head) /* Allocate a new garbage collection node */ if (NULL == (new_node = (H5FL_reg_gc_node_t *)H5MM_malloc(sizeof(H5FL_reg_gc_node_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the new garbage collection node */ new_node->list = head; @@ -359,12 +359,12 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj) /* First check this particular list */ if (head->onlist * head->size > H5FL_reg_lst_mem_lim) if (H5FL__reg_gc_list(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); /* Then check the global amount memory on regular free lists */ if (H5FL_reg_gc_head.mem_freed > H5FL_reg_glb_mem_lim) if (H5FL__reg_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -393,7 +393,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS) /* Make certain the list is initialized first */ if (!head->init) if (H5FL__reg_init(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'regular' blocks") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'regular' blocks"); /* Check for nodes available on the free list first */ if (head->list != NULL) { @@ -412,7 +412,7 @@ H5FL_reg_malloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS) /* Otherwise allocate a node */ else { if (NULL == (ret_value = H5FL__malloc(head->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Increment the number of blocks allocated in list */ head->allocated++; @@ -466,7 +466,7 @@ H5FL_reg_calloc(H5FL_reg_head_t *head H5FL_TRACK_PARAMS) /* Allocate the block */ if (NULL == (ret_value = H5FL_reg_malloc(head H5FL_TRACK_INFO_INT))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear to zeros */ /* (Accommodate tracking information, if present) */ @@ -544,7 +544,7 @@ H5FL__reg_gc(void) while (gc_node != NULL) { /* Release the free nodes on the list */ if (H5FL__reg_gc_list(gc_node->list) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed"); /* Go on to the next free list to garbage collect */ gc_node = gc_node->next; @@ -702,7 +702,7 @@ H5FL__blk_create_list(H5FL_blk_node_t **head, size_t size) /* Allocate room for the new free list node */ if (NULL == (ret_value = H5FL_CALLOC(H5FL_blk_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed for chunk info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed for chunk info"); /* Set the correct values for the new free list */ ret_value->size = size; @@ -741,7 +741,7 @@ H5FL__blk_init(H5FL_blk_head_t *head) /* Allocate a new garbage collection node */ if (NULL == (new_node = (H5FL_blk_gc_node_t *)H5MM_malloc(sizeof(H5FL_blk_gc_node_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the new garbage collection node */ new_node->pq = head; @@ -818,7 +818,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS) /* Make certain the list is initialized first */ if (!head->init) if (H5FL__blk_init(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'block' list") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'block' list"); /* check if there is a free list for blocks of this size */ /* and if there are any blocks available on the list */ @@ -846,7 +846,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS) /* Allocate new node, with room for the page info header and the actual page data */ if (NULL == (temp = (H5FL_blk_list_t *)H5FL__malloc(sizeof(H5FL_blk_list_t) + H5FL_TRACK_SIZE + size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for chunk"); /* Increment the number of blocks of this size */ free_list->allocated++; @@ -914,7 +914,7 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size H5FL_TRACK_PARAMS) /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear the block to zeros */ memset(ret_value, 0, size); @@ -1001,7 +1001,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block) /* No free list available, create a new list node and insert it to the queue */ free_list = H5FL__blk_create_list(&(head->head), free_size); if (NULL == free_list) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "couldn't create new list node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "couldn't create new list node"); /* Prepend the free'd native block to the front of the free list */ temp->next = free_list->list; /* Note: Overwrites the size field in union */ @@ -1019,12 +1019,12 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block) /* First check this particular list */ if (head->list_mem > H5FL_blk_lst_mem_lim) if (H5FL__blk_gc_list(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); /* Then check the global amount memory on block free lists */ if (H5FL_blk_gc_head.mem_freed > H5FL_blk_glb_mem_lim) if (H5FL__blk_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1068,7 +1068,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_ size_t blk_size; /* Temporary block size */ if ((ret_value = H5FL_blk_malloc(head, new_size H5FL_TRACK_INFO_INT)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block"); blk_size = MIN(new_size, temp->size); H5MM_memcpy(ret_value, block, blk_size); H5FL_blk_free(head, block); @@ -1221,7 +1221,7 @@ H5FL__blk_gc(void) while (gc_node != NULL) { /* For each free list being garbage collected, walk through the nodes and free them */ if (H5FL__blk_gc_list(gc_node->pq) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed"); /* Go on to the next free list to garbage collect */ gc_node = gc_node->next; @@ -1318,7 +1318,7 @@ H5FL__arr_init(H5FL_arr_head_t *head) /* Allocate a new garbage collection node */ if (NULL == (new_node = (H5FL_gc_arr_node_t *)H5MM_malloc(sizeof(H5FL_gc_arr_node_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the new garbage collection node */ new_node->list = head; @@ -1330,7 +1330,7 @@ H5FL__arr_init(H5FL_arr_head_t *head) /* Allocate room for the free lists */ if (NULL == (head->list_arr = (H5FL_arr_node_t *)H5MM_calloc((size_t)head->maxelem * sizeof(H5FL_arr_node_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the size of each array */ for (u = 0; u < (size_t)head->maxelem; u++) @@ -1438,12 +1438,12 @@ H5FL_arr_free(H5FL_arr_head_t *head, void *obj) /* First check this particular list */ if (head->list_mem > H5FL_arr_lst_mem_lim) if (H5FL__arr_gc_list(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); /* Then check the global amount memory on array free lists */ if (H5FL_arr_gc_head.mem_freed > H5FL_arr_glb_mem_lim) if (H5FL__arr_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1475,7 +1475,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS) /* Make certain the list is initialized first */ if (!head->init) if (H5FL__arr_init(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'array' blocks") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't initialize 'array' blocks"); /* Sanity check that the number of elements is supported */ assert(elem <= (unsigned)head->maxelem); @@ -1503,7 +1503,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS) else { if (NULL == (new_obj = (H5FL_arr_list_t *)H5FL__malloc(sizeof(H5FL_arr_list_t) + H5FL_TRACK_SIZE + mem_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Increment the number of blocks of this size */ head->list_arr[elem].allocated++; @@ -1567,7 +1567,7 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem H5FL_TRACK_PARAMS) /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear to zeros */ memset(ret_value, 0, head->list_arr[elem].size); @@ -1742,7 +1742,7 @@ H5FL__arr_gc(void) while (gc_arr_node != NULL) { /* Release the free nodes on the list */ if (H5FL__arr_gc_list(gc_arr_node->list) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed"); /* Go on to the next free list to garbage collect */ gc_arr_node = gc_arr_node->next; @@ -1954,14 +1954,14 @@ H5FL_fac_init(size_t size) /* Allocate room for the new factory */ if (NULL == (factory = (H5FL_fac_head_t *)H5FL_CALLOC(H5FL_fac_head_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for factory object") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for factory object"); /* Set size of blocks for factory */ factory->size = size; /* Allocate a new garbage collection node */ if (NULL == (new_node = (H5FL_fac_gc_node_t *)H5FL_MALLOC(H5FL_fac_gc_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Initialize the new garbage collection node */ new_node->list = factory; @@ -2069,12 +2069,12 @@ H5FL_fac_free(H5FL_fac_head_t *head, void *obj) /* First check this particular list */ if (head->onlist * head->size > H5FL_fac_lst_mem_lim) if (H5FL__fac_gc_list(head) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); /* Then check the global amount memory on factory free lists */ if (H5FL_fac_gc_head.mem_freed > H5FL_fac_glb_mem_lim) if (H5FL__fac_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, NULL, "garbage collection failed during free"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2119,7 +2119,7 @@ H5FL_fac_malloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS) /* Otherwise allocate a node */ else { if (NULL == (ret_value = H5FL__malloc(head->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Increment the number of blocks allocated in list */ head->allocated++; @@ -2174,7 +2174,7 @@ H5FL_fac_calloc(H5FL_fac_head_t *head H5FL_TRACK_PARAMS) /* Allocate the block */ if (NULL == (ret_value = H5FL_fac_malloc(head H5FL_TRACK_INFO_INT))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear to zeros */ /* (Accommodate tracking information, if present) */ @@ -2252,7 +2252,7 @@ H5FL__fac_gc(void) while (gc_node != NULL) { /* Release the free nodes on the list */ if (H5FL__fac_gc_list(gc_node->list) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of list failed"); /* Go on to the next free list to garbage collect */ gc_node = gc_node->next; @@ -2289,11 +2289,11 @@ H5FL_fac_term(H5FL_fac_head_t *factory) /* Garbage collect all the blocks in the factory's free list */ if (H5FL__fac_gc_list(factory) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of factory failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "garbage collection of factory failed"); /* Verify that all the blocks have been freed */ if (factory->allocated > 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "factory still has objects allocated") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "factory still has objects allocated"); /* Unlink block free list for factory from global free list */ if (factory->prev_gc) { @@ -2383,19 +2383,19 @@ H5FL_garbage_coll(void) /* Garbage collect the free lists for array objects */ if (H5FL__arr_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect array objects") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect array objects"); /* Garbage collect free lists for blocks */ if (H5FL__blk_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect block objects") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect block objects"); /* Garbage collect the free lists for regular objects */ if (H5FL__reg_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect regular objects") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect regular objects"); /* Garbage collect the free lists for factory objects */ if (H5FL__fac_gc() < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect factory objects") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGC, FAIL, "can't garbage collect factory objects"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FO.c b/src/H5FO.c index 5ebd8a9..8a8f4d5 100644 --- a/src/H5FO.c +++ b/src/H5FO.c @@ -78,7 +78,7 @@ H5FO_create(const H5F_t *f) /* Create container used to store open object info */ if ((f->shared->open_objs = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -167,7 +167,7 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag) /* Allocate new opened object information structure */ if ((open_obj = H5FL_MALLOC(H5FO_open_obj_t)) == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Assign information */ open_obj->addr = addr; @@ -176,7 +176,7 @@ H5FO_insert(const H5F_t *f, haddr_t addr, void *obj, hbool_t delete_flag) /* Insert into container */ if (H5SL_insert(f->shared->open_objs, &open_obj->addr, open_obj) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -217,12 +217,12 @@ H5FO_delete(H5F_t *f, haddr_t addr) /* Remove from container */ if (NULL == (open_obj = (H5FO_open_obj_t *)H5SL_remove(f->shared->open_objs, &addr))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container"); /* Check if the object was deleted from the file */ if (open_obj->deleted) { if (H5O_delete(f, addr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file"); } /* end if */ /* Release the object information */ @@ -347,11 +347,11 @@ H5FO_dest(const H5F_t *f) /* Check if the object info set is empty */ if (H5SL_count(f->shared->open_objs) != 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set"); /* Release the open object info set container */ if (H5SL_close(f->shared->open_objs) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set"); f->shared->open_objs = NULL; @@ -389,7 +389,7 @@ H5FO_top_create(H5F_t *f) /* Create container used to store open object info */ if ((f->obj_count = H5SL_create(H5SL_TYPE_HADDR, NULL)) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create open object container"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -434,7 +434,7 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr) else { /* Allocate new opened object information structure */ if (NULL == (obj_count = H5FL_MALLOC(H5FO_obj_count_t))) - HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_CACHE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Assign information */ obj_count->addr = addr; @@ -442,7 +442,7 @@ H5FO_top_incr(const H5F_t *f, haddr_t addr) /* Insert into container */ if (H5SL_insert(f->obj_count, &obj_count->addr, obj_count) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert object into container"); } /* end if */ done: @@ -489,14 +489,14 @@ H5FO_top_decr(const H5F_t *f, haddr_t addr) if (obj_count->count == 0) { /* Remove from container */ if (NULL == (obj_count = (H5FO_obj_count_t *)H5SL_remove(f->obj_count, &addr))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "can't remove object from container"); /* Release the object information */ obj_count = H5FL_FREE(H5FO_obj_count_t, obj_count); } /* end if */ } /* end if */ else - HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't decrement ref. count") + HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't decrement ref. count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -574,11 +574,11 @@ H5FO_top_dest(H5F_t *f) /* Check if the object count set is empty */ if (H5SL_count(f->obj_count) != 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "objects still in open object info set"); /* Release the open object count set container */ if (H5SL_close(f->obj_count) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set") + HGOTO_ERROR(H5E_CACHE, H5E_CANTCLOSEOBJ, FAIL, "can't close open object info set"); f->obj_count = NULL; diff --git a/src/H5FS.c b/src/H5FS.c index bafc83e..40bee44 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -102,7 +102,7 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t * Allocate free space structure */ if (NULL == (fspace = H5FS__new(f, nclasses, classes, cls_init_udata))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list"); /* Initialize creation information for free space manager */ fspace->client = fs_create->client; @@ -119,11 +119,11 @@ H5FS_create(H5F_t *f, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t if (fs_addr) { /* Allocate space for the free space header */ if (HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, (hsize_t)fspace->hdr_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header"); /* Cache the new free space header (pinned) */ if (H5AC_insert_entry(f, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache"); /* Return free space header address to caller, if desired */ *fs_addr = fspace->addr; @@ -189,7 +189,7 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class /* Protect the free space header */ if (NULL == (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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space header"); #ifdef H5FS_DEBUG fprintf(stderr, "%s: fspace->sect_addr = %" PRIuHADDR "\n", __func__, fspace->sect_addr); fprintf(stderr, "%s: fspace->sect_size = %" PRIuHSIZE "\n", __func__, fspace->sect_size); @@ -201,14 +201,14 @@ H5FS_open(H5F_t *f, haddr_t fs_addr, uint16_t nclasses, const H5FS_section_class /* Increment the reference count on the free space manager header */ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header"); fspace->alignment = alignment; fspace->align_thres = threshold; /* Unlock free space header */ if (H5AC_unprotect(f, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, NULL, "unable to release free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, NULL, "unable to release free space header"); /* Set return value */ ret_value = fspace; @@ -260,7 +260,7 @@ H5FS_delete(H5F_t *f, haddr_t 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") + "unable to check metadata cache status for free space section info"); fprintf(stderr, "%s: fspace_status = %0x: ", __func__, fspace_status); if (fspace_status) { @@ -298,7 +298,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) /* Protect the free space header */ if (NULL == (fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space header"); /* Sanity check */ assert(fspace->sinfo == NULL); @@ -317,7 +317,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) /* Check the free space section info's status in the metadata cache */ if (H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "unable to check metadata cache status for free space section info") + "unable to check metadata cache status for free space section info"); /* If the free space section info is in the cache, expunge it now */ if (sinfo_status & H5AC_ES__IN_CACHE) { @@ -341,7 +341,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) if (H5AC_expunge_entry(f, H5AC_FSPACE_SINFO, fspace->sect_addr, cache_flags) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, - "unable to remove free space section info from cache") + "unable to remove free space section info from cache"); } /* end block */ #ifdef H5FS_DEBUG @@ -355,7 +355,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) /* Release the space in the file */ if (!H5F_IS_TMP_ADDR(f, fspace->sect_addr)) if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, fspace->sect_addr, fspace->alloc_sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections"); } /* end else */ } /* end if */ @@ -419,20 +419,20 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) if (H5F_USE_TMP_SPACE(f)) { if (HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc_tmp(f, fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, - "file allocation failed for free space sections") + "file allocation failed for free space sections"); } /* end if */ else { if (HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, - "file allocation failed for free space sections") + "file allocation failed for free space sections"); } /* end if */ fspace->alloc_sect_size = (size_t)fspace->sect_size; /* Mark free space header as dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); } /* end if */ } /* end if */ else @@ -442,7 +442,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) /* Cache the free space section info */ if (H5AC_insert_entry(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache"); } /* end if */ else { #ifdef H5FS_DEBUG @@ -481,13 +481,13 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) /* Mark free space header as dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); } /* end if */ else { if ((status = H5MF_try_shrink(f, H5FD_MEM_FSPACE_SINFO, fspace->sect_addr, fspace->alloc_sect_size)) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, - "can't check for absorbing section info") + "can't check for absorbing section info"); else if (status == FALSE) { /* Section info can't "go away", but it's free. Allow * header to record it @@ -508,7 +508,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) /* Mark free space header as dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); } /* end else */ } /* end else */ } /* end if */ @@ -527,19 +527,19 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) /* Mark free space header as dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); /* Free previous serialized sections disk space */ if (!H5F_IS_TMP_ADDR(f, old_sect_addr)) { if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, old_sect_addr, old_alloc_sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections"); } /* end if */ } /* end else */ } /* end if */ /* Destroy section info */ if (H5FS__sinfo_dest(fspace->sinfo) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space section info"); } /* end else */ /* Reset the header's pointer to the section info */ @@ -554,7 +554,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) /* Decrement the reference count on the free space manager header */ if (H5FS__decr(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header"); done: #ifdef H5FS_DEBUG @@ -589,14 +589,14 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes * Allocate free space structure */ if (NULL == (fspace = H5FL_CALLOC(H5FS_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list"); /* Set immutable free list parameters */ H5_CHECKED_ASSIGN(fspace->nclasses, uint16_t, nclasses, size_t); if (nclasses > 0) { if (NULL == (fspace->sect_cls = H5FL_SEQ_MALLOC(H5FS_section_class_t, nclasses))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for free space section class array") + "memory allocation failed for free space section class array"); /* Initialize the section classes for this free space list */ for (u = 0; u < nclasses; u++) { @@ -609,7 +609,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes /* Call the class initialization routine, if there is one */ if (fspace->sect_cls[u].init_cls) if ((fspace->sect_cls[u].init_cls)(&fspace->sect_cls[u], cls_init_udata) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "unable to initialize section class") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "unable to initialize section class"); /* Determine maximum class-specific serialization size for each section */ if (fspace->sect_cls[u].serial_size > fspace->max_cls_serial_size) @@ -694,7 +694,7 @@ H5FS__incr(H5FS_t *fspace) /* Check if we should pin the header in the cache */ if (fspace->rc == 0 && H5_addr_defined(fspace->addr)) if (H5AC_pin_protected_entry(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin free space header"); /* Increment reference count on header */ fspace->rc++; @@ -735,11 +735,11 @@ H5FS__decr(H5FS_t *fspace) if (fspace->rc == 0) { if (H5_addr_defined(fspace->addr)) { if (H5AC_unpin_entry(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header"); } /* end if */ else { if (H5FS__hdr_dest(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space header"); } /* end else */ } /* end if */ @@ -770,7 +770,7 @@ H5FS__dirty(H5FS_t *fspace) if (H5_addr_defined(fspace->addr)) /* Mark header as dirty in cache */ if (H5AC_mark_entry_dirty(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -799,11 +799,11 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr) if (!H5_addr_defined(fspace->addr)) { /* Allocate space for the free space header */ if (HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, (hsize_t)H5FS_HEADER_SIZE(f)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header"); /* Cache the new free space header (pinned) */ if (H5AC_insert_entry(f, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache"); } /* end if */ if (fs_addr) @@ -835,16 +835,16 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace) if (!H5_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))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for section info") + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for section info"); fspace->alloc_sect_size = fspace->sect_size; /* Mark free-space header as dirty */ if (H5FS__dirty(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty"); /* Cache the free-space section info */ if (H5AC_insert_entry(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache"); /* Since space has been allocated for the section info and the sinfo * has been inserted into the cache, relinquish ownership (i.e. float) @@ -889,7 +889,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) /* Check whether free-space manager section info is in cache or not */ if (H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, - "unable to check metadata cache status for free-space section info") + "unable to check metadata cache status for free-space section info"); /* Load free-space manager section info */ if (sinfo_status & H5AC_ES__IN_CACHE || !fspace->sinfo) { @@ -900,11 +900,11 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) cache_udata.fspace = fspace; if (NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info"); /* Unload and release ownership of the free-space manager section info */ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info"); } /* end if */ saved_addr = fspace->sect_addr; @@ -916,12 +916,12 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) /* Free space for the free-space manager section info */ if (!H5F_IS_TMP_ADDR(f, saved_addr)) { if (free_file_space && H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, saved_addr, saved_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections"); } /* end if */ /* Mark free-space manager header as dirty */ if (H5FS__dirty(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty"); } /* end if */ /* Free space for header */ @@ -931,7 +931,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) /* Check whether free-space manager header is in cache or not */ if (H5AC_get_entry_status(f, fspace->addr, &hdr_status) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, - "unable to check metadata cache status for free-space section info") + "unable to check metadata cache status for free-space section info"); if (hdr_status & H5AC_ES__IN_CACHE) { H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */ @@ -944,15 +944,15 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) cache_udata.cls_init_udata = NULL; if (NULL == (fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fspace->addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to protect free space section info"); /* Unpin the free-space manager header */ if (H5AC_unpin_entry(fspace) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header"); /* Unload and release ownership of the free-space header */ if (H5AC_unprotect(f, H5AC_FSPACE_HDR, fspace->addr, fspace, cache_flags) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info"); } /* end if */ saved_addr = fspace->addr; @@ -961,7 +961,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space) /* Free space for the free-space manager header */ if (free_file_space && H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, saved_addr, (hsize_t)H5FS_HEADER_SIZE(f)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header"); } /* end if */ done: @@ -995,7 +995,7 @@ H5FS__hdr_dest(H5FS_t *fspace) /* Call the class termination routine, if there is one */ if (fspace->sect_cls[u].term_cls) if ((fspace->sect_cls[u].term_cls)(&fspace->sect_cls[u]) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "unable to finalize section class") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "unable to finalize section class"); } /* end for */ /* Release the memory for the free space section classes */ @@ -1100,7 +1100,7 @@ H5FS__sinfo_dest(H5FS_sinfo_t *sinfo) /* Release skip list for merging sections */ if (sinfo->merge_list) if (H5SL_close(sinfo->merge_list) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy section merging skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy section merging skip list"); /* Decrement the reference count on free space header */ /* (make certain this is last action with section info, to allow for header @@ -1108,7 +1108,7 @@ H5FS__sinfo_dest(H5FS_sinfo_t *sinfo) */ sinfo->fspace->sinfo = NULL; if (H5FS__decr(sinfo->fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEC, FAIL, "unable to decrement ref. count on free space header"); sinfo->fspace = NULL; /* Release free space section info */ diff --git a/src/H5FScache.c b/src/H5FScache.c index 9554c1b..28fe2a4 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -231,24 +231,24 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len /* Allocate a new free space manager */ if (NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set free space manager's internal information */ fspace->addr = udata->addr; /* Magic number */ if (memcmp(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5FS_HDR_VERSION) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version"); /* Client ID */ fspace->client = (H5FS_client_t)*image++; if (fspace->client >= H5FS_NUM_CLIENT_ID) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header"); /* Total space tracked */ H5F_DECODE_LENGTH(udata->f, image, fspace->tot_space); @@ -266,7 +266,7 @@ H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED len /* (only check if we actually have some classes) */ UINT16DECODE(image, nclasses); if (fspace->nclasses > 0 && nclasses > fspace->nclasses) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "section class count mismatch"); /* Shrink percent */ UINT16DECODE(image, fspace->shrink_percent); @@ -487,7 +487,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT if (HADDR_UNDEF == (sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, - "file allocation failed for free space sections") + "file allocation failed for free space sections"); /* fspace->sect_size may change in size after H5MF_alloc(). * If increased in size, free the previous allocation and @@ -498,12 +498,12 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT new_sect_size = fspace->sect_size; if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, sect_addr, saved_sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections"); if (HADDR_UNDEF == (sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, new_sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, - "file allocation failed for free space sections") + "file allocation failed for free space sections"); fspace->sect_size = new_sect_size; fspace->alloc_sect_size = new_sect_size; } @@ -515,7 +515,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT /* Get the tag for this free space manager and use it to insert the entry */ if (H5AC_get_tag((const void *)fspace, &tag) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTTAG, FAIL, "can't get tag for metadata cache object") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTTAG, FAIL, "can't get tag for metadata cache object"); H5_BEGIN_TAG(tag) if (H5AC_insert_entry((H5F_t *)f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) @@ -547,14 +547,14 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT if (HADDR_UNDEF == (new_sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, - "file allocation failed for free space sections") + "file allocation failed for free space sections"); fspace->alloc_sect_size = (size_t)fspace->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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move section info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move section info"); fspace->sect_addr = new_sect_addr; } /* end else-if */ @@ -600,7 +600,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT * unprotected and un-pinned. Start by verifying this. */ if (H5AC_get_entry_status(f, fspace->sect_addr, §_status) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info status") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info status"); assert(sect_status & H5AC_ES__IN_CACHE); assert((sect_status & H5AC_ES__IS_PROTECTED) == 0); @@ -609,7 +609,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT /* Allocate space for the section info in file */ if (HADDR_UNDEF == (new_sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, fspace->sect_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections"); fspace->alloc_sect_size = (size_t)fspace->sect_size; @@ -618,7 +618,7 @@ H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_AT /* 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) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info"); /* Update the internal address for the section info */ fspace->sect_addr = new_sect_addr; @@ -779,7 +779,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED: if (H5AC_unsettle_entry_ring(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to mark FSM ring as unsettled") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to mark FSM ring as unsettled"); break; case H5AC_NOTIFY_ACTION_ENTRY_CLEANED: @@ -793,7 +793,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG - HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -830,7 +830,7 @@ H5FS__cache_hdr_free_icr(void *_thing) /* Destroy free space header */ if (H5FS__hdr_dest(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -940,24 +940,24 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l /* Allocate a new free space section info */ if (NULL == (sinfo = H5FS__sinfo_new(udata->f, fspace))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* initialize old_sect_size */ H5_CHECKED_ASSIGN(old_sect_size, size_t, fspace->sect_size, hsize_t); /* Magic number */ if (memcmp(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5FS_SINFO_VERSION) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space sections version"); /* Address of free space header for these sections */ H5F_addr_decode(udata->f, &image, &fs_addr); if (H5_addr_ne(fs_addr, fspace->addr)) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect header address for free space sections"); /* Check for any serialized sections */ if (fspace->serial_sect_count > 0) { @@ -1013,7 +1013,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTDECODE, NULL, "can't deserialize section"); /* Update offset in serialization image */ image += fspace->sect_cls[sect_type].serial_size; @@ -1022,7 +1022,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l if (!(des_flags & H5FS_DESERIALIZE_NO_ADD)) if (H5FS_sect_add(udata->f, fspace, new_sect, H5FS_ADD_DESERIALIZING, udata) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, NULL, - "can't add section to free space manager") + "can't add section to free space manager"); } /* end for */ if (fspace->tot_sect_count == old_tot_sect_count) @@ -1139,7 +1139,7 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ /* 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))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections"); fspace->alloc_sect_size = (size_t)fspace->sect_size; @@ -1148,14 +1148,14 @@ H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5_ /* 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) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMOVE, FAIL, "unable to move section info"); /* Update the internal address for the section info */ sinfo->fspace->sect_addr = sinfo_addr; /* Mark free space header as dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty"); } /* end if */ if (!H5_addr_eq(addr, sinfo_addr)) { @@ -1226,7 +1226,7 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thi if (sinfo->bins[bin].bin_list) /* Iterate over list of section size nodes for bin */ if (H5SL_iterate(sinfo->bins[bin].bin_list, H5FS__sinfo_serialize_node_cb, &udata) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes"); /* Compute checksum */ @@ -1276,7 +1276,7 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing) HGOTO_ERROR( H5E_FSPACE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency between data block and header, address = %llu", - (unsigned long long)sinfo->fspace->sect_addr) + (unsigned long long)sinfo->fspace->sect_addr); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -1292,12 +1292,12 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_BEFORE_EVICT: /* Destroy flush dependency on parent */ if (H5FS__destroy_flush_depend((H5AC_info_t *)sinfo->fspace, (H5AC_info_t *)sinfo) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); break; default: #ifdef NDEBUG - HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); #else /* NDEBUG */ assert(0 && "Unknown action?!?"); #endif /* NDEBUG */ @@ -1335,7 +1335,7 @@ H5FS__cache_sinfo_free_icr(void *_thing) /* Destroy free space info */ if (H5FS__sinfo_dest(sinfo) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1380,7 +1380,7 @@ H5FS__sinfo_serialize_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat /* Call 'serialize' callback for this section */ if (sect_cls->serialize) { if ((*sect_cls->serialize)(sect_cls, sect, *udata->image) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTSERIALIZE, FAIL, "can't synchronize section") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTSERIALIZE, FAIL, "can't synchronize section"); /* Update offset in serialization buffer */ (*udata->image) += sect_cls->serial_size; @@ -1428,7 +1428,7 @@ H5FS__sinfo_serialize_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udat /* Iterate through all the sections of this size */ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes"); } /* end if */ done: diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index 3b07052..5105032 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -103,7 +103,7 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) */ if (NULL == (fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header"); /* Print opening message */ fprintf(stream, "%*sFree Space Header...\n", indent, ""); @@ -173,7 +173,7 @@ H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *str /* Call the section's debugging routine */ if (fspace->sect_cls[sect->type].debug) if ((fspace->sect_cls[sect->type].debug)(sect, stream, indent, fwidth) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't dump section's debugging info") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't dump section's debugging info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -222,7 +222,7 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent */ if (NULL == (fspace = (H5FS_t *)H5AC_protect(f, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header"); /* Retrieve the client id */ client = fspace->client; @@ -244,12 +244,12 @@ H5FS_sects_debug(H5F_t *f, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent switch (client) { case H5FS_CLIENT_FHEAP_ID: if (H5HF_sects_debug(f, client_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump fractal heap free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump fractal heap free space sections"); break; case H5FS_CLIENT_FILE_ID: if (H5MF_sects_debug(f, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections"); break; case H5FS_NUM_CLIENT_ID: diff --git a/src/H5FSint.c b/src/H5FSint.c index d9572eb..da9f9b8 100644 --- a/src/H5FSint.c +++ b/src/H5FSint.c @@ -86,7 +86,7 @@ H5FS__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Create a flush dependency between parent and child entry */ if (H5AC_create_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -114,7 +114,7 @@ H5FS__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry) /* Destroy a flush dependency between parent and child entry */ if (H5AC_destroy_flush_dependency(parent_entry, child_entry) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FSsection.c b/src/H5FSsection.c index a233f37..7889f76 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -121,7 +121,7 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) /* Allocate the free space header */ if (NULL == (sinfo = H5FL_CALLOC(H5FS_sinfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set non-zero values */ sinfo->nbins = H5VM_log2_gen(fspace->max_sect_size); @@ -139,11 +139,11 @@ H5FS__sinfo_new(H5F_t *f, H5FS_t *fspace) /* Allocate space for the section size bins */ if (NULL == (sinfo->bins = H5FL_SEQ_CALLOC(H5FS_bin_t, (size_t)sinfo->nbins))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for free space section bin array") + "memory allocation failed for free space section bin array"); /* Increment the reference count on the free space manager header */ if (H5FS__incr(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINC, NULL, "unable to increment ref. count on free space header"); sinfo->fspace = fspace; /* Link free space manager to section info */ @@ -221,14 +221,14 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) if (H5AC_unprotect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, - "unable to release free space section info") + "unable to release free space section info"); /* Re-protect the section info with read-write access */ cache_udata.f = f; cache_udata.fspace = fspace; if (NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect( f, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections"); /* Switch the access mode we have */ fspace->sinfo_accmode = H5AC__NO_FLAGS_SET; @@ -251,7 +251,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) cache_udata.fspace = fspace; if (NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, H5AC_FSPACE_SINFO, fspace->sect_addr, &cache_udata, accmode))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections"); /* Remember that we protected the section info & the access mode */ fspace->sinfo_protected = TRUE; @@ -268,7 +268,7 @@ H5FS__sinfo_lock(H5F_t *f, H5FS_t *fspace, unsigned accmode) /* Allocate and initialize free space section info */ if (NULL == (fspace->sinfo = H5FS__sinfo_new(f, fspace))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create section info"); /* Set initial size of section info to 0 */ fspace->sect_size = fspace->alloc_sect_size = 0; @@ -342,7 +342,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) if (modified) { /* Check if the section info was protected with a different access mode */ if (fspace->sinfo_protected && (0 != ((fspace->sinfo_accmode) & H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTDIRTY, FAIL, "attempt to modify read-only section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTDIRTY, FAIL, "attempt to modify read-only section info"); /* If we modified the section info, mark it dirty */ fspace->sinfo->dirty = TRUE; @@ -354,7 +354,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) * and mark that dirty also */ if (H5FS__dirty(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty"); } /* end if */ /* Decrement the lock count on the section info */ @@ -369,7 +369,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) /* Check whether cache-flush is in progress if closing is not. */ if (!closing_or_flushing && H5AC_get_cache_flush_in_progress(f->shared->cache, &closing_or_flushing) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get flush_in_progress") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get flush_in_progress"); /* Check if we actually protected the section info */ if (fspace->sinfo_protected) { @@ -407,7 +407,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info"); /* Reset the protected flag on the section info */ fspace->sinfo_protected = FALSE; @@ -477,7 +477,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) if (!modified) if (H5FS__dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); #ifdef H5FS_SINFO_DEBUG fprintf(stderr, @@ -488,7 +488,7 @@ H5FS__sinfo_unlock(H5F_t *f, H5FS_t *fspace, hbool_t modified) /* Release space for section info in file */ if (!H5F_IS_TMP_ADDR(f, old_sect_addr)) if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, old_sect_addr, old_alloc_sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections"); } /* end if */ } /* end if */ @@ -593,7 +593,8 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls, unsigned fl /* (if we're not deserializing the sections from disk) */ if (!(flags & H5FS_ADD_DESERIALIZING)) { if (H5FS__sect_serialize_size(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, + "can't adjust free space section size on disk"); } /* end if */ } /* end else */ @@ -643,7 +644,7 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls) /* Update the free space sections' serialized size */ if (H5FS__sect_serialize_size(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk"); } /* end else */ done: @@ -714,11 +715,11 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node /* Remove size tracking list from bin */ tmp_fspace_node = (H5FS_node_t *)H5SL_remove(sinfo->bins[bin].bin_list, &fspace_node->sect_size); if (tmp_fspace_node == NULL || tmp_fspace_node != fspace_node) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list"); /* Destroy skip list for size tracking node */ if (H5SL_close(fspace_node->sect_list) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy size tracking node's skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "can't destroy size tracking node's skip list"); /* Release free space list node */ fspace_node = H5FL_FREE(H5FS_node_t, fspace_node); @@ -761,20 +762,20 @@ H5FS__sect_unlink_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5F bin = H5VM_log2_gen(sect->size); assert(bin < sinfo->nbins); if (sinfo->bins[bin].bin_list == NULL) - HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "node's bin is empty?") + HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "node's bin is empty?"); /* Find space node for section's size */ if ((fspace_node = (H5FS_node_t *)H5SL_search(sinfo->bins[bin].bin_list, §->size)) == NULL) - HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section size node") + HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section size node"); /* Remove the section's node from the list */ tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace_node->sect_list, §->addr); if (tmp_sect_node == NULL || tmp_sect_node != sect) - HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list") + HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list"); /* Decrement # of sections in section size node */ if (H5FS__size_node_decr(sinfo, bin, fspace_node, cls) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space size node from skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space size node from skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -810,12 +811,12 @@ H5FS__sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_sec tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, §->addr); if (tmp_sect_node == NULL || tmp_sect_node != sect) - HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list") + HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list"); } /* end if */ /* Update section info & check if we need less room for the serialized free space sections */ if (H5FS__sect_decrease(fspace, cls) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk"); /* Decrement amount of free space managed */ fspace->tot_space -= sect->size; @@ -851,12 +852,13 @@ H5FS__sect_remove_real(H5FS_t *fspace, H5FS_section_info_t *sect) /* Remove node from size tracked data structures */ if (H5FS__sect_unlink_size(fspace->sinfo, cls, sect) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from size tracking data structures") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, + "can't remove section from size tracking data structures"); /* Update rest of free space manager data structures for node removal */ if (H5FS__sect_unlink_rest(fspace, cls, sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, - "can't remove section from non-size tracking data structures") + "can't remove section from non-size tracking data structures"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -886,12 +888,12 @@ H5FS_sect_remove(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect) /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* Perform actual section removal */ if (H5FS__sect_remove_real(fspace, sect) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove section") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove section"); done: /* Release the section info */ @@ -931,7 +933,7 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes"); } /* end if */ else /* Check for node list of the correct size already */ @@ -941,18 +943,18 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_ if (fspace_node == NULL) { /* Allocate new free list size node */ if (NULL == (fspace_node = H5FL_MALLOC(H5FS_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for free space node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for free space node"); fspace_node_alloc = TRUE; /* Initialize the free list size node */ fspace_node->sect_size = sect->size; fspace_node->serial_count = fspace_node->ghost_count = 0; if (NULL == (fspace_node->sect_list = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes"); /* Insert new free space size node into bin's list */ if (H5SL_insert(sinfo->bins[bin].bin_list, fspace_node, &fspace_node->sect_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list"); fspace_node_alloc = FALSE; /* (owned by the bin skip list now, don't need to free on error) */ /* Increment number of section sizes */ @@ -983,7 +985,7 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_ /* Insert free space node into correct skip list */ if (H5SL_insert(fspace_node->sect_list, sect, §->addr) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space node into skip list"); done: if (ret_value < 0) @@ -1025,15 +1027,15 @@ H5FS__sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls, H5FS_secti if (fspace->sinfo->merge_list == NULL) if (NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, - "can't create skip list for merging free space sections") + "can't create skip list for merging free space sections"); if (H5SL_insert(fspace->sinfo->merge_list, sect, §->addr) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't insert free space node into merging skip list") + "can't insert free space node into merging skip list"); } /* end if */ /* Update section info & check if we need more room for the serialized free space sections */ if (H5FS__sect_increase(fspace, cls, flags) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk"); /* Increment amount of free space managed */ fspace->tot_space += sect->size; @@ -1069,12 +1071,12 @@ H5FS__sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags) /* Add section to size tracked data structures */ if (H5FS__sect_link_size(fspace->sinfo, cls, sect) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to size tracking data structures") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to size tracking data structures"); /* Update rest of free space manager data structures for section addition */ if (H5FS__sect_link_rest(fspace, cls, sect, flags) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't add section to non-size tracking data structures") + "can't add section to non-size tracking data structures"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1143,7 +1145,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) tmp_sect_cls->can_merge) { /* Determine if the sections can merge */ if ((status = (*tmp_sect_cls->can_merge)(tmp_sect, *sect, op_data)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections"); if (status > 0) { /* Sanity check */ assert(tmp_sect_cls->merge); @@ -1151,11 +1153,11 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Remove 'less than' node from data structures */ if (H5FS__sect_remove_real(fspace, tmp_sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, - "can't remove section from internal data structures") + "can't remove section from internal data structures"); /* Merge the two sections together */ if ((*tmp_sect_cls->merge)(&tmp_sect, *sect, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections"); /* Retarget section pointer to 'less than' node that was merged into */ *sect = tmp_sect; @@ -1190,7 +1192,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Determine if the sections can merge */ if ((status = (*sect_cls->can_merge)(*sect, tmp_sect, op_data)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't check for merging sections"); if (status > 0) { /* Sanity check */ assert(sect_cls->merge); @@ -1198,11 +1200,11 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Remove 'greater than' node from data structures */ if (H5FS__sect_remove_real(fspace, tmp_sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, - "can't remove section from internal data structures") + "can't remove section from internal data structures"); /* Merge the two sections together */ if ((*sect_cls->merge)(sect, tmp_sect, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't merge two sections"); /* It's possible that the merge caused the section to be deleted (particularly in the * paged allocation case) */ @@ -1227,14 +1229,14 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) sect_cls = &fspace->sect_cls[(*sect)->type]; if (sect_cls->can_shrink) { if ((status = (*sect_cls->can_shrink)(*sect, op_data)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container"); if (status > 0) { /* Remove SECT from free-space manager */ /* (only possible to happen on second+ pass through loop) */ if (remove_sect) { if (H5FS__sect_remove_real(fspace, *sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, - "can't remove section from internal data structures") + "can't remove section from internal data structures"); remove_sect = FALSE; } /* end if */ @@ -1242,7 +1244,7 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* (callback can indicate that it has discarded the section by setting *sect to NULL) */ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container"); /* If this section was shrunk away, we may need to shrink another section */ if (*sect == NULL) { @@ -1309,14 +1311,14 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* Call "add" section class callback, if there is one */ cls = &fspace->sect_cls[sect->type]; if (cls->add) if ((*cls->add)(§, &flags, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "'add' section class callback failed") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "'add' section class callback failed"); /* Check for merging returned space with existing section node */ if (flags & H5FS_ADD_RETURNED_SPACE) { @@ -1326,7 +1328,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag /* Attempt to merge returned section with existing sections */ if (H5FS__sect_merge(fspace, §, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections"); } /* end if */ /* Add new (possibly merged) node to free sections data structures */ @@ -1335,7 +1337,7 @@ H5FS_sect_add(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flag */ if (sect) if (H5FS__sect_link(fspace, sect, flags) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list"); #ifdef H5FS_SINFO_DEBUG fprintf(stderr, "%s: fspace->tot_space = %" PRIuHSIZE "\n", __func__, fspace->tot_space); @@ -1402,7 +1404,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* @@ -1438,7 +1440,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize /* Remove section from data structures */ if (H5FS__sect_remove_real(fspace, sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, - "can't remove section from internal data structures") + "can't remove section from internal data structures"); /* Get class for section */ cls = &fspace->sect_cls[sect->type]; @@ -1459,14 +1461,14 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize if (cls->add) if ((*cls->add)(§, &flags, op_data) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "'add' section class callback failed") + "'add' section class callback failed"); /* Re-adding the section could cause it to disappear (particularly when paging) */ if (sect) { /* Re-add adjusted section to free sections data structures */ if (H5FS__sect_link(fspace, sect, 0) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't insert free space section into skip list") + "can't insert free space section into skip list"); } /* end if */ } /* end if */ else { @@ -1475,7 +1477,7 @@ H5FS_sect_try_extend(H5F_t *f, H5FS_t *fspace, haddr_t addr, hsize_t size, hsize /* Exact match, so just free section */ if ((*cls->free)(sect) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't free section") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't free section"); } /* end else */ /* Note that we modified the section info */ @@ -1525,13 +1527,13 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; saved_fs_size = sect->size; /* Attempt to merge/shrink section with existing sections */ if (H5FS__sect_merge(fspace, §, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections"); /* Check if section is shrunk and/or merged away completely */ if (!sect) { @@ -1543,7 +1545,7 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne if (sect->size != saved_fs_size) { if (H5FS__sect_link(fspace, sect, flags) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't insert free space section into skip list") + "can't insert free space section into skip list"); sinfo_modified = TRUE; HGOTO_DONE(TRUE); } /* end if */ @@ -1609,17 +1611,17 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node /* Take first node off of the list (ie. node w/lowest address) */ if (NULL == (*node = (H5FS_section_info_t *)H5SL_remove_first(fspace_node->sect_list))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, - "can't remove free space node from skip list") + "can't remove free space node from skip list"); /* Get section's class */ cls = &fspace->sect_cls[(*node)->type]; /* Decrement # of sections in section size node */ if (H5FS__size_node_decr(fspace->sinfo, bin, fspace_node, cls) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, - "can't remove free space size node from skip list") + "can't remove free space size node from skip list"); if (H5FS__sect_unlink_rest(fspace, cls, *node) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, - "can't remove section from non-size tracking data structures") + "can't remove section from non-size tracking data structures"); /* Indicate that we found a node for the request */ HGOTO_DONE(TRUE); } /* end if */ @@ -1661,15 +1663,15 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node if (NULL == (*node = (H5FS_section_info_t *)H5SL_remove( curr_fspace_node->sect_list, &curr_sect->addr))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, - "can't remove free space node from skip list") + "can't remove free space node from skip list"); /* Decrement # of sections in section size node */ if (H5FS__size_node_decr(fspace->sinfo, bin, curr_fspace_node, cls) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, - "can't remove free space size node from skip list") + "can't remove free space size node from skip list"); if (H5FS__sect_unlink_rest(fspace, cls, *node) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, - "can't remove section from non-size tracking data structures") + "can't remove section from non-size tracking data structures"); /* * The split() callback splits NODE into 2 sections: @@ -1681,7 +1683,7 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node split_sect = cls->split(*node, frag_size); if ((H5FS__sect_link(fspace, split_sect, 0) < 0)) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't insert free space section into skip list") + "can't insert free space section into skip list"); /* sanity check */ assert(split_sect->addr < (*node)->addr); assert(request <= (*node)->size); @@ -1736,12 +1738,12 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t ** if (fspace->tot_sect_count > 0) { /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* Look for node in bins */ if ((ret_value = H5FS__sect_find_node(fspace, request, node)) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from bins") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't remove section from bins"); /* Decrement # of sections on free list, if we found an object */ if (ret_value > 0) { @@ -1787,7 +1789,7 @@ H5FS__iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) /* Make callback for this section */ if ((*udata->op)(sect_info, udata->op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "iteration callback failed") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "iteration callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1820,7 +1822,7 @@ H5FS__iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata) /* Iterate through all the sections of this size */ 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") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1859,7 +1861,7 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data) /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__READ_ONLY_FLAG) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* Iterate over all the bins */ @@ -1868,7 +1870,7 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data) if (fspace->sinfo->bins[bin].bin_list) { /* Iterate over list of section size nodes for bin */ if (H5SL_iterate(fspace->sinfo->bins[bin].bin_list, H5FS__iterate_node_cb, &udata) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes"); } /* end if */ } /* end for */ } /* end if */ @@ -1936,7 +1938,7 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint /* Get a pointer to the section info */ if (H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; /* Get class info */ @@ -2024,17 +2026,17 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint if (fspace->sinfo->merge_list == NULL) if (NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, - "can't create skip list for merging free space sections") + "can't create skip list for merging free space sections"); if (H5SL_insert(fspace->sinfo->merge_list, sect, §->addr) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, - "can't insert free space node into merging skip list") + "can't insert free space node into merging skip list"); } /* end if */ else { H5FS_section_info_t *tmp_sect_node; /* Temporary section node */ tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, §->addr); if (tmp_sect_node == NULL || tmp_sect_node != sect) - HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list") + HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list"); } /* end else */ } /* end if */ @@ -2047,7 +2049,7 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, uint /* Update current space used for free space sections */ if (H5FS__sect_serialize_size(fspace) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk"); done: /* Release the section info */ @@ -2222,7 +2224,7 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data) 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info"); sinfo_valid = TRUE; if (fspace->sinfo && fspace->sinfo->merge_list) { @@ -2240,19 +2242,19 @@ H5FS_sect_try_shrink_eoa(H5F_t *f, H5FS_t *fspace, void *op_data) 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") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container"); if (ret_value > 0) { assert(tmp_sect_cls->shrink); /* Remove section from free space manager */ if (H5FS__sect_remove_real(fspace, tmp_sect) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, - "can't remove section from internal data structures") + "can't remove section from internal data structures"); section_removed = TRUE; /* Shrink away section */ if ((*tmp_sect_cls->shrink)(&tmp_sect, op_data) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't shrink free space container"); } /* end if */ } /* end if */ } /* end if */ @@ -2341,12 +2343,12 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t /* Get the EOA for the file -- need for sanity check below */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_FSPACE_HDR))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa"); /* check for overlap into temporary allocation space */ if (H5F_IS_TMP_ADDR(f, (eoa + fspace->sect_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, - "hdr file space alloc will overlap into 'temporary' file space") + "hdr file space alloc will overlap into 'temporary' file space"); hdr_alloc_size = H5FS_HEADER_SIZE(f); @@ -2355,11 +2357,11 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t /* Allocate space for the free space header */ if (HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, hdr_alloc_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header"); /* Cache the new free space header (pinned) */ if (H5AC_insert_entry(f, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache"); *fs_addr_ptr = fspace->addr; } @@ -2370,12 +2372,12 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t /* Get the EOA for the file -- need for sanity check below */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_FSPACE_SINFO))) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "Unable to get eoa") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "Unable to get eoa"); /* check for overlap into temporary allocation space */ if (H5F_IS_TMP_ADDR(f, (eoa + fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_BADRANGE, FAIL, - "sinfo file space alloc will overlap into 'temporary' file space") + "sinfo file space alloc will overlap into 'temporary' file space"); sinfo_alloc_size = fspace->sect_size; @@ -2384,7 +2386,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t /* allocate space for the section info */ if (HADDR_UNDEF == (sect_addr = H5MF_alloc(f, H5FD_MEM_FSPACE_SINFO, sinfo_alloc_size))) - HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for section info") + HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for section info"); /* update fspace->alloc_sect_size and fspace->sect_addr to reflect * the allocation @@ -2393,7 +2395,7 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t hsize_t saved_sect_size = fspace->sect_size; if (H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, sect_addr, sinfo_alloc_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space sections"); fspace->sect_size = saved_sect_size; } else { @@ -2425,12 +2427,12 @@ H5FS_vfd_alloc_hdr_and_section_info_if_needed(H5F_t *f, H5FS_t *fspace, haddr_t * JRM -- 11/4/16 */ if (H5AC_insert_entry(f, H5AC_FSPACE_SINFO, sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sinfo to cache") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sinfo to cache"); /* We have changed the sinfo address -- Mark free space header dirty */ if (H5AC_mark_entry_dirty(fspace) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, - "unable to mark free space header as dirty") + "unable to mark free space header as dirty"); /* since space has been allocated for the section info and the sinfo * has been inserted into the cache, relinquish ownership (i.e. float) diff --git a/src/H5Faccum.c b/src/H5Faccum.c index 4d4b1f9..e621e98 100644 --- a/src/H5Faccum.c +++ b/src/H5Faccum.c @@ -141,7 +141,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si /* Reallocate the metadata accumulator buffer */ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate metadata accumulator buffer") + "unable to allocate metadata accumulator buffer"); /* Note the new buffer size */ accum->alloc_size = new_alloc_size; @@ -164,7 +164,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si /* Dispatch to driver */ if (H5FD_read(file, map_type, addr, amount_before, accum->buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed"); } /* end if */ else amount_before = 0; @@ -180,7 +180,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si /* Dispatch to driver */ if (H5FD_read(file, map_type, (accum->loc + accum->size), amount_after, (accum->buf + accum->size + amount_before)) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed"); } /* end if */ /* Copy the data out of the buffer */ @@ -194,13 +194,13 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si else { /* Dispatch to driver */ if (H5FD_read(file, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed"); } /* end else */ } /* end if */ else { /* Read the data */ if (H5FD_read(file, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed"); /* Check for overlap w/dirty accumulator */ /* (Note that this could be improved by updating the non-dirty @@ -244,7 +244,7 @@ H5F__accum_read(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t si else { /* Read the data */ if (H5FD_read(file, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "driver read request failed"); } /* end else */ done: @@ -330,7 +330,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju */ if (H5FD_write(file, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed"); /* Reset accumulator dirty flag */ accum->dirty = FALSE; @@ -343,7 +343,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju */ if (H5FD_write(file, H5FD_MEM_DEFAULT, (accum->loc + accum->dirty_off), accum->dirty_len, (accum->buf + accum->dirty_off)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "file write failed"); /* Reset accumulator dirty flag */ accum->dirty = FALSE; @@ -373,7 +373,7 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, H5FD_t *file, H5F_accum_adjust_t adju /* Reallocate the metadata accumulator buffer */ if (NULL == (new_buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate metadata accumulator buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate metadata accumulator buffer"); /* Update accumulator info */ accum->buf = new_buf; @@ -431,7 +431,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s if (H5_addr_defined(accum->loc) && (addr + size) == accum->loc) { /* Check if we need to adjust accumulator size */ if (H5F__accum_adjust(accum, file, H5F_ACCUM_PREPEND, size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator"); /* Move the existing metadata to the proper location */ memmove(accum->buf + size, accum->buf, accum->size); @@ -456,7 +456,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s else if (H5_addr_defined(accum->loc) && addr == (accum->loc + accum->size)) { /* Check if we need to adjust accumulator size */ if (H5F__accum_adjust(accum, file, H5F_ACCUM_APPEND, size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator"); /* Copy the new metadata to the end */ H5MM_memcpy(accum->buf + accum->size, buf, size); @@ -518,7 +518,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Check if we need to adjust accumulator size */ if (H5F__accum_adjust(accum, file, H5F_ACCUM_PREPEND, add_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator"); /* Calculate the proper offset of the existing metadata */ H5_CHECKED_ASSIGN(old_offset, size_t, (addr + size) - accum->loc, hsize_t); @@ -560,7 +560,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Check if we need to adjust accumulator size */ if (H5F__accum_adjust(accum, file, H5F_ACCUM_APPEND, add_size) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator"); /* Compute offset of dirty region (after adjusting accumulator) */ dirty_off = (size_t)(addr - accum->loc); @@ -601,7 +601,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_alloc_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate metadata accumulator buffer") + "unable to allocate metadata accumulator buffer"); /* Note the new buffer size */ accum->alloc_size = new_alloc_size; @@ -629,7 +629,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s if (accum->dirty) { if (H5FD_write(file, H5FD_MEM_DEFAULT, accum->loc + accum->dirty_off, accum->dirty_len, accum->buf + accum->dirty_off) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); /* Reset accumulator dirty flag */ accum->dirty = FALSE; @@ -647,7 +647,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Grow the metadata accumulator buffer */ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate metadata accumulator buffer") + "unable to allocate metadata accumulator buffer"); /* Note the new buffer size */ accum->alloc_size = new_size; @@ -666,7 +666,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Shrink the accumulator buffer */ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, tmp_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate metadata accumulator buffer") + "unable to allocate metadata accumulator buffer"); /* Note the new buffer size */ accum->alloc_size = tmp_size; @@ -698,7 +698,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s /* Reallocate the metadata accumulator buffer */ if (NULL == (accum->buf = H5FL_BLK_REALLOC(meta_accum, accum->buf, new_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate metadata accumulator buffer") + "unable to allocate metadata accumulator buffer"); /* Note the new buffer size */ accum->alloc_size = new_size; @@ -725,11 +725,11 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s if ((H5F_SHARED_INTENT(f_sh) & H5F_ACC_SWMR_WRITE) > 0) /* Flush if dirty and reset accumulator */ if (H5F__accum_reset(f_sh, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator"); /* Write the data */ if (H5FD_write(file, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); /* Check for overlap w/accumulator */ /* (Note that this could be improved by updating the accumulator @@ -776,7 +776,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s else { /* Access covers whole accumulator */ /* Reset accumulator, but don't flush */ if (H5F__accum_reset(f_sh, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator"); } /* end else */ } /* end if */ else { /* Write starts after beginning of accumulator */ @@ -818,7 +818,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s else { /* Write the data */ if (H5FD_write(file, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); } /* end else */ done: @@ -927,7 +927,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr /* Write out the entire dirty region of the accumulator */ if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start, accum->dirty_len, accum->buf + accum->dirty_off) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); } /* end if */ /* Block to free overlaps with some/all of dirty region */ /* Check for unfreed dirty region to write */ @@ -943,7 +943,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr /* Write out the unfreed dirty region of the accumulator */ if (H5FD_write(file, H5FD_MEM_DEFAULT, dirty_start + dirty_delta, write_size, accum->buf + accum->dirty_off + dirty_delta) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); } /* end if */ /* Reset dirty flag */ @@ -964,7 +964,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr /* 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, accum->buf + accum->dirty_off + dirty_delta) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); } /* end if */ /* Check for block to free beginning at same location as dirty region */ @@ -1018,7 +1018,7 @@ H5F__accum_flush(H5F_shared_t *f_sh) /* Flush the metadata contents */ if (H5FD_write(file, H5FD_MEM_DEFAULT, f_sh->accum.loc + f_sh->accum.dirty_off, f_sh->accum.dirty_len, f_sh->accum.buf + f_sh->accum.dirty_off) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed"); /* Reset the dirty flag */ f_sh->accum.dirty = FALSE; @@ -1050,7 +1050,7 @@ H5F__accum_reset(H5F_shared_t *f_sh, hbool_t flush) /* Flush any dirty data in accumulator, if requested */ if (flush) if (H5F__accum_flush(f_sh) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "can't flush metadata accumulator") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "can't flush metadata accumulator"); /* Check if we need to reset the metadata accumulator information */ if (f_sh->feature_flags & H5FD_FEAT_ACCUMULATE_METADATA) { diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c index f5892a3..e05de9f 100644 --- a/src/H5Fcwfs.c +++ b/src/H5Fcwfs.c @@ -104,7 +104,7 @@ H5F_cwfs_add(H5F_t *f, H5HG_heap_t *heap) */ if (NULL == f->shared->cwfs) { if (NULL == (f->shared->cwfs = (H5HG_heap_t **)H5MM_malloc(H5F_NCWFS * sizeof(H5HG_heap_t *)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate CWFS for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate CWFS for file"); f->shared->cwfs[0] = heap; f->shared->ncwfs = 1; } @@ -195,10 +195,11 @@ H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr) H5MF_try_extend(f, H5FD_MEM_GHEAP, H5HG_ADDR(f->shared->cwfs[cwfsno]), (hsize_t)H5HG_SIZE(f->shared->cwfs[cwfsno]), (hsize_t)new_need); if (was_extended < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap"); else if (was_extended == TRUE) { if (H5HG_extend(f, H5HG_ADDR(f->shared->cwfs[cwfsno]), new_need) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to extend global heap collection") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, + "unable to extend global heap collection"); *addr = H5HG_ADDR(f->shared->cwfs[cwfsno]); found = TRUE; break; diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index 66b1ac9..3b1aad3 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -52,11 +52,11 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) /* Get property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Retrieve file creation properties */ if (H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size"); /* debug */ fprintf(stream, "%*sFile Super Block...\n", indent, ""); diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index c25e38d..257b7b2 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -98,17 +98,17 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo /*out*/) /* Check args */ if (!finfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); /* Check the type */ type = H5I_get_type(obj_id); if (H5I_FILE != type && H5I_GROUP != type && H5I_DATATYPE != type && H5I_DATASET != type && H5I_ATTR != type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ file_opt_args.get_info.type = type; @@ -118,7 +118,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo /*out*/) /* Get the file information */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info"); /* Copy the compatible fields into the older struct */ finfo->super_ext_size = finfo2.super.super_ext_size; @@ -154,7 +154,7 @@ H5Fis_hdf5(const char *name) /* Check args and all the boring stuff. */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, (-1), "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, (-1), "no file name specified"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_IS_ACCESSIBLE; @@ -164,7 +164,7 @@ H5Fis_hdf5(const char *name) /* Check if file is accessible */ if (H5VL_file_specific(NULL, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, (-1), "unable to determine if file is accessible as HDF5") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, (-1), "unable to determine if file is accessible as HDF5"); /* Set return value */ ret_value = (htri_t)is_accessible; @@ -219,11 +219,11 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "not a file ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* 'low' and 'high' are both initialized to LATEST. * If latest format is not expected, set 'low' to EARLIEST @@ -239,7 +239,7 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format) /* Set the library's version bounds */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Fefc.c b/src/H5Fefc.c index 00c6d86..194ecbe 100644 --- a/src/H5Fefc.c +++ b/src/H5Fefc.c @@ -94,7 +94,7 @@ H5F__efc_create(unsigned max_nfiles) /* Allocate EFC struct */ if (NULL == (efc = H5FL_CALLOC(H5F_efc_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Initialize maximum number of files */ efc->max_nfiles = max_nfiles; @@ -144,26 +144,26 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get VOL connector info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get VOL connector info"); /* Stash a copy of the "top-level" connector property, before any pass-through * connectors modify or unwrap it. */ if (H5CX_set_vol_connector_prop(&connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set VOL connector info in API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set VOL connector info in API context"); /* Check if the EFC exists. If it does not, just call H5F_open(). We * support this so clients do not have to make 2 different calls depending * on the state of the efc. */ if (!efc) { if (NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file"); /* Make file post open call */ if (H5F__post_open(ret_value) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file"); /* Increment the number of open objects to prevent the file from being * closed out from under us - "simulate" having an open file id. Note @@ -183,7 +183,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h else { 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, NULL, "can't create skip list"); } /* end else */ /* If we found the file update the LRU list and return the cached file, @@ -229,18 +229,19 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h * do not add it to cache */ if (ent) { if (H5F__efc_remove_ent(efc, ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, NULL, "can't remove entry from external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, NULL, + "can't remove entry from external file cache"); /* Do not free ent, we will recycle it below */ } /* end if */ else { /* Cannot cache file, just open file and return */ if (NULL == (ret_value = H5F_open(name, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file"); /* Make file post open call */ if (H5F__post_open(ret_value) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file"); /* Increment the number of open objects to prevent the file from * being closed out from under us - "simulate" having an open @@ -253,20 +254,20 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h else /* Allocate new entry */ if (NULL == (ent = H5FL_MALLOC(H5F_efc_ent_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Build new entry */ if (NULL == (ent->name = H5MM_strdup(name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Open the file */ if (NULL == (ent->file = H5F_open(name, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "can't open file"); open_file = TRUE; /* Make file post open call */ if (H5F__post_open(ent->file) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't finish opening file"); /* Increment the number of open objects to prevent the file from being * closed out from under us - "simulate" having an open file id */ @@ -275,7 +276,7 @@ H5F__efc_open(H5F_efc_t *efc, const char *name, unsigned flags, hid_t fcpl_id, h /* Add the file to the cache */ /* Skip list */ if (H5SL_insert(efc->slist, ent, ent->name) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, NULL, "can't insert entry into skip list") + HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, NULL, "can't insert entry into skip list"); /* Add to head of LRU list and update tail if necessary */ ent->LRU_next = efc->LRU_head; @@ -356,7 +357,7 @@ H5F_efc_close(H5F_t *parent, H5F_t *file) if (!efc) { file->nopen_objs--; if (H5F_try_close(file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file"); HGOTO_DONE(SUCCEED); } /* end if */ @@ -371,7 +372,7 @@ H5F_efc_close(H5F_t *parent, H5F_t *file) if (!ent) { file->nopen_objs--; if (H5F_try_close(file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file"); } /* end if */ else /* Reduce the open count on this entry */ @@ -440,7 +441,7 @@ H5F__efc_release_real(H5F_efc_t *efc) while (ent) if (!ent->nopen) { if (H5F__efc_remove_ent(efc, ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "can't remove entry from external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "can't remove entry from external file cache"); /* Free the entry and move to next entry in LRU list */ prev_ent = ent; @@ -483,7 +484,7 @@ H5F__efc_release(H5F_efc_t *efc) /* Call 'real' routine */ if (H5F__efc_release_real(efc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't remove entry from external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't remove entry from external file cache"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -514,11 +515,11 @@ H5F__efc_destroy(H5F_efc_t *efc) if (efc->nfiles > 0) { /* Release (clear) the efc */ if (H5F__efc_release_real(efc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache"); /* If there are still cached files, return an error */ if (efc->nfiles > 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't destroy EFC after incomplete release") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't destroy EFC after incomplete release"); } /* end if */ assert(efc->nfiles == 0); @@ -528,7 +529,7 @@ H5F__efc_destroy(H5F_efc_t *efc) /* Close skip list */ if (efc->slist) if (H5SL_close(efc->slist) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close skip list") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close skip list"); /* Free EFC object */ (void)H5FL_FREE(H5F_efc_t, efc); @@ -562,7 +563,7 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent) /* Remove from skip list */ if (ent != H5SL_remove(efc->slist, ent->name)) - HGOTO_ERROR(H5E_FILE, H5E_CANTDELETE, FAIL, "can't delete entry from skip list") + HGOTO_ERROR(H5E_FILE, H5E_CANTDELETE, FAIL, "can't delete entry from skip list"); /* Remove from LRU list */ if (ent->LRU_next) @@ -592,7 +593,7 @@ H5F__efc_remove_ent(H5F_efc_t *efc, H5F_efc_ent_t *ent) * from being closed out from under us. */ ent->file->nopen_objs--; if (H5F_try_close(ent->file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close external file"); ent->file = NULL; done: @@ -809,7 +810,7 @@ H5F__efc_try_close(H5F_t *f) * eventually reduce this file's reference count to 1 (though possibly * not from this call to H5F__efc_release_real()). */ if (H5F__efc_release_real(f->shared->efc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache"); /* If we marked the file as closeable, there must be no open files in * its EFC. This is because, in order to close an open child file, the @@ -927,7 +928,7 @@ H5F__efc_try_close(H5F_t *f) * Also, see the top of this function. */ if (f->shared->efc->tag == H5F_EFC_TAG_CLOSE) { if (H5F__efc_release_real(f->shared->efc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache"); /* Make sure the file's reference count is now 1 and will be closed by * H5F_dest(). */ diff --git a/src/H5Ffake.c b/src/H5Ffake.c index f6aa719..81aa762 100644 --- a/src/H5Ffake.c +++ b/src/H5Ffake.c @@ -42,9 +42,9 @@ H5F_fake_alloc(uint8_t sizeof_size) /* Allocate faked file struct */ if (NULL == (f = H5FL_CALLOC(H5F_t))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure"); if (NULL == (f->shared = H5FL_CALLOC(H5F_shared_t))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure"); /* Only set fields necessary for clients */ if (sizeof_size == 0) diff --git a/src/H5Fint.c b/src/H5Fint.c index 85d9b50..f212385 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -137,11 +137,11 @@ H5F_init(void) /* Initialize the ID group for the file IDs */ if (H5I_register_type(H5I_FILE_CLS) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to initialize interface"); /* Check the file locking environment variable */ if (H5F__parse_file_lock_env_var(&use_locks_env_g) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -213,12 +213,12 @@ H5F__close_cb(H5VL_object_t *file_vol_obj, void **request) /* Close the file */ if (H5VL_file_close(file_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close file"); /* Free the VOL object; it is unnecessary to unwrap the VOL * object before freeing it, as the object was not wrapped */ if (H5VL_free_object(file_vol_obj) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to free VOL object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -281,26 +281,26 @@ H5F__set_vol_conn(H5F_t *file) * connectors modified or unwrapped it. */ if (H5CX_get_vol_connector_prop(&connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info from API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL connector info from API context"); /* Sanity check */ 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))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allocate and copy connector info, if it exists */ if (connector_prop.connector_info) if (H5VL_copy_connector_info(file->shared->vol_cls, &new_connector_info, connector_prop.connector_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed"); /* Cache the connector ID & info for the container */ file->shared->vol_id = connector_prop.connector_id; file->shared->vol_info = new_connector_info; if (H5I_inc_ref(file->shared->vol_id, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -340,85 +340,87 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) /* 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))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); if ((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "can't copy file access property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "can't copy file access property list"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(ret_value))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Copy properties of the file access property list */ if (H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set initial metadata cache resize config.") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, + "can't set initial metadata cache resize config."); if (H5P_set(new_plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache number of slots") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache number of slots"); if (H5P_set(new_plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache byte size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set data cache byte size"); if (H5P_set(new_plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set preempt read chunks") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set preempt read chunks"); if (H5P_set(new_plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment threshold") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment threshold"); if (H5P_set(new_plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set alignment"); if (H5P_set(new_plist, H5F_ACS_GARBG_COLCT_REF_NAME, &(f->shared->gc_ref)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set garbage collect reference") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set garbage collect reference"); if (H5P_set(new_plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set metadata cache size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set metadata cache size"); if (H5P_set(new_plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't sieve buffer size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't sieve buffer size"); if (H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'small data' cache size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'small data' cache size"); if (H5P_set(new_plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &f->shared->low_bound) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, - "can't set 'low' bound for library format versions") + "can't set 'low' bound for library format versions"); if (H5P_set(new_plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &f->shared->high_bound) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, - "can't set 'high' bound for library format versions") + "can't set 'high' bound for library format versions"); if (H5P_set(new_plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &(f->shared->read_attempts)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'read attempts ' flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set 'read attempts ' flag"); if (H5P_set(new_plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set object flush callback") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set object flush callback"); if (f->shared->efc) efc_size = H5F__efc_max_nfiles(f->shared->efc); if (H5P_set(new_plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set elink file cache size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set elink file cache size"); if (f->shared->page_buf != NULL) { if (H5P_set(new_plist, H5F_ACS_PAGE_BUFFER_SIZE_NAME, &(f->shared->page_buf->max_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set page buffer size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set page buffer size"); if (H5P_set(new_plist, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_NAME, &(f->shared->page_buf->min_meta_perc)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, - "can't set minimum metadata fraction of page buffer") + "can't set minimum metadata fraction of page buffer"); if (H5P_set(new_plist, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_NAME, &(f->shared->page_buf->min_raw_perc)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, - "can't set minimum raw data fraction of page buffer") + "can't set minimum raw data fraction of page buffer"); } /* end if */ #ifdef H5_HAVE_PARALLEL if (H5P_set(new_plist, H5_COLL_MD_READ_FLAG_NAME, &(f->shared->coll_md_read)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read flag"); if (H5P_set(new_plist, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, &(f->shared->coll_md_write)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read flag"); if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { MPI_Comm mpi_comm; MPI_Info mpi_info; /* Retrieve and set MPI communicator */ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI communicator"); if (H5P_set(new_plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &mpi_comm) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI communicator"); /* Retrieve and set MPI info object */ if (H5P_get(old_plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &mpi_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI info object") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't get MPI info object"); if (H5P_set(new_plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &mpi_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI info object") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set MPI info object"); } #endif /* H5_HAVE_PARALLEL */ if (H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME, &(f->shared->mdc_initCacheImageCfg)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set initial metadata cache resize config.") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, + "can't set initial metadata cache resize config."); /* Prepare the driver property */ driver_prop.driver_id = f->shared->lf->driver_id; @@ -428,21 +430,21 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) /* Set the driver property */ if (H5P_set(new_plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file driver ID & info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file driver ID & info"); /* Set the VOL connector property */ connector_prop.connector_id = f->shared->vol_id; connector_prop.connector_info = f->shared->vol_info; if (H5P_set(new_plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector ID & info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL connector ID & info"); /* Set the file close degree appropriately */ if (f->shared->fc_degree == H5F_CLOSE_DEFAULT && H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->lf->cls->fc_degree)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree"); else if (f->shared->fc_degree != H5F_CLOSE_DEFAULT && H5P_set(new_plist, H5F_ACS_CLOSE_DEGREE_NAME, &(f->shared->fc_degree)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree"); done: /* Release the copy of the driver info, if it was set up */ @@ -473,7 +475,7 @@ H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_i /* Perform the query */ if ((ret_value = H5F__get_objects(f, types, 0, NULL, app_ref, obj_id_count_ptr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F__get_objects failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F__get_objects failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -500,7 +502,7 @@ H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list /* Perform the query */ if ((ret_value = H5F__get_objects(f, types, max_objs, oid_list, app_ref, obj_id_count_ptr)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F__get_objects failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F__get_objects failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -550,7 +552,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if (types & H5F_OBJ_FILE) { olist.obj_type = H5I_FILE; if (H5I_iterate(H5I_FILE, H5F__get_objects_cb, &olist, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(1)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(1)"); } /* end if */ /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), @@ -561,7 +563,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if (types & H5F_OBJ_DATASET) { olist.obj_type = H5I_DATASET; if (H5I_iterate(H5I_DATASET, H5F__get_objects_cb, &olist, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(2)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(2)"); } /* end if */ } @@ -573,7 +575,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if (types & H5F_OBJ_GROUP) { olist.obj_type = H5I_GROUP; if (H5I_iterate(H5I_GROUP, H5F__get_objects_cb, &olist, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(3)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(3)"); } } @@ -585,7 +587,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if (types & H5F_OBJ_DATATYPE) { olist.obj_type = H5I_DATATYPE; if (H5I_iterate(H5I_DATATYPE, H5F__get_objects_cb, &olist, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(4)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(4)"); } /* end if */ } @@ -597,7 +599,7 @@ H5F__get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id if (types & H5F_OBJ_ATTR) { olist.obj_type = H5I_ATTR; if (H5I_iterate(H5I_ATTR, H5F__get_objects_cb, &olist, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(5)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(5)"); } /* end if */ } @@ -667,7 +669,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_MAP: HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, - "maps not supported in native VOL connector") + "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -684,7 +686,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "unknown or invalid data object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "unknown or invalid data object"); } /* end switch */ if ((olist->file_info.local && ((!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE && @@ -746,7 +748,7 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name /*ou /* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */ if (NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */ - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate filename buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate filename buffer"); /* Compose the full file name */ HDsnprintf(*full_name, (prefix_len + fname_len + 2 + 2), "%s%s%s", @@ -826,7 +828,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c /* Copy the file name to use */ if (NULL == (temp_file_name = H5MM_strdup(file_name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); temp_file_name_len = HDstrlen(temp_file_name); /* Target file_name is an absolute pathname: see RM for detailed description */ @@ -878,7 +880,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c else if (H5F_PREFIX_ELINK == prefix_type) env_prefix = HDgetenv("HDF5_EXT_PREFIX"); else - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "prefix type is not sensible") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "prefix type is not sensible"); /* If environment variable is defined, iterate through prefixes it defines */ if (NULL != env_prefix) { @@ -886,7 +888,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c /* Make a copy of the environment variable string */ if (NULL == (saved_env = tmp_env_prefix = H5MM_strdup(env_prefix))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Loop over prefixes in environment variable */ while ((tmp_env_prefix) && (*tmp_env_prefix)) { @@ -896,7 +898,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c if (out_prefix_name && (*out_prefix_name)) { if (H5F__build_name(out_prefix_name, temp_file_name, &full_name /*out*/) < 0) { saved_env = (char *)H5MM_xfree(saved_env); - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename"); } /* end if */ /* Try opening file */ @@ -924,7 +926,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c if (src_file == NULL && prop_prefix) { /* Construct name to open */ if (H5F__build_name(prop_prefix, temp_file_name, &full_name /*out*/) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename"); /* Try opening file */ src_file = H5F__efc_open(efc, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id); @@ -945,7 +947,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c if (NULL != (dspath = H5F_EXTPATH(primary_file))) { /* Construct name to open */ if (H5F__build_name(dspath, temp_file_name, &full_name /*out*/) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename"); /* Try opening file */ src_file = H5F__efc_open(efc, full_name, file_intent, H5P_FILE_CREATE_DEFAULT, fapl_id); @@ -977,7 +979,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c /* Copy resolved file name */ if (NULL == (actual_file_name = H5MM_strdup(H5F_ACTUAL_NAME(primary_file)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't duplicate resolved file name string") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "can't duplicate resolved file name string"); /* get last component of file_name */ H5_GET_LAST_DELIMITER(actual_file_name, ptr) @@ -987,7 +989,7 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c /* Build new file name for the external file */ if (H5F__build_name((ptr ? actual_file_name : ""), temp_file_name, &full_name /*out*/) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't prepend prefix to filename"); actual_file_name = (char *)H5MM_xfree(actual_file_name); /* Try opening with the resolved name */ @@ -1042,7 +1044,7 @@ H5F__is_hdf5(const char *name, hid_t fapl_id) * should work with arbitrary VFDs, unlike H5Fis_hdf5(). */ if (NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, fapl_id, HADDR_UNDEF))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to open file"); /* If the file is already open, it's an HDF5 file * @@ -1055,7 +1057,7 @@ H5F__is_hdf5(const char *name, hid_t fapl_id) else { /* The file is an HDF5 file if the HDF5 file signature can be found */ if (H5FD_locate_signature(file, &sig_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "error while trying to locate file signature") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "error while trying to locate file signature"); ret_value = (HADDR_UNDEF != sig_addr); } @@ -1093,7 +1095,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F FUNC_ENTER_PACKAGE if (NULL == (f = H5FL_CALLOC(H5F_t))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate top file structure"); f->id_exists = FALSE; if (shared) { @@ -1107,7 +1109,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F 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") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared file structure"); f->shared->flags = flags; f->shared->sohm_addr = HADDR_UNDEF; @@ -1137,25 +1139,25 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F * to change as the file is being opened. */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not property list"); f->shared->fcpl_id = H5P_copy_plist(plist, FALSE); /* Get the FCPL values to cache */ if (H5P_get(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &f->shared->sizeof_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for address") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for address"); if (H5P_get(plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &f->shared->sizeof_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get byte number for object size") + 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get number of SOHM indexes"); 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") + 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) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space persisting status") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space persisting status"); if (H5P_get(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &f->shared->fs_threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get free-space section threshold") + 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space page size"); assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN); /* Temporary for multi/split drivers: fail file creation @@ -1163,72 +1165,73 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F */ if (H5F_HAS_FEATURE(f, H5FD_FEAT_PAGED_AGGR)) if (f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE || f->shared->fs_persist) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't open with this strategy or persistent fs") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't open with this strategy or persistent fs"); /* Get the FAPL values to cache */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list"); if (H5P_get(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config"); if (H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &(f->shared->rdcc_nslots)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache number of slots") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache number of slots"); if (H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache byte size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache byte size"); if (H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &(f->shared->rdcc_w0)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get preempt read chunk") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get preempt read chunk"); if (H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, &(f->shared->threshold)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment threshold"); if (H5P_get(plist, H5F_ACS_ALIGN_NAME, &(f->shared->alignment)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get alignment"); if (H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, &(f->shared->gc_ref)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference"); if (H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size"); if (H5P_get(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &(f->shared->low_bound)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'low' bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'low' bound for library format versions"); if (H5P_get(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &(f->shared->high_bound)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'high' bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'high' bound for library format versions"); if (H5P_get(plist, H5F_ACS_USE_MDC_LOGGING_NAME, &(f->shared->use_mdc_logging)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'use mdc logging' flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'use mdc logging' flag"); if (H5P_get(plist, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, &(f->shared->start_mdc_log_on_access)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'start mdc log on access' flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'start mdc log on access' flag"); if (H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get metadata cache size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get metadata cache size"); f->shared->meta_aggr.feature_flag = H5FD_FEAT_AGGREGATE_METADATA; if (H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'small data' cache size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'small data' cache size"); f->shared->sdata_aggr.feature_flag = H5FD_FEAT_AGGREGATE_SMALLDATA; if (H5P_get(plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get elink file cache size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get elink file cache size"); if (efc_size > 0) if (NULL == (f->shared->efc = H5F__efc_create(efc_size))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't create external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't create external file cache"); #ifdef H5_HAVE_PARALLEL if (H5P_get(plist, H5_COLL_MD_READ_FLAG_NAME, &(f->shared->coll_md_read)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get collective metadata read flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get collective metadata read flag"); if (H5P_get(plist, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, &(f->shared->coll_md_write)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get collective metadata write flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get collective metadata write flag"); #endif /* H5_HAVE_PARALLEL */ if (H5P_get(plist, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME, &(f->shared->mdc_initCacheImageCfg)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config"); /* Get the VFD values to cache */ f->shared->maxaddr = H5FD_get_maxaddr(lf); if (!H5_addr_defined(f->shared->maxaddr)) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad maximum address from VFD") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad maximum address from VFD"); if (H5FD_get_feature_flags(lf, &f->shared->feature_flags) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get feature flags from VFD") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get feature flags from VFD"); /* Require the SWMR feature flag if SWMR I/O is desired */ if (!H5F_HAS_FEATURE(f, H5FD_FEAT_SUPPORTS_SWMR_IO) && (H5F_INTENT(f) & (H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ))) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "must use a SWMR-compatible VFD when SWMR is specified") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, + "must use a SWMR-compatible VFD when SWMR is specified"); if (H5FD_get_fs_type_map(lf, f->shared->fs_type_map) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get free space type mapping from VFD") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get free space type mapping from VFD"); if (H5MF_init_merge_flags(f->shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "problem initializing free space merge flags") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "problem initializing free space merge flags"); f->shared->tmp_addr = f->shared->maxaddr; /* Disable temp. space allocation for parallel I/O (for now) */ /* (When we've arranged to have the relocated metadata addresses (and @@ -1244,7 +1247,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F /* Retrieve the # of read attempts here so that sohm in superblock will get the correct # of attempts */ if (H5P_get(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &f->shared->read_attempts) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get the # of read attempts") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get the # of read attempts"); /* When opening file with SWMR access, the # of read attempts is H5F_SWMR_METADATA_READ_ATTEMPTS if * not set */ @@ -1258,7 +1261,7 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F /* Turn off accumulator with SWMR */ f->shared->feature_flags &= ~(unsigned)H5FD_FEAT_ACCUMULATE_METADATA; if (H5FD_set_feature_flags(f->shared->lf, f->shared->feature_flags) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set feature_flags in VFD") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set feature_flags in VFD"); } else { /* If no value for read attempts has been set, use the default */ @@ -1268,19 +1271,19 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F /* Determine the # of bins for metadata read retries */ if (H5F_set_retries(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't set retries and retries_nbins") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't set retries and retries_nbins"); /* Get the metadata cache log location (if we're logging) */ { char *mdc_log_location = NULL; /* location of metadata cache log location */ if (H5P_get(plist, H5F_ACS_MDC_LOG_LOCATION_NAME, &mdc_log_location) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get mdc log location") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get mdc log location"); if (mdc_log_location != NULL) { size_t len = HDstrlen(mdc_log_location); if (NULL == (f->shared->mdc_log_location = (char *)H5MM_calloc((len + 1) * sizeof(char)))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, - "can't allocate memory for mdc log file name") + "can't allocate memory for mdc log file name"); HDstrncpy(f->shared->mdc_log_location, mdc_log_location, len); } else @@ -1289,33 +1292,33 @@ H5F__new(H5F_shared_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5F /* Get object flush callback information */ if (H5P_get(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get object flush cb info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get object flush cb info"); /* Get the VOL connector info */ if (H5F__set_vol_conn(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't cache VOL connector info") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't cache VOL connector info"); /* Create a metadata cache with the specified number of elements. * The cache might be created with a different number of elements and * the access property list should be updated to reflect that. */ if (H5AC_create(f, &(f->shared->mdc_initCacheCfg), &(f->shared->mdc_initCacheImageCfg)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache"); /* Create the file's "open object" information */ if (H5FO_create(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure"); /* Add new "shared" struct to list of open files */ if (H5F__sfile_add(f->shared) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to append to list of open files") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to append to list of open files"); } /* end else */ f->shared->nrefs++; /* Create the file's "top open object" information */ if (H5FO_top_create(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create open object data structure"); /* Set return value */ ret_value = f; @@ -1662,7 +1665,7 @@ H5F__check_if_using_file_locks(H5P_genplist_t *fapl, hbool_t *use_file_locking) /* Check the fapl property */ if (H5P_get(fapl, H5F_ACS_USE_FILE_LOCKING_NAME, use_file_locking) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get use file locking flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get use file locking flag"); /* Check the environment variable */ if (use_locks_env_g != FAIL) @@ -1777,15 +1780,15 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * same file more than once at a time. */ if (NULL == (drvr = H5FD_get_class(fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to retrieve VFL class") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to retrieve VFL class"); /* Get the file access property list, for future queries */ if (NULL == (a_plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list"); /* Check if we are using file locking */ if (H5F__check_if_using_file_locks(a_plist, &use_file_locking) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to get file locking flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to get file locking flag"); /* * Opening a file is a two step process. First we try to open the @@ -1847,7 +1850,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if (NULL == (lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", - name, tent_flags) + name, tent_flags); } /* Is the file already open? */ @@ -1863,26 +1866,26 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * SWMR write/read access flags don't agree. */ if (H5FD_close(lf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info"); if (flags & H5F_ACC_TRUNC) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to truncate a file which is already open") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to truncate a file which is already open"); if (flags & H5F_ACC_EXCL) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file exists") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file exists"); if ((flags & H5F_ACC_RDWR) && 0 == (shared->flags & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for read-only") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for read-only"); if ((flags & H5F_ACC_SWMR_WRITE) && 0 == (shared->flags & H5F_ACC_SWMR_WRITE)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "SWMR write access flag not the same for file that is already open") + "SWMR write access flag not the same for file that is already open"); if ((flags & H5F_ACC_SWMR_READ) && !((shared->flags & H5F_ACC_SWMR_WRITE) || (shared->flags & H5F_ACC_SWMR_READ) || (shared->flags & H5F_ACC_RDWR))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "SWMR read access flag not the same for file that is already open") + "SWMR read access flag not the same for file that is already open"); /* Allocate new "high-level" file struct */ if ((file = H5F__new(shared, flags, fcpl_id, fapl_id, NULL)) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create new file object") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create new file object"); } /* end if */ else { /* Check if tentative open was good enough */ @@ -1893,10 +1896,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * file and open it for real. */ if (H5FD_close(lf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info"); if (NULL == (lf = H5FD_open(name, flags, fapl_id, HADDR_UNDEF))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file"); } /* end if */ /* Place an advisory lock on the file */ @@ -1905,7 +1908,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Locking failed - Closing will remove the lock */ if (H5FD_close(lf) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "unable to close low-level file info"); - HGOTO_ERROR(H5E_FILE, H5E_CANTLOCKFILE, NULL, "unable to lock the file") + HGOTO_ERROR(H5E_FILE, H5E_CANTLOCKFILE, NULL, "unable to lock the file"); } /* end if */ /* Create the 'top' file structure */ @@ -1916,7 +1919,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) */ if (H5FD_close(lf) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info"); - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to initialize file structure") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to initialize file structure"); } /* end if */ /* Need to set status_flags in the superblock if the driver has a 'lock' method */ @@ -1926,9 +1929,9 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Check to see if both SWMR and cache image are requested. Fail if so */ if (H5C_cache_image_status(file, &ci_load, &ci_write) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get MDC cache image status") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get MDC cache image status"); if ((ci_load || ci_write) && (flags & (H5F_ACC_SWMR_READ | H5F_ACC_SWMR_WRITE))) - HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, NULL, "can't have both SWMR and cache image") + HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, NULL, "can't have both SWMR and cache image"); /* Retain the name the file was opened with */ file->open_name = H5MM_xstrdup(name); @@ -1944,26 +1947,26 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) file->shared->use_file_locking = use_file_locking; else if (shared->nrefs > 1) if (file->shared->use_file_locking != use_file_locking) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file locking flag values don't match") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file locking flag values don't match"); /* Check if page buffering is enabled */ if (H5P_get(a_plist, H5F_ACS_PAGE_BUFFER_SIZE_NAME, &page_buf_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get page buffer size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get page buffer size"); if (page_buf_size) { #ifdef H5_HAVE_PARALLEL /* Collective metadata writes are not supported with page buffering */ if (file->shared->coll_md_write) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "collective metadata writes are not supported with page buffering") + "collective metadata writes are not supported with page buffering"); /* Temporary: fail file create when page buffering feature is enabled for parallel */ - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "page buffering is disabled for parallel") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "page buffering is disabled for parallel"); #endif /* H5_HAVE_PARALLEL */ /* Query for other page buffer cache properties */ if (H5P_get(a_plist, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_NAME, &page_buf_min_meta_perc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get minimum metadata fraction of page buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get minimum metadata fraction of page buffer"); if (H5P_get(a_plist, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_NAME, &page_buf_min_raw_perc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get minimum raw data fraction of page buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get minimum raw data fraction of page buffer"); } /* end if */ /* @@ -1980,33 +1983,33 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Create the page buffer before initializing the superblock */ if (page_buf_size) if (H5PB_create(shared, page_buf_size, page_buf_min_meta_perc, page_buf_min_raw_perc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create page buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create page buffer"); /* Initialize information about the superblock and allocate space for it */ /* (Writes superblock extension messages, if there are any) */ if (H5F__super_init(file) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to allocate file superblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to allocate file superblock"); /* Create and open the root group */ /* (This must be after the space for the superblock is allocated in * the file, since the superblock must be at offset 0) */ if (H5G_mkroot(file, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create/open root group") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create/open root group"); } /* end if */ else if (1 == shared->nrefs) { /* Read the superblock if it hasn't been read before. */ if (H5F__super_read(file, a_plist, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock") + HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock"); /* Create the page buffer before initializing the superblock */ if (page_buf_size) if (H5PB_create(shared, page_buf_size, page_buf_min_meta_perc, page_buf_min_raw_perc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create page buffer") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create page buffer"); /* Open the root group */ if (H5G_mkroot(file, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read root group") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read root group"); } /* end if */ /* @@ -2016,7 +2019,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * the degree in shared file structure. */ if (H5P_get(a_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file close degree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file close degree"); if (shared->nrefs == 1) { if (fc_degree == H5F_CLOSE_DEFAULT) shared->fc_degree = lf->cls->fc_degree; @@ -2025,16 +2028,16 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) } /* end if */ else if (shared->nrefs > 1) { if (fc_degree == H5F_CLOSE_DEFAULT && shared->fc_degree != lf->cls->fc_degree) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match"); if (fc_degree != H5F_CLOSE_DEFAULT && fc_degree != shared->fc_degree) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match"); } /* end if */ /* This is a private property to clear the status_flags in the super block */ /* Use by h5clear and a routine in test/flush2.c to clear the test file's status_flags */ if (H5P_exist_plist(a_plist, H5F_ACS_CLEAR_STATUS_FLAGS_NAME) > 0) { if (H5P_get(a_plist, H5F_ACS_CLEAR_STATUS_FLAGS_NAME, &clear) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get clearance for status_flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get clearance for status_flags"); else if (clear) file->shared->sblock->status_flags = 0; } /* end if */ @@ -2045,23 +2048,23 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * in shared file structure. */ if (H5P_get(a_plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get evict on close value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get evict on close value"); if (shared->nrefs == 1) shared->evict_on_close = evict_on_close; else if (shared->nrefs > 1) { if (shared->evict_on_close != evict_on_close) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "file evict-on-close value doesn't match") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "file evict-on-close value doesn't match"); } /* end if */ /* Formulate the absolute path for later search of target file for external links */ if (shared->nrefs == 1) { if (H5_build_extpath(name, &file->shared->extpath) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath"); } /* Formulate the actual file name, after following symlinks, etc. */ if (H5F__build_actual_name(file, a_plist, name, &file->actual_name) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build actual name") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build actual name"); if (set_flag) { if (H5F_INTENT(file) & H5F_ACC_RDWR) { /* Set and check consistency of status_flags */ @@ -2072,7 +2075,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for write/SWMR write (may use to clear " - "file consistency flags)") + "file consistency flags)"); } /* version 3 superblock */ file->shared->sblock->status_flags |= H5F_SUPER_WRITE_ACCESS; @@ -2081,16 +2084,16 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Flush the superblock & superblock extension */ if (H5F_super_dirty(file) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, NULL, "unable to mark superblock as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, NULL, "unable to mark superblock as dirty"); if (H5F_flush_tagged_metadata(file, H5AC__SUPERBLOCK_TAG) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock"); if (H5F_flush_tagged_metadata(file, file->shared->sblock->ext_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension"); /* Remove the file lock for SWMR_WRITE */ if (use_file_locking && (H5F_INTENT(file) & H5F_ACC_SWMR_WRITE)) { if (H5FD_unlock(file->shared->lf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTUNLOCKFILE, NULL, "unable to unlock the file") + HGOTO_ERROR(H5E_FILE, H5E_CANTUNLOCKFILE, NULL, "unable to unlock the file"); } /* end if */ } /* end if */ else { /* H5F_ACC_RDONLY: check consistency of status_flags */ @@ -2102,13 +2105,13 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) (!(file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS) && file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "file is not already open for SWMR writing") + "file is not already open for SWMR writing"); } /* end if */ else if ((file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS) || (file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is already open for write (may use to clear file " - "consistency flags)") + "consistency flags)"); } /* version 3 superblock */ } /* end else */ } /* end if set_flag */ @@ -2146,7 +2149,7 @@ H5F__post_open(H5F_t *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))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't create VOL object") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't create VOL object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2340,7 +2343,7 @@ H5F__close(H5F_t *f) /* Get the number of open objects and open files on this file/mount hierarchy */ if (H5F__mount_count_ids(f, &nopen_files, &nopen_objs) < 0) - HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy") + HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy"); /* If there are no other file IDs open on this file/mount hier., but * there are still open objects, issue an error and bail out now, @@ -2348,7 +2351,7 @@ H5F__close(H5F_t *f) * a "real" attempt at closing the file. */ if (nopen_files == 1 && nopen_objs > 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file, there are objects still open") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file, there are objects still open"); } /* Reset the file ID for this file */ @@ -2356,7 +2359,7 @@ H5F__close(H5F_t *f) /* Attempt to close the file/mount hierarchy */ if (H5F_try_close(f, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2381,7 +2384,7 @@ H5F__delete(const char *filename, hid_t fapl_id) /* Delete the file */ if (H5FD_delete(filename, fapl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "unable to delete file") + HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "unable to delete file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2430,7 +2433,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) /* Get the number of open objects and open files on this file/mount hierarchy */ if (H5F__mount_count_ids(f, &nopen_files, &nopen_objs) < 0) - HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy") + HGOTO_ERROR(H5E_SYM, H5E_MOUNT, FAIL, "problem checking mount hierarchy"); /* * Close file according to close degree: @@ -2479,7 +2482,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) case H5F_CLOSE_DEFAULT: default: - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file, unknown file close degree") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file, unknown file close degree"); } /* end switch */ /* Mark this file as closing (prevents re-entering file shutdown code below) */ @@ -2505,10 +2508,10 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) /* Try to close all the open objects in this file */ for (u = 0; u < obj_count; u++) if (H5I_dec_ref(objs[u]) < 0) - HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't close object") + HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't close object"); } if (result < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(1)") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(1)"); /* Get the list of IDs of open named datatype objects */ /* (Do this separately from the dataset & attribute IDs, because @@ -2523,10 +2526,10 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) /* Try to close all the open objects in this file */ for (u = 0; u < obj_count; u++) if (H5I_dec_ref(objs[u]) < 0) - HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't close object") + HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't close object"); } if (result < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(2)") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_ids failed(2)"); } /* end if */ } /* end if */ @@ -2535,11 +2538,11 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) */ if (f->parent) if (H5F_try_close(f->parent, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close parent file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close parent file"); /* Unmount and close each child before closing the current file. */ if (H5F__close_mounts(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't unmount child files") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't unmount child files"); /* If there is more than one reference to the shared file struct and the * file has an external file cache, we should see if it can be closed. This @@ -2547,14 +2550,14 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) */ if (f->shared->efc && (f->shared->nrefs > 1)) if (H5F__efc_try_close(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't attempt to close EFC") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't attempt to close EFC"); /* Destroy the H5F_t struct and decrement the reference count for the * shared H5F_shared_t struct. If the reference count for the H5F_shared_t * struct reaches zero then destroy it also. */ if (H5F__dest(f, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file"); /* Since we closed the file, this should be set to TRUE */ if (was_closed) @@ -2587,7 +2590,7 @@ H5F__reopen(H5F_t *f) /* Get a new "top level" file struct, sharing the same "low level" file struct */ if (NULL == (ret_value = H5F__new(f->shared, 0, H5P_FILE_CREATE_DEFAULT, H5P_FILE_ACCESS_DEFAULT, NULL))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to reopen file"); /* Duplicate old file's names */ ret_value->open_name = H5MM_xstrdup(f->open_name); @@ -2621,13 +2624,13 @@ H5F_get_id(H5F_t *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 */ if ((ret_value = H5VL_wrap_register(H5I_FILE, file, FALSE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group"); file->id_exists = TRUE; } else { /* Increment reference count on existing ID */ if (H5I_inc_ref(ret_value, FALSE) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINC, H5I_INVALID_HID, "incrementing file ID failed") + HGOTO_ERROR(H5E_ID, H5E_CANTINC, H5I_INVALID_HID, "incrementing file ID failed"); } /* end else */ done: @@ -2716,7 +2719,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n /* Call lstat() on the file's name */ if (HDlstat(name, &lst) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stat info for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stat info for file"); /* Check for symbolic link */ if (S_IFLNK == (lst.st_mode & S_IFMT)) { @@ -2728,7 +2731,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n /* Allocate realname buffer */ if (NULL == (realname = (char *)H5MM_calloc((size_t)PATH_MAX * sizeof(char)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Perform a sanity check that the file or link wasn't switched * between when we opened it and when we called lstat(). This is @@ -2739,9 +2742,9 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n /* Copy the FAPL object to modify */ if ((new_fapl_id = H5P_copy_plist(fapl, FALSE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy file access property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); if (NULL == (new_fapl = (H5P_genplist_t *)H5I_object(new_fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "can't get property list"); /* * Set the private property for retrieving the backing store @@ -2749,11 +2752,12 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n */ want_posix_fd = TRUE; if (H5P_set(new_fapl, H5F_ACS_WANT_POSIX_FD_NAME, &want_posix_fd) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set property for retrieving file descriptor") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, + "can't set property for retrieving file descriptor"); /* Retrieve the file handle */ if (H5F_get_vfd_handle(f, new_fapl_id, (void **)&fd) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve POSIX file descriptor") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve POSIX file descriptor"); /* Stat the filename we're resolving */ if (HDstat(name, &st) < 0) @@ -2765,15 +2769,15 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n /* Verify that the files are really the same */ if (st.st_mode != fst.st_mode || st.st_ino != fst.st_ino || st.st_dev != fst.st_dev) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "files' st_ino or st_dev fields changed!") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "files' st_ino or st_dev fields changed!"); /* Get the resolved path for the file name */ if (NULL == HDrealpath(name, realname)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve real path for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve real path for file"); /* Duplicate the resolved path for the file name */ if (NULL == (*actual_name = (char *)H5MM_strdup(realname))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path"); } /* end if */ } /* end if */ #endif /* H5_HAVE_SYMLINK */ @@ -2782,7 +2786,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n if (NULL == *actual_name) { /* Just duplicate the name used to open the file */ if (NULL == (*actual_name = (char *)H5MM_strdup(name))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate open name") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate open name"); } /* end else */ done: @@ -3107,7 +3111,7 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) * QAK - April, 2018 */ if (H5F__flush(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information"); /* Set the new bounds */ f->shared->low_bound = low; @@ -3139,10 +3143,10 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le /* Check args */ if (!file || !file->shared || !file->shared->lf) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file_id yields invalid file pointer") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file_id yields invalid file pointer"); fd_ptr = file->shared->lf; if (!fd_ptr->cls) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "fd_ptr yields invalid class pointer") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "fd_ptr yields invalid class pointer"); /* the address space used by the split and multi file drivers is not * a good fit for this call. Since the plan is to depreciate these @@ -3163,7 +3167,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le * JRM -- 11/11/22 */ if (HDstrcmp(fd_ptr->cls->name, "multi") == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not supported for multi file driver.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not supported for multi file driver."); /* While the family file driver is conceptually fully compatible * with the get file image operation, it sets a file driver message @@ -3185,11 +3189,11 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le * JRM -- 12/21/11 */ if (HDstrcmp(fd_ptr->cls->name, "family") == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver.") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver."); /* Go get the actual file size */ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(file->shared->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); /* Test to see if a buffer was provided */ if (buf_ptr != NULL) { @@ -3197,12 +3201,12 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, size_t *image_le /* Check for buffer too small */ if ((haddr_t)buf_len < eoa) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "supplied buffer too small") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "supplied buffer too small"); /* Read in the file image */ /* (Note compensation for base address addition in internal routine) */ if (H5FD_read(fd_ptr, H5FD_MEM_DEFAULT, 0, (size_t)eoa, buf_ptr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed") + HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed"); /* Offset to "status_flags" in the superblock */ tmp = H5F_SUPER_STATUS_FLAGS_OFF(file->shared->sblock->super_vers); @@ -3247,16 +3251,16 @@ H5F__get_info(H5F_t *f, H5F_info2_t *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) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock sizes") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock sizes"); /* Get the size of any persistent free space */ if (H5MF_get_freespace(f, &finfo->free.tot_space, &finfo->free.meta_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve free space information") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve free space information"); /* Check for SOHM info */ if (H5_addr_defined(f->shared->sohm_addr)) if (H5SM_ih_size(f, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve SOHM index & heap storage info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve SOHM index & heap storage info"); /* Set version # fields */ finfo->super.version = f->shared->sblock->super_vers; @@ -3300,7 +3304,7 @@ H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries) if (NULL == f->shared->retries[actype]) if (NULL == (f->shared->retries[actype] = (uint32_t *)H5MM_calloc((size_t)f->shared->retries_nbins * sizeof(uint32_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Index to retries based on log10 */ tmp = HDlog10((double)retries); @@ -3374,7 +3378,7 @@ H5F_object_flush_cb(H5F_t *f, hid_t obj_id) /* Invoke object flush callback if there is one */ if (f->shared->object_flush.func && f->shared->object_flush.func(obj_id, f->shared->object_flush.udata) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "object flush callback returns error") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "object flush callback returns error"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3400,7 +3404,7 @@ H5F__set_base_addr(const H5F_t *f, haddr_t addr) /* Dispatch to driver */ if (H5FD_set_base_addr(f->shared->lf, addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_base_addr request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_base_addr request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3427,7 +3431,7 @@ H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr) /* Dispatch to driver */ /* (H5FD_set_eoa() will add base_addr to addr) */ if (H5FD_set_eoa(f->shared->lf, type, addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3454,7 +3458,7 @@ H5F__set_paged_aggr(const H5F_t *f, hbool_t paged) /* Dispatch to driver */ if (H5FD_set_paged_aggr(f->shared->lf, paged) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set paged aggr mode failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set paged aggr mode failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3489,7 +3493,7 @@ H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa) /* Determine the maximum */ tmp_max = MAX(eof, eoa); if (HADDR_UNDEF == tmp_max) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file get eof/eoa requests failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file get eof/eoa requests failed"); *max_eof_eoa = tmp_max; @@ -3566,7 +3570,7 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info) * the H5free_memory() call. */ if (NULL == (info->retries[j] = (uint32_t *)H5MM_malloc(tot_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy the information */ H5MM_memcpy(info->retries[j], file->shared->retries[i], tot_size); @@ -3644,67 +3648,67 @@ H5F__start_swmr_write(H5F_t *f) /* Should have write permission */ if ((H5F_INTENT(f) & H5F_ACC_RDWR) == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "no write intent on file"); /* Check superblock version */ if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file superblock version - should be at least 3") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file superblock version - should be at least 3"); /* Check for correct file format version */ if ((f->shared->low_bound < H5F_LIBVER_V110) || (f->shared->high_bound < H5F_LIBVER_V110)) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, - "file format version does not support SWMR - needs to be 1.10 or greater") + "file format version does not support SWMR - needs to be 1.10 or greater"); /* Should not be marked for SWMR writing mode already */ if (f->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file already in SWMR writing mode") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file already in SWMR writing mode"); /* Check to see if cache image is enabled. Fail if so */ if (H5C_cache_image_status(f, &ci_load, &ci_write) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MDC cache image status") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MDC cache image status"); if (ci_load || ci_write) - HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "can't have both SWMR and MDC cache image") + HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "can't have both SWMR and MDC cache image"); /* Flush the superblock extension */ if (H5F_flush_tagged_metadata(f, f->shared->sblock->ext_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock extension"); /* Flush data buffers */ if (H5F__flush(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information"); /* Get the # of opened named datatypes and attributes */ if (H5F_get_obj_count(f, H5F_OBJ_DATATYPE | H5F_OBJ_ATTR, FALSE, &nt_attr_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed"); if (nt_attr_count > 0) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "named datatypes and/or attributes opened in the file") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "named datatypes and/or attributes opened in the file"); /* Get the # of opened datasets and groups */ if (H5F_get_obj_count(f, H5F_OBJ_GROUP | H5F_OBJ_DATASET, FALSE, &grp_dset_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "H5F_get_obj_count failed"); if (grp_dset_count > 0) { /* Allocate space for group and object locations */ if ((obj_ids = (hid_t *)H5MM_malloc(grp_dset_count * sizeof(hid_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for hid_t") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for hid_t"); if ((obj_glocs = (H5G_loc_t *)H5MM_malloc(grp_dset_count * sizeof(H5G_loc_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object group locations") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object group locations"); if ((obj_olocs = (H5O_loc_t *)H5MM_malloc(grp_dset_count * sizeof(H5O_loc_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object locations") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object locations"); if ((obj_paths = (H5G_name_t *)H5MM_malloc(grp_dset_count * sizeof(H5G_name_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object paths") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for object paths"); /* Taking a shortcut here to use calloc to initialize obj_apl_ids to all H5P_DEFAULT. If * this changes in the future we'll need to either initialize this array to all H5P_DEFAULT * 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't allocate buffer for hid_t"); 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, &grp_dset_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed"); /* Save the VOL connector and the object wrapping context for the refresh step */ if (grp_dset_count > 0) { @@ -3712,7 +3716,7 @@ H5F__start_swmr_write(H5F_t *f) /* Get the VOL object for one of the IDs */ if (NULL == (vol_obj = H5VL_vol_object(obj_ids[0]))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Get the (top) connector for the ID */ vol_connector = vol_obj->connector; @@ -3730,7 +3734,7 @@ H5F__start_swmr_write(H5F_t *f) /* Get the object from the VOL */ if (NULL == (obj = H5VL_object(obj_ids[u]))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get the object's access property list, if it is a dataset (access * properties are not needed to reopen other object types currently) @@ -3749,11 +3753,11 @@ H5F__start_swmr_write(H5F_t *f) /* Get dataset access properties */ if ((obj_apl_ids[u] = H5D_get_access_plist(obj)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, - "unable to get dataset access property list") + "unable to get dataset access property list"); break; case H5I_MAP: - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -3772,7 +3776,7 @@ H5F__start_swmr_write(H5F_t *f) case H5I_NTYPES: default: HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, - "not a valid file object ID (dataset, group, or datatype)") + "not a valid file object ID (dataset, group, or datatype)"); break; } /* end switch */ @@ -3787,13 +3791,13 @@ H5F__start_swmr_write(H5F_t *f) /* Close the object */ if (H5I_dec_ref(obj_ids[u]) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTCLOSEOBJ, FAIL, "decrementing object ID failed") + HGOTO_ERROR(H5E_ID, H5E_CANTCLOSEOBJ, FAIL, "decrementing object ID failed"); } /* end for */ } /* end if */ /* Flush and reset the accumulator */ if (H5F__accum_reset(f->shared, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator"); /* Turn on SWMR write in shared file open flags */ f->shared->flags |= H5F_ACC_SWMR_WRITE; @@ -3806,12 +3810,12 @@ H5F__start_swmr_write(H5F_t *f) /* Initialize "retries" and "retries_nbins" */ if (H5F_set_retries(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't set retries and retries_nbins") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't set retries and retries_nbins"); /* Turn off usage of accumulator */ f->shared->feature_flags &= ~(unsigned)H5FD_FEAT_ACCUMULATE_METADATA; if (H5FD_set_feature_flags(f->shared->lf, f->shared->feature_flags) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set feature_flags in VFD") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set feature_flags in VFD"); setup = TRUE; @@ -3821,29 +3825,29 @@ H5F__start_swmr_write(H5F_t *f) * type (exclusive vs shared) with a second call. */ if (H5FD_unlock(f->shared->lf) < 0) { - HGOTO_ERROR(H5E_FILE, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock the file") + HGOTO_ERROR(H5E_FILE, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock the file"); } if (H5FD_lock(f->shared->lf, TRUE) < 0) { - HGOTO_ERROR(H5E_FILE, H5E_CANTLOCKFILE, FAIL, "unable to lock the file") + HGOTO_ERROR(H5E_FILE, H5E_CANTLOCKFILE, FAIL, "unable to lock the file"); } } /* Mark superblock as dirty */ if (H5F_super_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty"); /* Flush the superblock */ if (H5F_flush_tagged_metadata(f, H5AC__SUPERBLOCK_TAG) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock"); /* Evict all flushed entries in the cache except the pinned superblock */ if (H5F__evict_cache_entries(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to evict file's cached information") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to evict file's cached information"); /* Refresh (reopen) the objects (groups & datasets) in the file */ for (u = 0; u < grp_dset_count; u++) if (H5O_refresh_metadata_reopen(obj_ids[u], obj_apl_ids[u], &obj_glocs[u], vol_connector, TRUE) < 0) - HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't refresh-close object") + HGOTO_ERROR(H5E_ID, H5E_CLOSEERROR, FAIL, "can't refresh-close object"); done: if (ret_value < 0 && setup) { @@ -3935,11 +3939,11 @@ H5F__format_convert(H5F_t *f) if (H5_addr_defined(f->shared->sblock->ext_addr)) if (H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, - "error in removing message from superblock extension") + "error in removing message from superblock extension"); /* Close freespace manager */ if (H5MF_try_close(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to free free-space address") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to free free-space address"); /* Set non-persistent freespace manager */ f->shared->fs_strategy = H5F_FILE_SPACE_STRATEGY_DEF; @@ -3955,7 +3959,7 @@ H5F__format_convert(H5F_t *f) if (mark_dirty) /* Mark superblock as dirty */ if (H5F_super_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3994,26 +3998,26 @@ H5F_get_file_id(H5VL_object_t *vol_obj, H5I_type_t obj_type, hbool_t app_ref) /* Retrieve VOL file from object */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file from object") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file from object"); /* Check if the file's ID already exists */ if (H5I_find_id(vol_obj_file, H5I_FILE, &file_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "getting file ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "getting file ID failed"); /* If the ID does not exist, register it with the VOL connector */ if (H5I_INVALID_HID == file_id) { /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; if ((file_id = H5VL_wrap_register(H5I_FILE, vol_obj_file, app_ref)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); } /* end if */ else { /* Increment ref count on existing ID */ if (H5I_inc_ref(file_id, app_ref) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "incrementing file ID failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "incrementing file ID failed"); } /* end else */ /* Set return value */ diff --git a/src/H5Fio.c b/src/H5Fio.c index 09d57e8..1b329b6 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -89,14 +89,14 @@ H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t /* Check for attempting I/O on 'temporary' file address */ if (H5_addr_le(f_sh->tmp_addr, (addr + size))) - HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space") + HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space"); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; /* Pass through page buffer layer */ if (H5PB_read(f_sh, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through page buffer failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through page buffer failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -129,14 +129,14 @@ H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf / /* Check for attempting I/O on 'temporary' file address */ if (H5_addr_le(f->shared->tmp_addr, (addr + size))) - HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space") + HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space"); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; /* Pass through page buffer layer */ if (H5PB_read(f->shared, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through page buffer failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through page buffer failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -169,14 +169,14 @@ H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t /* Check for attempting I/O on 'temporary' file address */ if (H5_addr_le(f_sh->tmp_addr, (addr + size))) - HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space") + HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space"); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; /* Pass through page buffer layer */ if (H5PB_write(f_sh, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through page buffer failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through page buffer failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -210,14 +210,14 @@ H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void /* Check for attempting I/O on 'temporary' file address */ if (H5_addr_le(f->shared->tmp_addr, (addr + size))) - HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space") + HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space"); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; /* Pass through page buffer layer */ if (H5PB_write(f->shared, map_type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through page buffer failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through page buffer failed"); done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_block_write() */ @@ -258,7 +258,7 @@ H5F_shared_select_read(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S_ /* Pass down to file driver layer (bypass page buffer for now) */ if (H5FD_read_selection(f_sh->lf, map_type, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "selection read through file driver failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "selection read through file driver failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -300,7 +300,7 @@ H5F_shared_select_write(H5F_shared_t *f_sh, H5FD_mem_t type, uint32_t count, H5S /* Pass down to file driver layer (bypass page buffer for now) */ if (H5FD_write_selection(f_sh->lf, map_type, count, mem_spaces, file_spaces, offsets, element_sizes, bufs) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "selection write through file driver failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "selection write through file driver failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -342,7 +342,7 @@ H5F_shared_vector_read(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], h /* Pass down to file driver layer (bypass page buffer for now) */ if (H5FD_read_vector(f_sh->lf, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "vector read through file driver failed") + HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "vector read through file driver failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -395,7 +395,7 @@ H5F_shared_vector_write(H5F_shared_t *f_sh, uint32_t count, H5FD_mem_t types[], /* Pass down to file driver layer (bypass page buffer for now) */ if (H5FD_write_vector(f_sh->lf, count, types, addrs, sizes, bufs) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write through file driver failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write through file driver failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -420,15 +420,15 @@ H5F_flush_tagged_metadata(H5F_t *f, haddr_t tag) /* Use tag to search for and flush associated metadata */ if (H5AC_flush_tagged_metadata(f, tag) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata"); /* Flush and reset the accumulator */ if (H5F__accum_reset(f->shared, TRUE) < 0) - HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator") + HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator"); /* Flush file buffers to disk. */ if (H5FD_flush(f->shared->lf, FALSE) < 0) - HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed") + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -455,7 +455,7 @@ H5F__evict_cache_entries(H5F_t *f) /* Evict all except pinned entries in the cache */ if (H5AC_evict(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "unable to evict all except pinned entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "unable to evict all except pinned entries"); #ifndef NDEBUG { @@ -464,19 +464,19 @@ H5F__evict_cache_entries(H5F_t *f) /* Retrieve status of the superblock */ if (H5AC_get_entry_status(f, (haddr_t)0, &status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get entry status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get entry status"); /* Verify status of the superblock entry in the cache */ if (!(status & H5AC_ES__IN_CACHE) || !(status & H5AC_ES__IS_PINNED)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get entry status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get entry status"); /* Get the number of cache entries */ if (H5AC_get_cache_size(f->shared->cache, NULL, NULL, NULL, &cur_num_entries) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_size() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_size() failed."); /* Should be the only one left in the cache (the superblock) */ if (cur_num_entries != 1) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "number of cache entries is not correct") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "number of cache entries is not correct"); } #endif /* NDEBUG */ diff --git a/src/H5Fmount.c b/src/H5Fmount.c index 1049bdc..ef0aa7b 100644 --- a/src/H5Fmount.c +++ b/src/H5Fmount.c @@ -58,11 +58,11 @@ H5F__close_mounts(H5F_t *f) /* Close the internal group maintaining the mount point */ if (H5G_close(f->shared->mtab.child[u].group) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close child group") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close child group"); /* Close the child file */ if (H5F_try_close(f->shared->mtab.child[u].file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close child file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close child file"); /* Eliminate the mount point from the table */ memmove(f->shared->mtab.child + u, f->shared->mtab.child + u + 1, @@ -122,23 +122,23 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN * that the mount wouldn't introduce a cycle in the mount tree. */ if (child->parent) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "file is already mounted") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "file is already mounted"); if (H5G_loc_find(loc, name, &mp_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found"); /* If the mount location is holding its file open, that file will close * and remove the mount as soon as we exit this function. Prevent the * user from doing this. */ if (mp_loc.oloc->holding_file != FALSE) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount path cannot contain links to external files") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount path cannot contain links to external files"); /* Open the mount point group */ if (NULL == (mount_point = H5G_open(&mp_loc))) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found"); /* Check if the proposed mount point group is already a mount point */ if (H5G_MOUNTED(mount_point)) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use"); /* Retrieve information from the mount point group */ /* (Some of which we had before but was reset in mp_loc when the group @@ -152,11 +152,11 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN 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") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount would introduce a cycle"); /* Make certain that the parent & child files have the same "file close degree" */ if (parent->shared->fc_degree != child->shared->fc_degree) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mounted file has different file close degree than parent") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mounted file has different file close degree than parent"); /* * Use a binary search to locate the position that the child should be @@ -180,7 +180,7 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN if (cmp > 0) md++; if (!cmp) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point is already in use"); /* Make room in the table */ if (parent->shared->mtab.nmounts >= parent->shared->mtab.nalloc) { @@ -189,7 +189,7 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN n * sizeof(parent->shared->mtab.child[0])); if (!x) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for mount table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for mount table"); parent->shared->mtab.child = x; parent->shared->mtab.nalloc = n; } @@ -205,19 +205,19 @@ H5F_mount(const H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UN /* Set the group's mountpoint flag */ if (H5G_mount(parent->shared->mtab.child[md].group) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to set group mounted flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to set group mounted flag"); /* Get the group location for the root group in the file to unmount */ if (NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (root_loc.path = H5G_nameof(child->shared->root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Search the open IDs and replace names for mount operation */ /* We pass H5G_UNKNOWN as object type; search all IDs */ if (H5G_name_replace(NULL, H5G_NAME_MOUNT, mp_loc.oloc->file, mp_loc.path->full_path_r, root_loc.oloc->file, root_loc.path->full_path_r) < 0) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to replace name") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to replace name"); done: if (ret_value < 0) { @@ -280,7 +280,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name) * then we must have found the mount point. */ if (H5G_loc_find(loc, name, &mp_loc /*out*/) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "group not found"); mp_loc_setup = TRUE; child = mp_loc.oloc->file; mnt_oloc = H5G_oloc(child->shared->root_grp); @@ -325,7 +325,7 @@ H5F_unmount(const H5G_loc_t *loc, const char *name) } if (cmp) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "not a mount point") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "not a mount point"); /* Found the correct index, set the info about the child */ child_idx = (int)md; @@ -346,14 +346,14 @@ H5F_unmount(const H5G_loc_t *loc, const char *name) /* Get the group location for the root group in the file to unmount */ if (NULL == (root_loc.oloc = H5G_oloc(child->shared->root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (root_loc.path = H5G_nameof(child->shared->root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Search the open IDs replace names to reflect unmount operation */ if (H5G_name_replace(NULL, H5G_NAME_UNMOUNT, mp_loc.oloc->file, mp_loc.path->full_path_r, root_loc.oloc->file, root_loc.path->full_path_r) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to replace name") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to replace name"); /* Eliminate the mount point from the table */ memmove(parent->shared->mtab.child + (unsigned)child_idx, @@ -365,14 +365,14 @@ H5F_unmount(const H5G_loc_t *loc, const char *name) /* Unmount the child file from the parent file */ if (H5G_unmount(child_group) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to reset group mounted flag") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to reset group mounted flag"); if (H5G_close(child_group) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close unmounted group") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close unmounted group"); /* Detach child file from parent & see if it should close */ child->parent = NULL; if (H5F_try_close(child, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close unmounted file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close unmounted file"); done: /* Free the mount point location's information, if it's been set up */ @@ -513,11 +513,11 @@ H5F__flush_mounts_recurse(H5F_t *f) /* Call the "real" flush routine, for this file */ if (H5F__flush(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information"); /* Check flush errors for children - errors are already on the stack */ if (nerrors) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's child mounts") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's child mounts"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -548,7 +548,7 @@ H5F_flush_mounts(H5F_t *f) /* Flush the mounted file hierarchy */ if (H5F__flush_mounts_recurse(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -611,11 +611,11 @@ H5F_traverse_mount(H5O_loc_t *oloc /*in,out*/) /* Release the mount point */ if (H5O_loc_free(oloc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to free object location"); /* Copy the entry for the root group */ if (H5O_loc_copy_deep(oloc, mnt_oloc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "unable to copy object location"); /* In case the shared root group info points to a different file handle * than the child, modify oloc */ diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c index 1a9b624..6786e07 100644 --- a/src/H5Fmpi.c +++ b/src/H5Fmpi.c @@ -88,7 +88,7 @@ H5F_mpi_get_rank(const H5F_t *f) /* Dispatch to driver */ if ((ret_value = H5FD_mpi_get_rank(f->shared->lf)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_rank request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_rank request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -116,7 +116,7 @@ H5F_mpi_get_comm(const H5F_t *f) /* Dispatch to driver */ if ((ret_value = H5FD_mpi_get_comm(f->shared->lf)) == MPI_COMM_NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -144,7 +144,7 @@ H5F_shared_mpi_get_size(const H5F_shared_t *f_sh) /* Dispatch to driver */ if ((ret_value = H5FD_mpi_get_size(f_sh->lf)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -172,7 +172,7 @@ H5F_mpi_get_size(const H5F_t *f) /* Dispatch to driver */ if ((ret_value = H5FD_mpi_get_size(f->shared->lf)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -353,7 +353,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm) /* Retrieve the file structure */ if (H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); f = loc.oloc->file; assert(f); @@ -361,7 +361,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm) if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) { /* retrieve the file communicator */ if (MPI_COMM_NULL == (*mpi_comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator"); } } /* otherwise, this is from H5Fopen or H5Fcreate and has to be collective */ @@ -372,20 +372,20 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm) H5FD_class_t *driver_class = NULL; if (NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file access list") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file access list"); if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info"); if (NULL == (driver_class = H5FD_get_class(driver_prop.driver_id))) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get driver class structure") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get driver class structure"); if (H5FD_driver_query(driver_class, &driver_feat_flags) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get driver feature flags") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get driver feature flags"); if (driver_feat_flags & H5FD_FEAT_HAS_MPI) if (H5P_peek(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, mpi_comm) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator"); } done: diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 4d15d95..b74884e 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -882,7 +882,7 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum) /* Retrieve the file's serial number */ if (H5FD_get_fileno(f->shared->lf, filenum) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno") + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -907,7 +907,7 @@ H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type) /* Dispatch to driver */ if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f_sh->lf, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -933,7 +933,7 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type) /* Dispatch to driver */ if (HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -985,7 +985,7 @@ H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle) /* Get the VFD handle */ if (H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1081,7 +1081,7 @@ H5F_shared_get_mpi_file_sync_required(const H5F_shared_t *f_sh, hbool_t *flag /* /* Dispatch to driver */ if ((ret_value = H5FD_mpi_get_file_sync_required(f_sh->lf, flag)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver get_file_sync_required request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver get_file_sync_required request failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1324,7 +1324,7 @@ H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info) /* Verify structure version */ if (info->version != H5VL_CONTAINER_INFO_VERSION) - HGOTO_ERROR(H5E_FILE, H5E_VERSION, FAIL, "wrong container info version #") + HGOTO_ERROR(H5E_FILE, H5E_VERSION, FAIL, "wrong container info version #"); /* Set the container info fields */ info->feature_flags = 0; /* None currently defined */ diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c index 312ddf0..ef80a79 100644 --- a/src/H5Fsfile.c +++ b/src/H5Fsfile.c @@ -99,7 +99,7 @@ H5F__sfile_add(H5F_shared_t *shared) /* Allocate new shared file node */ if (NULL == (new_shared = H5FL_CALLOC(H5F_sfile_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Set shared file value */ new_shared->shared = shared; @@ -180,7 +180,7 @@ H5F__sfile_remove(H5F_shared_t *shared) /* Indicate error if the node wasn't found */ if (curr == NULL) - HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "can't find shared file info") + HGOTO_ERROR(H5E_FILE, H5E_NOTFOUND, FAIL, "can't find shared file info"); /* Remove node found from list */ if (last != NULL) diff --git a/src/H5Fspace.c b/src/H5Fspace.c index eb0e7f9..163d8d8 100644 --- a/src/H5Fspace.c +++ b/src/H5Fspace.c @@ -96,22 +96,22 @@ H5F__alloc(H5F_t *f, H5F_mem_t type, hsize_t size, haddr_t *frag_addr, hsize_t * /* Get the EOA for the file */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa"); /* Check for overlapping into file's temporary allocation space */ if (H5_addr_gt((eoa + size), f->shared->tmp_addr)) HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, HADDR_UNDEF, - "'normal' file space allocation request will overlap into 'temporary' file space") + "'normal' file space allocation request will overlap into 'temporary' file space"); } /* end if */ /* Call the file driver 'alloc' routine */ ret_value = H5FD_alloc(f->shared->lf, type, f, size, frag_addr, frag_size); if (!H5_addr_defined(ret_value)) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, HADDR_UNDEF, "file driver 'alloc' request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, HADDR_UNDEF, "file driver 'alloc' request failed"); /* Mark EOA dirty */ if (H5F_eoa_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark EOA as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, HADDR_UNDEF, "unable to mark EOA as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -148,11 +148,11 @@ H5F__free(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size) /* Call the file driver 'free' routine */ if (H5FD_free(f->shared->lf, type, f, addr, size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "file driver 'free' request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "file driver 'free' request failed"); /* Mark EOA dirty */ if (H5F_eoa_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark EOA as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -189,7 +189,7 @@ H5F__try_extend(H5F_t *f, H5FD_mem_t type, haddr_t blk_end, hsize_t extra_reques /* Extend the object by extending the underlying file */ if ((ret_value = H5FD_try_extend(f->shared->lf, type, f, blk_end, extra_requested)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTEXTEND, FAIL, "driver try extend request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTEXTEND, FAIL, "driver try extend request failed"); /* H5FD_try_extend() updates driver message and marks the superblock * dirty, so no need to do it again here. diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 63164dd..b381369 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -101,9 +101,9 @@ H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr) if (f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "superblock extension not permitted with version %u of superblock", - f->shared->sblock->super_vers) + f->shared->sblock->super_vers); else if (H5_addr_defined(f->shared->sblock->ext_addr)) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "superblock extension already exists?!?!") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "superblock extension already exists?!?!"); else { /* The superblock extension isn't actually a group, but the * default group creation list should work fine. @@ -115,7 +115,7 @@ H5F__super_ext_create(H5F_t *f, H5O_loc_t *ext_ptr) */ H5O_loc_reset(ext_ptr); if (H5O_create(f, (size_t)0, (size_t)1, H5P_GROUP_CREATE_DEFAULT, ext_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create superblock extension") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create superblock extension"); /* Record the address of the superblock extension */ f->shared->sblock->ext_addr = ext_ptr->addr; @@ -154,7 +154,7 @@ H5F__super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr) /* Open the superblock extension object header */ if (H5O_open(ext_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open superblock extension") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open superblock extension"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -189,7 +189,7 @@ H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created) /* Increment link count on superblock extension's object header */ if (H5O_link(ext_ptr, 1) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LINKCOUNT, FAIL, "unable to increment hard link count") + HGOTO_ERROR(H5E_FILE, H5E_LINKCOUNT, FAIL, "unable to increment hard link count"); /* Decrement refcount on superblock extension's object header in memory */ if (H5O_dec_rc_by_loc(ext_ptr) < 0) @@ -199,7 +199,7 @@ H5F__super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr, hbool_t was_created) /* Twiddle the number of open objects to avoid closing the file. */ f->nopen_objs++; if (H5O_close(ext_ptr, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close superblock extension"); f->nopen_objs--; done: @@ -265,7 +265,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f) /* Encode driver-specific data */ if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information"); /* Write the message to the superblock extension. * @@ -277,7 +277,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f) if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, - "unable to update driver info header message") + "unable to update driver info header message"); } /* end if driver_size > 0 */ } /* end if !H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO) */ } /* end if superblock extension exists */ @@ -332,7 +332,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #ifdef H5_HAVE_PARALLEL if (H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) if ((mpi_size = H5F_mpi_get_size(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size"); /* If we are an MPI application with at least two processes, the * following superblock signature location optimization is applicable. @@ -353,9 +353,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set up MPI info */ if ((mpi_rank = H5F_mpi_get_rank(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Can't get MPI rank") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Can't get MPI rank"); if (MPI_COMM_NULL == (this_comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator"); /* Search for the file's signature only with rank 0 process */ if (0 == mpi_rank) { @@ -383,19 +383,19 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #endif /* H5_HAVE_PARALLEL */ if (H5FD_locate_signature(file, &super_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature"); #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ if (!H5_addr_defined(super_addr)) - HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "file signature not found") + HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "file signature not found"); /* Check for userblock present */ if (H5_addr_gt(super_addr, 0)) { /* Set the base address for the file in the VFD now */ if (H5F__set_base_addr(f, super_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver"); } /* end if */ /* Determine file intent for superblock protect */ @@ -412,19 +412,19 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Get the shared file creation property list */ if (NULL == (c_plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) - HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list"); /* Make certain we can read the fixed-size portion of the superblock */ if (H5F__set_eoa(f, H5FD_MEM_SUPER, (haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed"); /* Set up the user data for cache callbacks */ udata.f = f; udata.ignore_drvrinfo = H5F_HAS_FEATURE(f, H5FD_FEAT_IGNORE_DRVRINFO); udata.sym_leaf_k = 0; if (H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes"); udata.stored_eof = HADDR_UNDEF; udata.drvrinfo_removed = FALSE; @@ -433,7 +433,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Look up the superblock */ if (NULL == (sblock = (H5F_super_t *)H5AC_protect(f, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags))) - HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock"); /* * When opening a file with SWMR-write access, the library will first @@ -461,7 +461,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Check to ensure that superblock version 3 is used for SWMR-write access */ if (H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) { if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version for SWMR is less than 3") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version for SWMR is less than 3"); } /* Upgrade low_bound to at least V18 when encountering version 2 superblock */ @@ -474,11 +474,11 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Version bounds check */ if (sblock->super_vers > HDF5_superblock_ver_bounds[f->shared->high_bound]) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version exceeds high bound") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version exceeds high bound"); /* Pin the superblock in the cache */ if (H5AC_pin_protected_entry(sblock) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTPIN, FAIL, "unable to pin superblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTPIN, FAIL, "unable to pin superblock"); /* Mark the superblock dirty if it was modified during loading */ if (((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && udata.ignore_drvrinfo && udata.drvrinfo_removed) { @@ -505,7 +505,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set the base address for the file in the VFD now */ if (H5F__set_base_addr(f, sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set base address for file driver"); /* Indicate that the superblock should be marked dirty */ if ((rw_flags & H5AC__READ_ONLY_FLAG) == 0) @@ -514,11 +514,11 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set information in the file's creation property list */ if (H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &sblock->super_vers) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set superblock version") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set superblock version"); if (H5P_set(c_plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &sblock->sizeof_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number in an address") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number in an address"); if (H5P_set(c_plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &sblock->sizeof_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number for object size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set byte number for object size"); /* Handle the B-tree 'K' values */ if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { @@ -527,21 +527,21 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set the symbol table internal node 'K' value */ if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &udata.sym_leaf_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes"); sblock->sym_leaf_k = udata.sym_leaf_k; /* Set the B-tree internal node values, etc */ if (H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes"); H5MM_memcpy(sblock->btree_k, udata.btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID); } /* end if */ else { /* Get the (default) B-tree internal node values, etc */ /* (Note: these may be reset in a superblock extension) */ if (H5P_get(c_plist, H5F_CRT_BTREE_RANK_NAME, sblock->btree_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes"); if (H5P_get(c_plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes"); } /* end else */ /* @@ -549,7 +549,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) * address. */ if (H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set userblock size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set userblock size"); /* * Make sure that the data is not truncated. One case where this is @@ -578,7 +578,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Check if this private property exists in fapl */ if (H5P_exist_plist(fa_plist, H5F_ACS_SKIP_EOF_CHECK_NAME) > 0) if (H5P_get(fa_plist, H5F_ACS_SKIP_EOF_CHECK_NAME, &skip_eof_check) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get skip EOF check value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get skip EOF check value"); if (H5F_INTENT(f) & H5F_ACC_SWMR_READ) { /* @@ -593,14 +593,14 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) } if (!skip_eof_check && initial_read) { if (HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to determine file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to determine file size"); /* (Account for the stored EOA being absolute offset -QAK) */ if ((eof + sblock->base_addr) < udata.stored_eof) HGOTO_ERROR(H5E_FILE, H5E_TRUNCATED, FAIL, "truncated file: eof = %llu, sblock->base_addr = %llu, stored_eof = %llu", (unsigned long long)eof, (unsigned long long)sblock->base_addr, - (unsigned long long)udata.stored_eof) + (unsigned long long)udata.stored_eof); } /* @@ -631,12 +631,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) */ if (H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */ - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed"); /* Look up the driver info block */ if (NULL == (drvinfo = (H5O_drvinfo_t *)H5AC_protect(f, H5AC_DRVRINFO, sblock->driver_addr, &drvrinfo_udata, rw_flags))) - HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load driver info block") + HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load driver info block"); /* Loading the driver info block is enough to set up the right info */ @@ -651,7 +651,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Release the driver info block */ if (H5AC_unprotect(f, H5AC_DRVRINFO, sblock->driver_addr, drvinfo, drvinfo_flags) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to release driver info block") + HGOTO_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to release driver info block"); /* save a pointer to the driver information cache entry */ f->shared->drvinfo = drvinfo; @@ -659,7 +659,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* (Account for the stored EOA being absolute offset -NAF) */ if (H5F__set_eoa(f, H5FD_MEM_DEFAULT, udata.stored_eof - sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file"); /* Decode the optional superblock extension info */ if (H5_addr_defined(sblock->ext_addr)) { @@ -674,7 +674,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) */ if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, - "invalid superblock - extension message should not be defined for version < 2") + "invalid superblock - extension message should not be defined for version < 2"); /* Check for superblock extension being located "outside" the stored * 'eoa' value, which can occur with the split/multi VFD. @@ -685,28 +685,28 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) * (This is _rather_ a kludge -QAK) */ if (H5F__set_eoa(f, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set end-of-address marker for file"); } /* end if */ /* Open the superblock extension */ if (H5F__super_ext_open(f, sblock->ext_addr, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension"); /* Check for the extension having a 'driver info' message */ if ((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header"); if (status) { /* Check for ignoring the driver info for this file */ if (!udata.ignore_drvrinfo) { /* Retrieve the 'driver info' structure */ if (NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver info message not present") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver info message not present"); /* Validate and decode driver information */ if (H5FD_sb_load(f->shared->lf, drvinfo.name, drvinfo.buf) < 0) { H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo); - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "unable to decode driver information") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "unable to decode driver information"); } /* end if */ /* Reset driver info message */ @@ -719,15 +719,15 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Read in the shared OH message information if there is any */ if (H5SM_get_info(&ext_loc, c_plist) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to read SOHM table information") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to read SOHM table information"); /* Check for the extension having a 'v1 B-tree "K"' message */ if ((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header"); if (status) { /* Retrieve the 'v1 B-tree "K"' structure */ if (NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "v1 B-tree 'K' info message not present") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "v1 B-tree 'K' info message not present"); /* Set non-default v1 B-tree 'K' value info from file */ sblock->btree_k[H5B_CHUNK_ID] = btreek.btree_k[H5B_CHUNK_ID]; @@ -736,21 +736,21 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set non-default v1 B-tree 'K' values in the property list */ if (H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes"); if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for symbol table leaf nodes"); } /* end if */ /* Check for the extension having a 'free-space manager info' message */ if ((status = H5O_msg_exists(&ext_loc, H5O_FSINFO_ID)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header"); if (status) { uint8_t flags; /* Message flags */ /* Get message flags */ if (H5O_msg_get_flags(&ext_loc, H5O_FSINFO_ID, &flags) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, - "unable to message flags for free-space manager info message") + "unable to message flags for free-space manager info message"); /* If message is NOT marked "unknown"--set up file space info */ if (!(flags & H5O_MSG_FLAG_WAS_UNKNOWN)) { @@ -763,16 +763,16 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if (H5P_exist_plist(fa_plist, H5F_ACS_NULL_FSM_ADDR_NAME) > 0) if (H5P_get(fa_plist, H5F_ACS_NULL_FSM_ADDR_NAME, &f->shared->null_fsm_addr) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, - "can't get clearance for persisting fsm addr") + "can't get clearance for persisting fsm addr"); /* Retrieve the 'file space info' structure */ if (NULL == H5O_msg_read(&ext_loc, H5O_FSINFO_ID, &fsinfo)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get free-space manager info message") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get free-space manager info message"); /* Version bounds check */ if (H5O_fsinfo_check_version(H5F_HIGH_BOUND(f), &fsinfo) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, - "File space info message's version out of bounds") + "File space info message's version out of bounds"); /* Update changed values */ if (f->shared->fs_version != fsinfo.version) @@ -782,21 +782,21 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set non-default strategy in the property list */ if (H5P_set(c_plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &fsinfo.strategy) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy"); } /* end if */ if (f->shared->fs_persist != fsinfo.persist) { f->shared->fs_persist = fsinfo.persist; /* Set non-default strategy in the property list */ if (H5P_set(c_plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, &fsinfo.persist) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy"); } /* end if */ if (f->shared->fs_threshold != fsinfo.threshold) { f->shared->fs_threshold = fsinfo.threshold; /* Set non-default threshold in the property list */ if (H5P_set(c_plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &fsinfo.threshold) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space strategy"); } /* end if */ assert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN); @@ -806,7 +806,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set file space page size in the property list */ if (H5P_set(c_plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsinfo.page_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space page size") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set file space page size"); } /* end if */ if (f->shared->pgend_meta_thres != fsinfo.pgend_meta_thres) /* Initialize page end meta threshold */ @@ -883,7 +883,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, - "error in writing fsinfo message to superblock extension") + "error in writing fsinfo message to superblock extension"); } else { if (H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) { @@ -892,13 +892,13 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #endif /* JRM */ HGOTO_ERROR(H5E_FILE, H5E_CANTDELETE, FAIL, - "error in removing message from superblock extension") + "error in removing message from superblock extension"); } if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, TRUE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, - "error in writing fsinfo message to superblock extension") + "error in writing fsinfo message to superblock extension"); } #if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ f->shared->sblock = NULL; @@ -910,7 +910,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Check for the extension having a 'metadata cache image' message */ if ((status = H5O_msg_exists(&ext_loc, H5O_MDCI_MSG_ID)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, "unable to read object header"); if (status) { hbool_t rw = ((rw_flags & H5AC__READ_ONLY_FLAG) == 0); H5O_mdci_t mdci_msg; @@ -929,7 +929,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Retrieve the 'metadata cache image message' structure */ if (NULL == H5O_msg_read(&ext_loc, H5O_MDCI_MSG_ID, &mdci_msg)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache image message") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache image message"); /* Indicate to the cache that there's an image to load on first protect call */ if (H5AC_load_cache_image_on_next_protect(f, mdci_msg.addr, mdci_msg.size, rw) < 0) @@ -939,7 +939,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Close superblock extension */ if (H5F__super_ext_close(f, &ext_loc, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "unable to close file's superblock extension"); } /* end if */ /* Update the driver info if VFD indicated to do so */ @@ -963,7 +963,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Encode driver-specific data */ if (H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information"); /* Set the driver info information for the superblock extension */ drvinfo.len = driver_size; @@ -983,7 +983,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #endif /* JRM */ if (H5F__super_ext_write_msg(f, H5O_DRVINFO_ID, &drvinfo, FALSE, H5O_MSG_NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, - "error in writing message to superblock extension") + "error in writing message to superblock extension"); #if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ f->shared->sblock = NULL; @@ -996,7 +996,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Remove the driver info message from the superblock extension */ if (H5F__super_ext_remove_msg(f, H5O_DRVINFO_ID) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, - "error in removing message from superblock extension") + "error in removing message from superblock extension"); /* Check if the superblock extension was removed */ if (!H5_addr_defined(sblock->ext_addr)) @@ -1009,7 +1009,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Set the page aggregation mode */ if (H5F__set_paged_aggr(f, (hbool_t)H5F_PAGED_AGGR(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set paged_aggr status for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "failed to set paged_aggr status for file driver"); done: /* Reset the ring in the API context */ @@ -1089,7 +1089,7 @@ H5F__super_init(H5F_t *f) /* Allocate space for the superblock */ if (NULL == (sblock = H5FL_CALLOC(H5F_super_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize various address information */ sblock->base_addr = HADDR_UNDEF; @@ -1099,15 +1099,15 @@ H5F__super_init(H5F_t *f) /* Get the shared file creation property list */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Initialize sym_leaf_k */ if (H5P_get(plist, H5F_CRT_SYM_LEAF_NAME, &sblock->sym_leaf_k) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for object size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for object size"); /* Initialize btree_k */ if (H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, &sblock->btree_k[0]) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes"); /* Check for non-default free-space settings */ if (!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF && @@ -1175,20 +1175,20 @@ H5F__super_init(H5F_t *f) /* Version bounds check */ if (super_vers > HDF5_superblock_ver_bounds[f->shared->high_bound]) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "superblock version out of bounds"); /* If a newer superblock version is required, set it here */ if (super_vers != HDF5_SUPERBLOCK_VERSION_DEF) { H5P_genplist_t *c_plist; /* Property list */ if (NULL == (c_plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property list"); if (H5P_set(c_plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set superblock version") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set superblock version"); } /* end if */ if (H5FD_set_paged_aggr(f->shared->lf, (hbool_t)H5F_PAGED_AGGR(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set paged_aggr status for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set paged_aggr status for file driver"); /* * The superblock starts immediately after the user-defined @@ -1197,7 +1197,7 @@ H5F__super_init(H5F_t *f) * now. */ if (H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get userblock size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get userblock size"); /* Sanity check the userblock size vs. the file's allocation alignment */ if (userblock_size > 0) { @@ -1205,10 +1205,10 @@ H5F__super_init(H5F_t *f) hsize_t alignment = H5F_PAGED_AGGR(f) ? f->shared->fs_page_size : f->shared->alignment; if (userblock_size < alignment) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "userblock size must be > file object alignment") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "userblock size must be > file object alignment"); if (0 != (userblock_size % alignment)) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, - "userblock size must be an integral multiple of file object alignment") + "userblock size must be an integral multiple of file object alignment"); } /* end if */ sblock->base_addr = userblock_size; @@ -1216,13 +1216,13 @@ H5F__super_init(H5F_t *f) /* Reserve space for the userblock */ if (H5F__set_eoa(f, H5FD_MEM_SUPER, userblock_size) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for userblock") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for userblock"); /* Set the base address for the file in the VFD now, after allocating * space for userblock. */ if (H5F__set_base_addr(f, sblock->base_addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set base address for file driver") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to set base address for file driver"); /* Save a local copy of the superblock version number, size of addresses & offsets */ sblock->super_vers = super_vers; @@ -1269,7 +1269,7 @@ H5F__super_init(H5F_t *f) /* Insert superblock into cache, pinned */ if (H5AC_insert_entry(f, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG | H5AC__FLUSH_LAST_FLAG | H5AC__FLUSH_COLLECTIVELY_FLAG) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache"); sblock_in_cache = TRUE; /* Keep a copy of the superblock info */ @@ -1277,7 +1277,7 @@ H5F__super_init(H5F_t *f) /* Allocate space for the superblock */ if (HADDR_UNDEF == H5MF_alloc(f, H5FD_MEM_SUPER, superblock_size)) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock"); /* set the drvinfo filed to NULL -- will overwrite this later if needed */ f->shared->drvinfo = NULL; @@ -1329,7 +1329,7 @@ H5F__super_init(H5F_t *f) * extension. */ if (H5F__super_ext_create(f, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension"); ext_created = TRUE; /* Create the Shared Object Header Message table and register it with @@ -1338,7 +1338,7 @@ H5F__super_init(H5F_t *f) if (f->shared->sohm_nindexes > 0) { /* Initialize the shared message code & write the SOHM message to the extension */ if (H5SM_init(f, plist, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create SOHM table") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to create SOHM table"); } /* Check for non-default v1 B-tree 'K' values to store */ @@ -1354,7 +1354,7 @@ H5F__super_init(H5F_t *f) if (H5O_msg_create(&ext_loc, H5O_BTREEK_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &btreek) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, - "unable to update v1 B-tree 'K' value header message") + "unable to update v1 B-tree 'K' value header message"); } /* end if */ /* Check for driver info to store */ @@ -1368,13 +1368,13 @@ H5F__super_init(H5F_t *f) /* Encode driver-specific data */ 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information"); /* Write driver info information to the superblock extension */ info.len = driver_size; info.buf = dbuf; 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message"); assert(FALSE == f->shared->drvinfo_sb_msg_exists); f->shared->drvinfo_sb_msg_exists = TRUE; @@ -1396,7 +1396,7 @@ H5F__super_init(H5F_t *f) /* Set the version for the fsinfo message */ if (H5O_fsinfo_set_version(H5F_LOW_BOUND(f), H5F_HIGH_BOUND(f), &fsinfo) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set version of fsinfo") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set version of fsinfo"); f->shared->fs_version = fsinfo.version; for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) @@ -1404,7 +1404,7 @@ H5F__super_init(H5F_t *f) if (H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE | H5O_MSG_FLAG_MARK_IF_UNKNOWN, H5O_UPDATE_TIME, &fsinfo) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message"); } /* end if */ } /* end if */ else { @@ -1415,7 +1415,8 @@ H5F__super_init(H5F_t *f) /* Allocate space for the driver info */ if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "memory allocation failed for driver info message") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, + "memory allocation failed for driver info message"); /* Set up driver info message */ /* (NOTE: All the actual information (name & driver information) is @@ -1429,7 +1430,7 @@ H5F__super_init(H5F_t *f) if (H5AC_insert_entry(f, H5AC_DRVRINFO, sblock->driver_addr, drvinfo, H5AC__PIN_ENTRY_FLAG | H5AC__FLUSH_LAST_FLAG | H5AC__FLUSH_COLLECTIVELY_FLAG) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINS, FAIL, "can't add driver info block to cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTINS, FAIL, "can't add driver info block to cache"); drvinfo_in_cache = TRUE; f->shared->drvinfo = drvinfo; } /* end if */ @@ -1514,7 +1515,7 @@ H5F_eoa_dirty(H5F_t *f) /* Mark superblock dirty in cache, so change to EOA will get encoded */ if (H5F_super_dirty(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty"); /* If the driver information block exists, mark it dirty as well * so that the change in eoa will be reflected there as well if @@ -1522,12 +1523,12 @@ H5F_eoa_dirty(H5F_t *f) */ if (f->shared->drvinfo) { if (H5AC_mark_entry_dirty(f->shared->drvinfo) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark drvinfo as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark drvinfo as dirty"); } /* end if */ /* If the driver info is stored as a message, update that instead */ else if (f->shared->drvinfo_sb_msg_exists) { if (H5F__update_super_ext_driver_msg(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark drvinfo message as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark drvinfo message as dirty"); } done: @@ -1558,7 +1559,7 @@ H5F_super_dirty(H5F_t *f) /* Mark superblock dirty in cache, so change to EOA will get encoded */ if (H5AC_mark_entry_dirty(f->shared->sblock) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") + HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1634,7 +1635,7 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size) /* Get object header info for superblock extension */ if (H5O_get_hdr_info(&ext_loc, &hdr_info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info"); /* Set the superblock extension size */ *super_ext_size = hdr_info.space.total; @@ -1684,12 +1685,12 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create, /* Open/create the superblock extension object header */ if (H5_addr_defined(f->shared->sblock->ext_addr)) { if (H5F__super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, "unable to open file's superblock extension"); } /* end if */ else { 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create file's superblock extension"); ext_created = TRUE; } /* end else */ assert(H5_addr_defined(ext_loc.addr)); @@ -1698,24 +1699,24 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, hbool_t may_create, /* Check if message with ID does not exist in the object header */ if ((status = H5O_msg_exists(&ext_loc, id)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, - "unable to check object header for message or message exists") + "unable to check object header for message or message exists"); /* Check for creating vs. writing */ if (may_create) { if (status) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should not exist") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should not exist"); /* Create the message with ID in the superblock extension */ if (H5O_msg_create(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to create the message in object header") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to create the message in object header"); } /* end if */ else { if (!status) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should exist") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "Message should exist"); /* Update the message with ID in the superblock extension */ if (H5O_msg_write(&ext_loc, id, (mesg_flags | H5O_MSG_FLAG_DONTSHARE), H5O_UPDATE_TIME, mesg) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to write the message in object header") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to write the message in object header"); } /* end else */ done: @@ -1763,32 +1764,32 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id) /* Open superblock extension object header */ if (H5F__super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension"); ext_opened = TRUE; /* Check if message with ID exists in the object header */ if ((status = H5O_msg_exists(&ext_loc, id)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message"); else if (status) { /* message exists */ H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */ /* Remove the message */ if (H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message"); /* Get info for the superblock extension's object header */ if (H5O_get_hdr_info(&ext_loc, &hdr_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info"); /* If the object header is an empty base chunk, remove superblock extension */ if (hdr_info.nchunks == 1) { if ((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages"); else if ((unsigned)null_count == hdr_info.nmesgs) { assert(H5_addr_defined(ext_loc.addr)); if (H5O_delete(f, ext_loc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages"); f->shared->sblock->ext_addr = HADDR_UNDEF; } /* end else-if */ } /* end if */ diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 70a8888..0e4b02a 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -164,11 +164,11 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); sblock->super_vers = *image++; if (sblock->super_vers > HDF5_SUPERBLOCK_VERSION_LATEST) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad superblock version number") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad superblock version number"); /* Size check */ if (((size_t)(image - (const uint8_t *)*image_ref)) != H5F_SUPERBLOCK_FIXED_SIZE) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad superblock (fixed) size") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad superblock (fixed) size"); /* Determine the size of addresses & size of offsets, for computing the * variable-sized portion of the superblock. @@ -188,10 +188,10 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si if (sblock->sizeof_addr != 2 && sblock->sizeof_addr != 4 && sblock->sizeof_addr != 8 && sblock->sizeof_addr != 16 && sblock->sizeof_addr != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad byte number in an address") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad byte number in an address"); if (sblock->sizeof_size != 2 && sblock->sizeof_size != 4 && sblock->sizeof_size != 8 && sblock->sizeof_size != 16 && sblock->sizeof_size != 32) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad byte number for object size") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad byte number for object size"); /* Check for extending the EOA for the file */ if (extend_eoa) { @@ -201,11 +201,11 @@ H5F__superblock_prefix_decode(H5F_super_t *sblock, const uint8_t **image_ref, si variable_size = (size_t)H5F_SUPERBLOCK_VARLEN_SIZE(sblock->super_vers, sblock->sizeof_addr, sblock->sizeof_size); if (variable_size == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "variable size can't be zero") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "variable size can't be zero"); /* Make certain we can read the variable-sized portion of the superblock */ if (H5F__set_eoa(udata->f, H5FD_MEM_SUPER, (haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + variable_size)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed"); } /* Update the image buffer pointer */ @@ -245,7 +245,7 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8 HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); drv_vers = *image++; if (drv_vers != HDF5_DRIVERINFO_VERSION_0) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad driver information block version number") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad driver information block version number"); /* Reserved bytes */ if (H5_IS_BUFFER_OVERFLOW(image, 3, end)) @@ -274,7 +274,7 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8 /* Get current EOA... */ eoa = H5FD_get_eoa(udata->f->shared->lf, H5FD_MEM_SUPER); if (!H5_addr_defined(eoa)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* ... if it is too small, extend it. */ min_eoa = udata->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drvrinfo->len; @@ -282,7 +282,7 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name, const uint8 /* If it grew, set it */ if (H5_addr_gt(min_eoa, eoa)) if (H5FD_set_eoa(udata->f->shared->lf, H5FD_MEM_SUPER, min_eoa) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed"); } /* Update the image buffer pointer */ @@ -341,7 +341,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len, /* Deserialize the file superblock's prefix */ if (H5F__superblock_prefix_decode(&sblock, &image, image_len, udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file superblock prefix") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file superblock prefix"); /* Save the version to be used in verify_chksum callback */ udata->super_vers = sblock.super_vers; @@ -418,11 +418,11 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Allocate space for the superblock */ if (NULL == (sblock = H5FL_CALLOC(H5F_super_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Deserialize the file superblock's prefix */ if (H5F__superblock_prefix_decode(sblock, &image, len, udata, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file superblock prefix") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file superblock prefix"); /* Check for older version of superblock format */ if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) { @@ -433,58 +433,58 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Freespace version (hard-wired) */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); if (HDF5_FREESPACE_VERSION != *image++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad free space version number") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad free space version number"); /* Root group version number (hard-wired) */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); if (HDF5_OBJECTDIR_VERSION != *image++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad object directory version number") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad object directory version number"); /* Skip over reserved byte */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); image++; /* Shared header version number (hard-wired) */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); if (HDF5_SHAREDHEADER_VERSION != *image++) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad shared-header format version number") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad shared-header format version number"); /* Skip over size of file addresses (already decoded) */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); image++; udata->f->shared->sizeof_addr = sblock->sizeof_addr; /* Keep a local copy also */ /* Skip over size of file sizes (already decoded) */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); image++; udata->f->shared->sizeof_size = sblock->sizeof_size; /* Keep a local copy also */ /* Skip over reserved byte */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); image++; /* Various B-tree sizes */ if (H5_IS_BUFFER_OVERFLOW(image, 2, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); UINT16DECODE(image, sym_leaf_k); if (sym_leaf_k == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad symbol table leaf node 1/2 rank") + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad symbol table leaf node 1/2 rank"); udata->sym_leaf_k = sym_leaf_k; /* Keep a local copy also */ /* Need 'get' call to set other array values */ if (H5_IS_BUFFER_OVERFLOW(image, 2, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); UINT16DECODE(image, snode_btree_k); if (snode_btree_k == 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad 1/2 rank for btree internal nodes") + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, NULL, "bad 1/2 rank for btree internal nodes"); udata->btree_k[H5B_SNODE_ID] = snode_btree_k; /* Delay setting the value in the property list until we've checked @@ -493,27 +493,27 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* File status flags (not really used yet) */ if (H5_IS_BUFFER_OVERFLOW(image, 4, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); UINT32DECODE(image, status_flags); if (status_flags > 255) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad superblock status flags") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad superblock status flags"); sblock->status_flags = (uint8_t)status_flags; if (sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock"); /* If the superblock version # is greater than 0, read in the indexed * storage B-tree internal 'K' value */ if (sblock->super_vers > HDF5_SUPERBLOCK_VERSION_DEF) { if (H5_IS_BUFFER_OVERFLOW(image, 2, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); UINT16DECODE(image, chunk_btree_k); /* Reserved bytes are present only in version 1 */ if (sblock->super_vers == HDF5_SUPERBLOCK_VERSION_1) { /* Reserved */ if (H5_IS_BUFFER_OVERFLOW(image, 2, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); image += 2; } } @@ -523,7 +523,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Remainder of "variable-sized" portion of superblock */ if (H5_IS_BUFFER_OVERFLOW(image, H5F_sizeof_addr(udata->f) * 4, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->base_addr /*out*/); H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->ext_addr /*out*/); H5F_addr_decode(udata->f, (const uint8_t **)&image, &udata->stored_eof /*out*/); @@ -531,14 +531,14 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Allocate space for the root group symbol table entry */ if (sblock->root_ent) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "root entry should not exist yet") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "root entry should not exist yet"); if (NULL == (sblock->root_ent = (H5G_entry_t *)H5MM_calloc(sizeof(H5G_entry_t)))) HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, - "can't allocate space for root group symbol table entry") + "can't allocate space for root group symbol table entry"); /* Decode the root group symbol table entry */ if (H5G_ent_decode(udata->f, (const uint8_t **)&image, sblock->root_ent, end) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode root group symbol table entry") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode root group symbol table entry"); /* Set the root group address to the correct value */ sblock->root_addr = sblock->root_ent->header; @@ -568,16 +568,16 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Check whether the image pointer is out of bounds */ if (H5_IS_BUFFER_OVERFLOW(image, 1, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); /* File status flags (not really used yet) */ sblock->status_flags = *image++; if (sblock->status_flags & ~H5F_SUPER_ALL_FLAGS) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock") + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, NULL, "bad flag value for superblock"); /* Check whether the image pointer will be out of bounds */ if (H5_IS_BUFFER_OVERFLOW(image, H5F_SIZEOF_ADDR(udata->f) * 4, end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); /* Base, superblock extension, end of file & root group object header addresses */ H5F_addr_decode(udata->f, (const uint8_t **)&image, &sblock->base_addr /*out*/); @@ -589,7 +589,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, /* Check whether the image pointer will be out of bounds */ if (H5_IS_BUFFER_OVERFLOW(image, sizeof(uint32_t), end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, NULL, "image pointer is out of bounds"); /* Decode checksum */ UINT32DECODE(image, read_chksum); @@ -712,7 +712,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU * such, use the EOA value in its place, knowing that the current EOF * value will ultimately match it. */ if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); H5F_addr_encode(f, &image, (rel_eof + sblock->base_addr)); /* Encode the driver information block address */ @@ -720,7 +720,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU /* Encode the root group object entry, including the cached stab info */ if (H5G_ent_encode(f, &image, sblock->root_ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry") + HGOTO_ERROR(H5E_FILE, H5E_CANTENCODE, FAIL, "can't encode root group symbol table entry"); /* NOTE: Driver info block is handled separately */ @@ -746,12 +746,12 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU * in its place, knowing that the current EOF value will * ultimately match it. */ if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); H5F_addr_encode(f, &image, (rel_eof + sblock->base_addr)); /* Retrieve information for root group */ if (NULL == (root_oloc = H5G_oloc(f->shared->root_grp))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to retrieve root group information"); /* Encode address of root group's object header */ H5F_addr_encode(f, &image, root_oloc->addr); @@ -795,7 +795,7 @@ H5F__cache_superblock_free_icr(void *_thing) /* Destroy superblock */ if (H5F__super_free(sblock) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free superblock") + HGOTO_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to free superblock"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -849,7 +849,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, vo /* Deserialize the file driver info's prefix */ if (H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, image_len, udata, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file driver info prefix") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file driver info prefix"); /* Set the final size for the cache image */ *actual_len = H5F_DRVINFOBLOCK_HDR_SIZE + drvrinfo.len; @@ -885,18 +885,18 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, hb /* Allocate space for the driver info */ if (NULL == (drvinfo = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) - HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "memory allocation failed for driver info message") + HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "memory allocation failed for driver info message"); /* Deserialize the file driver info's prefix */ if (H5F__drvrinfo_prefix_decode(drvinfo, drv_name, &image, len, udata, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "can't decode file driver info prefix"); /* Sanity check */ 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, NULL, "unable to decode driver information"); /* Sanity check */ assert((size_t)(image - (const uint8_t *)_image) <= len); @@ -975,7 +975,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBU /* Encode driver-specific data */ if (H5FD_sb_encode(f->shared->lf, (char *)image, dbuf + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information"); /* Advance buffer pointer past name & variable-sized portion of driver info */ image += 8 + drvinfo->len; diff --git a/src/H5Ftest.c b/src/H5Ftest.c index d56461b..593c525 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -90,16 +90,16 @@ H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_coun /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Push API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Retrieve count for message type */ if (H5SM__get_mesg_count_test(file, type_id, mesg_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -131,16 +131,16 @@ H5F__check_cached_stab_test(hid_t file_id) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Push API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Verify the cached stab info */ if (H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -168,7 +168,7 @@ H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Retrieve maxaddr for file */ *maxaddr = file->shared->maxaddr; @@ -197,7 +197,7 @@ H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Retrieve maxaddr for file */ *sbe_addr = file->shared->sblock->ext_addr; @@ -225,9 +225,9 @@ H5F__same_file_test(hid_t file_id1, hid_t file_id2) /* Check arguments */ if (NULL == (file1 = (H5F_t *)H5VL_object_verify(file_id1, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); if (NULL == (file2 = (H5F_t *)H5VL_object_verify(file_id2, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* If they are using the same underlying "shared" file struct, they are the same file */ ret_value = (file1->shared == file2->shared); @@ -259,7 +259,7 @@ H5F__reparse_file_lock_variable_test(void) /* Check the file locking environment variable */ if (H5F__parse_file_lock_env_var(&use_locks_env_g) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5G.c b/src/H5G.c index f15f250..95fc4bf 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -155,25 +155,25 @@ H5G__create_api_common(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, TRUE, &gapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Check link creation property list */ if (H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a link creation property list"); /* Check group creation property list */ if (H5P_DEFAULT == gcpl_id) gcpl_id = H5P_GROUP_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group creation property list"); /* Set the LCPL for the API context */ H5CX_set_lcpl(lcpl_id); @@ -181,11 +181,11 @@ H5G__create_api_common(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl /* Create the group */ if (NULL == (grp = H5VL_group_create(*vol_obj_ptr, &loc_params, name, lcpl_id, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group"); /* Get an ID for the group */ if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle"); done: if (H5I_INVALID_HID == ret_value) @@ -228,7 +228,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t g /* Create the group synchronously */ if ((ret_value = H5G__create_api_common(loc_id, name, lcpl_id, gcpl_id, gapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously create group"); done: FUNC_LEAVE_API(ret_value) @@ -264,7 +264,7 @@ H5Gcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* Create the group asynchronously */ if ((ret_value = H5G__create_api_common(loc_id, name, lcpl_id, gcpl_id, gapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously create group"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -274,7 +274,7 @@ H5Gcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on group ID"); - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -328,16 +328,16 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) if (H5P_DEFAULT == gcpl_id) gcpl_id = H5P_GROUP_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group create property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group create property list"); if (H5P_DEFAULT == gapl_id) gapl_id = H5P_GROUP_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not group access property list"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&gapl_id, H5P_CLS_GACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -345,16 +345,16 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Create the group */ if (NULL == (grp = H5VL_group_create(vol_obj, &loc_params, NULL, H5P_LINK_CREATE_DEFAULT, gcpl_id, gapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group"); /* Get an ID for the group */ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get ID for group handle"); done: /* Cleanup on failure */ @@ -390,21 +390,21 @@ H5G__open_api_common(hid_t loc_id, const char *name, hid_t gapl_id, void **token /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_GACC, FALSE, &gapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); if (NULL == (grp = H5VL_group_open(*vol_obj_ptr, &loc_params, name, gapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group"); /* Register an ID for the group */ if ((ret_value = H5VL_register(H5I_GROUP, grp, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group"); done: if (H5I_INVALID_HID == ret_value) @@ -439,7 +439,7 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id) /* Open the group synchronously */ if ((ret_value = H5G__open_api_common(loc_id, name, gapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to synchronously open group"); done: FUNC_LEAVE_API(ret_value) @@ -473,7 +473,7 @@ H5Gopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the group asynchronously */ if ((ret_value = H5G__open_api_common(loc_id, name, gapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to asynchronously open group"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -483,7 +483,7 @@ H5Gopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on group ID"); - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -515,7 +515,7 @@ H5Gget_create_plist(hid_t group_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group ID"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_GROUP_GET_GCPL; @@ -523,7 +523,7 @@ H5Gget_create_plist(hid_t group_id) /* Get the group creation property list for the group */ if (H5VL_group_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get group's creation property list") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get group's creation property list"); /* Set the return value */ ret_value = vol_cb_args.args.get_gcpl.gcpl_id; @@ -558,19 +558,19 @@ H5G__get_info_api_common(hid_t loc_id, H5G_info_t *group_info /*out*/, void **to /* Check args */ id_type = H5I_get_type(loc_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group (or file) ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group (or file) ID"); if (!group_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL"); /* Set up VOL callback & object access arguments */ vol_cb_args.op_type = H5VL_GROUP_GET_INFO; if (H5VL_setup_self_args(loc_id, vol_obj_ptr, &vol_cb_args.args.get_info.loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments"); vol_cb_args.args.get_info.ginfo = group_info; /* Retrieve group information */ if (H5VL_group_get(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -595,7 +595,7 @@ H5Gget_info(hid_t loc_id, H5G_info_t *group_info /*out*/) /* Retrieve group information synchronously */ if (H5G__get_info_api_common(loc_id, group_info, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to synchronously get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to synchronously get group info"); done: FUNC_LEAVE_API(ret_value) @@ -628,7 +628,7 @@ H5Gget_info_async(const char *app_file, const char *app_func, unsigned app_line, /* Retrieve group information asynchronously */ if (H5G__get_info_api_common(loc_id, group_info, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to asynchronously get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to asynchronously get group info"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -636,7 +636,7 @@ H5Gget_info_async(const char *app_file, const char *app_func, unsigned app_line, if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE6(__func__, "*s*sIuixi", app_file, app_func, app_line, loc_id, group_info, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -666,18 +666,18 @@ H5G__get_info_by_name_api_common(hid_t loc_id, const char *name, H5G_info_t *gro /* Check args */ if (!group_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL"); /* Set up VOL callback & object access arguments */ vol_cb_args.op_type = H5VL_GROUP_GET_INFO; if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &vol_cb_args.args.get_info.loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments"); vol_cb_args.args.get_info.ginfo = group_info; /* Retrieve group information */ if (H5VL_group_get(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -703,7 +703,7 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *group_info /*out /* Retrieve group information synchronously */ if (H5G__get_info_by_name_api_common(loc_id, name, group_info, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't synchronously retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't synchronously retrieve group info"); done: FUNC_LEAVE_API(ret_value) @@ -736,7 +736,7 @@ H5Gget_info_by_name_async(const char *app_file, const char *app_func, unsigned a /* Retrieve group information asynchronously */ if (H5G__get_info_by_name_api_common(loc_id, name, group_info, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't asynchronously retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't asynchronously retrieve group info"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -744,7 +744,7 @@ H5Gget_info_by_name_async(const char *app_file, const char *app_func, unsigned a if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE8(__func__, "*s*sIui*sxii", app_file, app_func, app_line, loc_id, name, group_info, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -775,18 +775,18 @@ H5G__get_info_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t /* Check args */ if (!group_info) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_info parameter cannot be NULL"); /* Set up VOL callback & object access arguments */ vol_cb_args.op_type = H5VL_GROUP_GET_INFO; if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr, &vol_cb_args.args.get_info.loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments"); vol_cb_args.args.get_info.ginfo = group_info; /* Retrieve group information */ if (H5VL_group_get(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -814,7 +814,7 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5 /* Retrieve group information synchronously */ if (H5G__get_info_by_idx_api_common(loc_id, group_name, idx_type, order, n, group_info, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't synchronously retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't synchronously retrieve group info"); done: FUNC_LEAVE_API(ret_value) @@ -850,7 +850,7 @@ H5Gget_info_by_idx_async(const char *app_file, const char *app_func, unsigned ap /* Retrieve group information asynchronously */ if (H5G__get_info_by_idx_api_common(loc_id, group_name, idx_type, order, n, group_info, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't asynchronously retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't asynchronously retrieve group info"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -858,7 +858,7 @@ H5Gget_info_by_idx_async(const char *app_file, const char *app_func, unsigned ap if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE11(__func__, "*s*sIui*sIiIohxii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, group_info, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -884,13 +884,13 @@ H5Gclose(hid_t group_id) /* Check arguments */ if (H5I_GROUP != H5I_get_type(group_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID"); /* Decrement the counter on the group ID. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref(group_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "decrementing group ID failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "decrementing group ID failed"); done: FUNC_LEAVE_API(ret_value) @@ -919,13 +919,13 @@ H5Gclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check arguments */ if (H5I_GROUP != H5I_get_type(group_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { /* Get group object's connector */ if (NULL == (vol_obj = H5VL_vol_object(group_id))) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get VOL object for group") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get VOL object for group"); /* Increase connector's refcount, so it doesn't get closed if closing * the group closes the file */ @@ -940,7 +940,7 @@ H5Gclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * reaches zero. */ if (H5I_dec_app_ref_async(group_id, token_ptr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "decrementing group ID failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "decrementing group ID failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -948,7 +948,7 @@ H5Gclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, group_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -978,11 +978,11 @@ H5Gflush(hid_t group_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(group_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_GROUP_FLUSH; @@ -990,7 +990,7 @@ H5Gflush(hid_t group_id) /* Flush group's metadata to file */ if (H5VL_group_specific(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group") + HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group"); done: FUNC_LEAVE_API(ret_value) @@ -1017,11 +1017,11 @@ H5Grefresh(hid_t group_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(group_id, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group ID"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(group_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_GROUP_REFRESH; @@ -1029,7 +1029,7 @@ H5Grefresh(hid_t group_id) /* Refresh group's metadata */ if (H5VL_group_specific(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c index ba10f51..d44f674 100644 --- a/src/H5Gbtree2.c +++ b/src/H5Gbtree2.c @@ -148,7 +148,7 @@ H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) /* Decode link information */ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link"); /* Compare the string values */ udata->cmp = HDstrcmp(udata->name, lnk->name); @@ -156,7 +156,7 @@ H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata) /* Check for correct link & callback to make */ if (udata->cmp == 0 && udata->found_op) { if ((udata->found_op)(lnk, udata->found_op_data) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed"); } /* end if */ /* Release the space allocated for the link */ @@ -238,7 +238,7 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int /* Check if the user's link and the B-tree's link have the same name */ if (H5HF_op(bt2_udata->fheap, bt2_rec->id, H5G__dense_fh_name_cmp, &fh_udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); /* Callback will set comparison value */ *result = fh_udata.cmp; diff --git a/src/H5Gcache.c b/src/H5Gcache.c index e4e42a7..febd37a 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -156,23 +156,23 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Allocate symbol table data structures */ if (NULL == (sym = H5FL_CALLOC(H5G_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); sym->node_size = (size_t)(H5G_NODE_SIZE(f)); if (NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* 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 (memcmp(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "bad symbol table node signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (H5_IS_BUFFER_OVERFLOW(image, 1, image_end)) HGOTO_ERROR(H5E_SYM, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (H5G_NODE_VERS != *image++) - HGOTO_ERROR(H5E_SYM, H5E_VERSION, NULL, "bad symbol table node version") + HGOTO_ERROR(H5E_SYM, H5E_VERSION, NULL, "bad symbol table node version"); /* Reserved */ if (H5_IS_BUFFER_OVERFLOW(image, 1, image_end)) @@ -186,7 +186,7 @@ H5G__cache_node_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Entries */ if (H5G__ent_decode_vec(f, &image, image_end, sym->entry, sym->nsyms) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries"); /* Set return value */ ret_value = sym; @@ -265,7 +265,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len, void *_thing /* Entries */ if (H5G__ent_encode_vec(f, &image, sym->entry, sym->nsyms) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize") + HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize"); /* Clear rest of symbol table node */ memset(image, 0, len - (size_t)(image - (uint8_t *)_image)); @@ -295,7 +295,7 @@ H5G__cache_node_free_icr(void *_thing) /* Destroy symbol table node */ if (H5G__node_free(sym) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to destroy symbol table node"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c index c0dc257..08a8fa2 100644 --- a/src/H5Gcompact.c +++ b/src/H5Gcompact.c @@ -86,7 +86,7 @@ H5G__compact_build_table_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void /* Copy link message into table */ if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk]))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); /* Increment current link entry to operate on */ udata->curr_lnk++; @@ -130,7 +130,7 @@ H5G__compact_build_table(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_ind /* Allocate the link table */ if ((ltable->lnks = (H5O_link_t *)H5MM_calloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Set up user data for iteration */ udata.ltable = ltable; @@ -140,11 +140,11 @@ H5G__compact_build_table(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_ind op.op_type = H5O_MESG_OP_APP; op.u.app_op = H5G__compact_build_table_cb; if (H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages"); /* Sort link table in correct iteration order */ if (H5G__link_sort_table(ltable, idx_type, order) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages"); } /* end if */ else ltable->lnks = NULL; @@ -177,7 +177,7 @@ H5G__compact_insert(const H5O_loc_t *grp_oloc, H5O_link_t *obj_lnk) /* Insert link message into group */ if (H5O_msg_create(grp_oloc, H5O_LINK_ID, 0, H5O_UPDATE_TIME, obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -207,11 +207,11 @@ H5G__compact_get_name_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5 /* Build table of all link messages */ if (H5G__compact_build_table(oloc, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table"); /* Check for going out of bounds */ if (idx >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Get the length of the name */ *name_len = HDstrlen(ltable.lnks[idx].name); @@ -258,7 +258,7 @@ H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, vo if (HDstrcmp(lnk->name, udata->name) == 0) { /* Replace path names for link being removed */ if (H5G__link_name_replace(udata->file, udata->grp_full_path_r, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object type") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object type"); /* Stop the iteration, we found the correct link */ HGOTO_DONE(H5_ITER_STOP); @@ -295,7 +295,7 @@ H5G__compact_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const ch /* Iterate over the link messages to delete the right one */ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -325,11 +325,11 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5RS /* Build table of all link messages, sorted according to desired order */ if (H5G__compact_build_table(oloc, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table"); /* Check for going out of bounds */ if (n >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound"); /* Initialize data to pass through object header iteration */ udata.file = oloc->file; @@ -338,7 +338,7 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5RS /* Iterate over the link messages to delete the right one */ if (H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message"); done: /* Release link table */ @@ -374,7 +374,7 @@ H5G__compact_iterate(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_index_t /* Build table of all link messages */ if (H5G__compact_build_table(oloc, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table"); /* Iterate over links in table */ if ((ret_value = H5G__link_iterate_table(<able, skip, last_lnk, op, op_data)) < 0) @@ -416,7 +416,7 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud if (udata->lnk) { /* Copy link information */ if (NULL == H5O_msg_copy(H5O_LINK_ID, lnk, udata->lnk)) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); } /* end if */ /* Indicate that the correct link was found */ @@ -462,7 +462,7 @@ H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, hbool_t *found, H5O op.op_type = H5O_MESG_OP_APP; op.u.app_op = H5G__compact_lookup_cb; if (H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -494,15 +494,15 @@ H5G__compact_lookup_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo, H5_i /* Build table of all link messages, sorted according to desired order */ if (H5G__compact_build_table(oloc, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create link message table"); /* Check for going out of bounds */ if (n >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index out of bound"); /* Copy link information */ if (NULL == H5O_msg_copy(H5O_LINK_ID, <able.lnks[n], lnk)) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); done: /* Release link table */ diff --git a/src/H5Gdense.c b/src/H5Gdense.c index 158b811..961560a 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -273,15 +273,15 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline) /* Create fractal heap for storing links */ if (NULL == (fheap = H5HF_create(f, &fheap_cparam))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create fractal heap"); /* Retrieve the heap's address in the file */ if (H5HF_get_heap_addr(fheap, &(linfo->fheap_addr)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get fractal heap address") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get fractal heap address"); /* 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") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length"); assert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN); /* Create the name index v2 B-tree */ @@ -294,11 +294,11 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline) bt2_cparam.split_percent = H5G_NAME_BT2_SPLIT_PERC; bt2_cparam.merge_percent = H5G_NAME_BT2_MERGE_PERC; if (NULL == (bt2_name = H5B2_create(f, &bt2_cparam, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2_name, &(linfo->name_bt2_addr)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index"); /* Check if we should create a creation order index v2 B-tree */ if (linfo->index_corder) { @@ -312,11 +312,11 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline) bt2_cparam.split_percent = H5G_CORDER_BT2_SPLIT_PERC; bt2_cparam.merge_percent = H5G_CORDER_BT2_MERGE_PERC; if (NULL == (bt2_corder = H5B2_create(f, &bt2_cparam, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2_corder, &(linfo->corder_bt2_addr)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index"); } /* end if */ done: @@ -364,31 +364,31 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *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) - HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size"); /* Wrap the local buffer for serialized link */ if (NULL == (wb = H5WB_wrap(link_buf, sizeof(link_buf)))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for link */ if (NULL == (link_ptr = H5WB_actual(wb, link_size))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Create serialized form of link */ if (H5O_msg_encode(f, H5O_LINK_ID, FALSE, (unsigned char *)link_ptr, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode link"); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Insert the serialized link into the fractal heap */ if (H5HF_insert(fheap, link_size, link_ptr, udata.id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into fractal heap"); /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, linfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Create the callback information for v2 B-tree record insertion */ udata.common.f = f; @@ -402,18 +402,18 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk) /* Insert link into 'name' tracking v2 B-tree */ if (H5B2_insert(bt2_name, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree"); /* 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 */ assert(H5_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") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index"); /* Insert the record into the creation order index v2 B-tree */ if (H5B2_insert(bt2_corder, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert record into v2 B-tree"); } /* end if */ done: @@ -456,7 +456,7 @@ H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk) /* Copy link information */ if (H5O_msg_copy(H5O_LINK_ID, lnk, user_lnk) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -492,11 +492,11 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, linfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Construct the user data for v2 B-tree callback */ udata.f = f; @@ -508,7 +508,7 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name, hbool_t /* Find & copy the named link in the 'name' index */ if (H5B2_find(bt2_name, &udata, found, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in name index"); done: /* Release resources */ @@ -542,11 +542,11 @@ H5G__dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Decode link information & keep a copy */ if (NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link"); /* Copy link information */ if (NULL == H5O_msg_copy(H5O_LINK_ID, tmp_lnk, udata->lnk)) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); done: /* Release the space allocated for the link */ @@ -582,7 +582,7 @@ H5G__dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to copy the link information */ if (H5HF_op(bt2_udata->fheap, record->id, H5G__dense_lookup_by_idx_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "link found callback failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "link found callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -651,11 +651,11 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Construct the user data for v2 B-tree callback */ udata.f = f; @@ -664,20 +664,20 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type /* Find & copy the link in the appropriate index */ if (H5B2_index(bt2, order, n, H5G__dense_lookup_by_idx_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in index") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in index"); } /* end if */ else { /* Otherwise, we need to build a table of the links and sort it */ /* Build the table of links for this group */ if (H5G__dense_build_table(f, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links"); /* Check for going out of bounds */ if (n >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Copy link information */ if (NULL == H5O_msg_copy(H5O_LINK_ID, <able.lnks[n], lnk)) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); } /* end else */ done: @@ -718,7 +718,7 @@ H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata) /* Copy link information */ if (H5O_msg_copy(H5O_LINK_ID, lnk, &(udata->ltable->lnks[udata->curr_lnk])) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy link message"); /* Increment number of links stored */ udata->curr_lnk++; @@ -763,7 +763,7 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, /* Allocate the table to store the links */ if ((ltable->lnks = (H5O_link_t *)H5MM_malloc(sizeof(H5O_link_t) * ltable->nlinks)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Set up user data for iteration */ udata.ltable = ltable; @@ -772,11 +772,11 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, /* Iterate over the links in the group, building a table of the link messages */ if (H5G__dense_iterate(f, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G__dense_build_table_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links"); /* Sort link table in correct iteration order */ if (H5G__link_sort_table(ltable, idx_type, order) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages"); } /* end if */ else ltable->lnks = NULL; @@ -812,7 +812,7 @@ H5G__dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata) */ if (NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -848,7 +848,7 @@ H5G__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to copy the link information */ if (H5HF_op(bt2_udata->fheap, record->id, H5G__dense_iterate_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed"); /* Make the callback */ ret_value = (bt2_udata->op)(fh_udata.lnk, bt2_udata->op_data); @@ -934,11 +934,11 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Construct the user data for v2 B-tree iterator callback */ udata.f = f; @@ -960,7 +960,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type, H5_i else { /* Build the table of links for this group */ if (H5G__dense_build_table(f, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links"); /* Iterate over links in table */ if ((ret_value = H5G__link_iterate_table(<able, skip, last_lnk, op, op_data)) < 0) @@ -1001,7 +1001,7 @@ H5G__dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Decode link information */ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link"); /* Get the length of the name */ udata->name_len = HDstrlen(lnk->name); @@ -1047,7 +1047,7 @@ H5G__dense_get_name_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, record->id, H5G__dense_get_name_by_idx_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed"); /* Set the name's full length to return */ bt2_udata->name_len = fh_udata.name_len; @@ -1117,11 +1117,11 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Set up the user data for the v2 B-tree 'record remove' callback */ udata.f = f; @@ -1131,7 +1131,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 /* Retrieve the name according to the v2 B-tree's index order */ if (H5B2_index(bt2, order, n, H5G__dense_get_name_by_idx_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLIST, FAIL, "can't locate object in v2 B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTLIST, FAIL, "can't locate object in v2 B-tree"); /* Set return value */ *name_len = udata.name_len; @@ -1139,11 +1139,11 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type, H5 else { /* Otherwise, we need to build a table of the links and sort it */ /* Build the table of links for this group */ if (H5G__dense_build_table(f, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links"); /* Check for going out of bounds */ if (n >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Get the length of the name */ *name_len = HDstrlen(ltable.lnks[n].name); @@ -1190,7 +1190,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Decode link information */ if (NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode link"); /* Check for removing the link from the creation order index */ if (H5_addr_defined(udata->corder_bt2_addr)) { @@ -1198,7 +1198,7 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Open the creation order index v2 B-tree */ if (NULL == (bt2 = H5B2_open(udata->f, udata->corder_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index") + 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 */ assert(lnk->corder_valid); @@ -1207,18 +1207,18 @@ H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Remove the record from the name index v2 B-tree */ if (H5B2_remove(bt2, &bt2_udata, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, - "unable to remove link from creation order index v2 B-tree") + "unable to remove link from creation order index v2 B-tree"); } /* end if */ /* Replace open objects' names, if requested */ if (udata->replace_names) if (H5G__link_name_replace(udata->f, udata->grp_full_path_r, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects"); /* Perform the deletion action on the link, if requested */ /* (call message "delete" callback directly: *ick* - QAK) */ if (H5O_link_delete(udata->f, NULL, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link"); done: /* Release resources */ @@ -1257,12 +1257,12 @@ H5G__dense_remove_bt2_cb(const void *_record, void *_bt2_udata) /* Call fractal heap 'op' routine, to perform user callback */ if (H5HF_op(bt2_udata->common.fheap, record->id, H5G__dense_remove_fh_cb, &fh_udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed"); /* Remove record from fractal heap, if requested */ if (bt2_udata->rem_from_fheap) if (H5HF_remove(bt2_udata->common.fheap, record->id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1296,11 +1296,11 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_ /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the name index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, linfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Set up the user data for the v2 B-tree 'record remove' callback */ udata.common.f = f; @@ -1316,7 +1316,7 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_ /* Remove the record from the name index v2 B-tree */ if (H5B2_remove(bt2, &udata, H5G__dense_remove_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from name index v2 B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from name index v2 B-tree"); done: /* Release resources */ @@ -1348,7 +1348,7 @@ H5G__dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Decode link information */ if (NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj))) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, H5_ITER_ERROR, "can't decode link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, H5_ITER_ERROR, "can't decode link"); /* Can't operate on link here because the fractal heap block is locked */ @@ -1398,7 +1398,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") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed"); assert(fh_udata.lnk); /* Check for removing the link from the "other" index (creation order, when name used and vice versa) */ @@ -1425,31 +1425,31 @@ H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata) /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->other_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for 'other' index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for 'other' index"); /* Set the common information for the v2 B-tree remove operation */ /* Remove the record from the name index v2 B-tree */ if (H5B2_remove(bt2, &other_bt2_udata, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, H5_ITER_ERROR, - "unable to remove link from 'other' index v2 B-tree") + "unable to remove link from 'other' index v2 B-tree"); } /* end if */ /* Replace open objects' names */ if (H5G__link_name_replace(bt2_udata->f, bt2_udata->grp_full_path_r, fh_udata.lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTRENAME, FAIL, "unable to rename open objects"); /* Perform the deletion action on the link */ /* (call link message "delete" callback directly: *ick* - QAK) */ if (H5O_link_delete(bt2_udata->f, NULL, fh_udata.lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link"); /* Release the space allocated for the link */ H5O_msg_free(H5O_LINK_ID, fh_udata.lnk); /* Remove record from fractal heap */ if (H5HF_remove(bt2_udata->fheap, heap_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from fractal heap"); done: /* Release resources */ @@ -1521,11 +1521,11 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index"); /* Set up the user data for the v2 B-tree 'remove by index' callback */ udata.f = f; @@ -1536,20 +1536,20 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful /* Remove the record from the name index v2 B-tree */ if (H5B2_remove_by_idx(bt2, order, n, H5G__dense_remove_by_idx_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from indexed v2 B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from indexed v2 B-tree"); } /* end if */ else { /* Otherwise, we need to build a table of the links and sort it */ /* Build the table of links for this group */ if (H5G__dense_build_table(f, linfo, idx_type, order, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "error building table of links"); /* Check for going out of bounds */ if (n >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Remove the appropriate link from the dense storage */ if (H5G__dense_remove(f, linfo, grp_full_path_r, ltable.lnks[n].name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from dense storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from dense storage"); } /* end else */ done: @@ -1596,7 +1596,7 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, linfo->fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Set up the user data for the v2 B-tree 'record remove' callback */ udata.common.f = f; @@ -1612,16 +1612,16 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* Delete the name index, adjusting the ref. count on links removed */ if (H5B2_delete(f, linfo->name_bt2_addr, NULL, H5G__dense_remove_bt2_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index"); /* Close the fractal heap */ if (H5HF_close(fheap) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close fractal heap"); } /* end if */ else { /* Delete the name index, without adjusting the ref. count on the links */ if (H5B2_delete(f, linfo->name_bt2_addr, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index"); } /* end else */ linfo->name_bt2_addr = HADDR_UNDEF; @@ -1630,7 +1630,7 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* Delete the creation order index, without adjusting the ref. count on the links */ assert(H5_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") + 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 @@ -1638,7 +1638,7 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link) /* Delete the fractal heap */ if (H5HF_delete(f, linfo->fheap_addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap"); linfo->fheap_addr = HADDR_UNDEF; done: diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index b385df1..79a5fce 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -164,9 +164,9 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name given"); if (size_hint > UINT32_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "size_hint cannot be larger than UINT32_MAX") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "size_hint cannot be larger than UINT32_MAX"); /* Check if we need to create a non-standard GCPL */ if (size_hint > 0) { @@ -175,31 +175,31 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) /* Get the default property list */ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(H5P_GROUP_CREATE_DEFAULT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Make a copy of the default property list */ if ((tmp_gcpl = H5P_copy_plist(gc_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list"); /* Get pointer to the copied property list */ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(tmp_gcpl))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Get the group info property */ if (H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get group info"); /* Set the non-default local heap size hint */ H5_CHECKED_ASSIGN(ginfo.lheap_size_hint, uint32_t, size_hint, size_t); if (H5P_set(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info"); } else tmp_gcpl = H5P_GROUP_CREATE_DEFAULT; /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, H5I_INVALID_HID, "can't set collective metadata read info"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -207,17 +207,17 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Create the group */ if (NULL == (grp = H5VL_group_create(vol_obj, &loc_params, name, H5P_LINK_CREATE_DEFAULT, tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group"); /* Get an ID for the group */ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group"); done: if (H5I_INVALID_HID != tmp_gcpl && tmp_gcpl != H5P_GROUP_CREATE_DEFAULT) @@ -258,7 +258,7 @@ H5Gopen1(hid_t loc_id, const char *name) /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -266,16 +266,16 @@ H5Gopen1(hid_t loc_id, const char *name) /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the group */ if (NULL == (grp = H5VL_group_open(vol_obj, &loc_params, name, H5P_GROUP_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open group"); /* Get an ID for the group */ if ((ret_value = H5VL_register(H5I_GROUP, grp, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group"); done: if (H5I_INVALID_HID == ret_value) @@ -304,13 +304,13 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* Check arguments */ if (!cur_name || !*cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified"); if (!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(cur_loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Create link */ if (type == H5L_TYPE_HARD) { @@ -325,7 +325,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(cur_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Construct a temporary VOL object */ tmp_vol_obj.data = NULL; @@ -342,7 +342,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* Create the link through the VOL */ if (H5VL_link_create(&vol_cb_args, &tmp_vol_obj, &new_loc_params, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link"); } /* end if */ else if (type == H5L_TYPE_SOFT) { H5VL_object_t *vol_obj; /* Object of loc_id */ @@ -356,7 +356,7 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(cur_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_SOFT; @@ -365,10 +365,10 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* Create the link through the VOL */ if (H5VL_link_create(&vol_cb_args, vol_obj, &loc_params, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link"); } /* end else-if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid link type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid link type"); done: FUNC_LEAVE_API(ret_value) @@ -393,13 +393,13 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_ /* Check arguments */ if (!cur_name || !*cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified"); if (!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(cur_loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Create the appropriate kind of link */ if (type == H5L_TYPE_HARD) { @@ -415,9 +415,9 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_ /* Get the location objects */ if (NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(cur_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(new_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_HARD; @@ -430,7 +430,7 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_ /* Create the link through the VOL */ if (H5VL_link_create(&vol_cb_args, vol_obj2, &new_loc_params, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link"); } /* end if */ else if (type == H5L_TYPE_SOFT) { H5VL_object_t *vol_obj; /* Object of loc_id */ @@ -449,7 +449,7 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_ /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(new_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_SOFT; @@ -458,10 +458,10 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_ /* Create the link through the VOL */ if (H5VL_link_create(&vol_cb_args, vol_obj, &loc_params, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create link"); } /* end else-if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid link type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid link type"); done: FUNC_LEAVE_API(ret_value) @@ -487,7 +487,7 @@ H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name) /* Set up collective metadata if appropriate */ if (H5CX_set_loc(src_loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); loc_params1.type = H5VL_OBJECT_BY_NAME; loc_params1.obj_type = H5I_get_type(src_loc_id); @@ -500,12 +500,12 @@ H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name) /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(src_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Move the link */ if (H5VL_link_move(vol_obj, &loc_params1, NULL, &loc_params2, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "couldn't move link") + HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "couldn't move link"); done: FUNC_LEAVE_API(ret_value) @@ -532,7 +532,7 @@ H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *d /* Set up collective metadata if appropriate */ if (H5CX_set_loc(dst_loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set location parameter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; @@ -549,16 +549,16 @@ H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *d if (H5L_SAME_LOC != src_loc_id) /* get the location object */ if (NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(src_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (H5L_SAME_LOC != dst_loc_id) /* get the location object */ if (NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(dst_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Move the link */ if (H5VL_link_move(vol_obj1, &loc_params1, vol_obj2, &loc_params2, H5P_LINK_CREATE_DEFAULT, H5P_LINK_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "unable to move link") + HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "unable to move link"); done: FUNC_LEAVE_API(ret_value) @@ -584,11 +584,11 @@ H5Gunlink(hid_t loc_id, const char *name) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.obj_type = H5I_get_type(loc_id); @@ -597,14 +597,14 @@ H5Gunlink(hid_t loc_id, const char *name) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_DELETE; /* Delete the link */ if (H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "couldn't delete link") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "couldn't delete link"); done: FUNC_LEAVE_API(ret_value) @@ -631,11 +631,11 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -645,7 +645,7 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_VAL; @@ -654,7 +654,7 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/) /* Get the link value */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get link value") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get link value"); done: FUNC_LEAVE_API(ret_value) @@ -687,11 +687,11 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment) H5TRACE3("e", "i*s*s", loc_id, name, comment); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -701,7 +701,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.set_comment.comment = comment; @@ -711,7 +711,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment) /* Set the comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value"); done: FUNC_LEAVE_API(ret_value) @@ -751,13 +751,13 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf /*out*/ H5TRACE4("Is", "i*szx", loc_id, name, bufsize, buf); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, -1, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, -1, "no name specified"); if (bufsize > 0 && !buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, -1, "no buffer specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, -1, "no buffer specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, -1, "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, -1, "can't set collective metadata read info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -767,7 +767,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf /*out*/ /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_comment.buf = buf; @@ -779,7 +779,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf /*out*/ /* Get the comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, -1, "unable to get comment value") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, -1, "unable to get comment value"); /* Set return value */ ret_value = (int)comment_len; @@ -826,15 +826,15 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, void *o /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_p && *idx_p < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Get the object pointer */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier") + HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier"); /* Set up VOL callback arguments */ grp_opt_args.iterate_old.loc_params.type = H5VL_OBJECT_BY_NAME; @@ -889,19 +889,19 @@ H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs /*out*/) /* Check args */ id_type = H5I_get_type(loc_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group (or file) ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid group (or file) ID"); if (!num_objs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects"); /* Set up VOL callback & object access arguments */ vol_cb_args.op_type = H5VL_GROUP_GET_INFO; if (H5VL_setup_self_args(loc_id, &vol_obj, &vol_cb_args.args.get_info.loc_params) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set object access arguments"); vol_cb_args.args.get_info.ginfo = &grp_info; /* Retrieve the group's information */ if (H5VL_group_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get group info"); /* Set the number of objects [i.e. links] in the group */ *num_objs = grp_info.nlinks; @@ -937,7 +937,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, H5G_stat_t * /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) @@ -1008,9 +1008,9 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, /* (don't need index & heap info) */ 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") + 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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get native object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get native object info"); /* Get mapped object type */ statbuf->type = H5G_map_obj_type(dm_info.type); @@ -1018,7 +1018,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, /* Get object number (i.e. address) for object */ if (H5VL_native_token_to_addr(obj_loc->oloc->file, H5I_FILE, dm_info.token, &obj_addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); statbuf->objno[0] = (unsigned long)(obj_addr); #if H5_SIZEOF_UINT64_T > H5_SIZEOF_LONG @@ -1152,7 +1152,7 @@ H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name /*out*/, size_t size /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, (-1), "can't set collective metadata read info") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, (-1), "can't set collective metadata read info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1165,7 +1165,7 @@ H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name /*out*/, size_t size /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_NAME; @@ -1175,7 +1175,7 @@ H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name /*out*/, size_t size /* Call internal function */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, (-1), "can't get object name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, (-1), "can't get object name"); /* Set the return value */ ret_value = (ssize_t)name_len; @@ -1219,7 +1219,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_GET_INFO; @@ -1228,11 +1228,11 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx) /* Retrieve the object's basic information (which includes its type) */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object info") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object info"); /* Map to group object type */ if (H5G_UNKNOWN == (ret_value = H5G_map_obj_type(oinfo.type))) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Gent.c b/src/H5Gent.c index 4710ff1..02b4c8a 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -84,9 +84,9 @@ H5G__ent_decode_vec(const H5F_t *f, const uint8_t **pp, const uint8_t *p_end, H5 /* decode entries */ for (u = 0; u < n; u++) { if (*pp > p_end) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "ran off the end of the image buffer") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "ran off the end of the image buffer"); if (H5G_ent_decode(f, pp, ent + u, p_end) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode") + HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode"); } done: @@ -120,20 +120,20 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8 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") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds"); /* decode header */ H5F_DECODE_LENGTH(f, *pp, ent->name_off); if (H5_IS_BUFFER_OVERFLOW(*pp, H5F_SIZEOF_ADDR(f) + sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds"); H5F_addr_decode(f, pp, &(ent->header)); UINT32DECODE(*pp, tmp); *pp += 4; /*reserved*/ if (H5_IS_BUFFER_OVERFLOW(*pp, 1, p_end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds"); ent->type = (H5G_cache_type_t)tmp; @@ -145,21 +145,21 @@ H5G_ent_decode(const H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, const uint8 case H5G_CACHED_STAB: 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") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds"); H5F_addr_decode(f, pp, &(ent->cache.stab.btree_addr)); H5F_addr_decode(f, pp, &(ent->cache.stab.heap_addr)); break; case H5G_CACHED_SLINK: if (H5_IS_BUFFER_OVERFLOW(*pp, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds") + HGOTO_ERROR(H5E_FILE, H5E_OVERFLOW, FAIL, "image pointer is out of bounds"); UINT32DECODE(*pp, ent->cache.slink.lval_offset); break; case H5G_CACHED_ERROR: case H5G_NCACHED: default: - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown symbol table entry cache type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown symbol table entry cache type"); } /* end switch */ *pp = p_ret + H5G_SIZEOF_ENTRY_FILE(f); @@ -197,7 +197,7 @@ H5G__ent_encode_vec(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, unsign /* encode entries */ for (u = 0; u < n; u++) if (H5G_ent_encode(f, pp, ent + u) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode") + HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't encode"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -254,7 +254,7 @@ H5G_ent_encode(const H5F_t *f, uint8_t **pp, const H5G_entry_t *ent) case H5G_CACHED_ERROR: case H5G_NCACHED: default: - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown symbol table entry cache type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown symbol table entry cache type"); } /* end switch */ } /* end if */ else { @@ -372,7 +372,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk /* Add the new name to the heap */ if (H5HL_insert(f, heap, HDstrlen(name) + 1, name, &name_offset) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert symbol name into heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert symbol name into heap"); ent->name_off = name_offset; /* Build correct information for symbol table entry based on link type */ @@ -393,13 +393,13 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk /* Build target object location */ if (H5O_loc_reset(&targ_oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location"); targ_oloc.file = f; targ_oloc.addr = lnk->u.hard.addr; /* Check if a symbol table message exists */ 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") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message"); assert(!stab_exists); } /* end else */ @@ -414,19 +414,19 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk /* Build target object location */ if (H5O_loc_reset(&targ_oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location"); targ_oloc.file = f; targ_oloc.addr = lnk->u.hard.addr; /* Get the object header */ if (NULL == (oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, FAIL, "unable to protect target object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, FAIL, "unable to protect target object header"); /* Check if a symbol table message exists */ if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0) { if (H5O_unprotect(&targ_oloc, oh, H5AC__NO_FLAGS_SET) < 0) HERROR(H5E_SYM, H5E_CANTUNPROTECT, "unable to release object header"); - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for STAB message"); } /* end if */ if (stab_exists) { @@ -434,7 +434,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk if (NULL == H5O_msg_read_oh(f, oh, H5O_STAB_ID, &stab)) { if (H5O_unprotect(&targ_oloc, oh, H5AC__NO_FLAGS_SET) < 0) HERROR(H5E_SYM, H5E_CANTUNPROTECT, "unable to release object header"); - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read STAB message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read STAB message"); } /* end if */ /* Cache symbol table message */ @@ -447,7 +447,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk ent->type = H5G_NOTHING_CACHED; if (H5O_unprotect(&targ_oloc, oh, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); } /* end else */ else ent->type = H5G_NOTHING_CACHED; @@ -460,7 +460,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk /* Insert link value into local heap */ if (H5HL_insert(f, heap, HDstrlen(lnk->u.soft.name) + 1, lnk->u.soft.name, &lnk_offset) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap"); ent->type = H5G_CACHED_SLINK; ent->cache.slink.lval_offset = lnk_offset; @@ -470,7 +470,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk case H5L_TYPE_EXTERNAL: case H5L_TYPE_MAX: default: - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type"); } /* end switch */ done: diff --git a/src/H5Gint.c b/src/H5Gint.c index d9716e2..1a9b335 100644 --- a/src/H5Gint.c +++ b/src/H5Gint.c @@ -129,7 +129,7 @@ H5G_init(void) FUNC_ENTER_NOAPI(FAIL) /* Initialize the ID group for the group IDs */ if (H5I_register_type(H5I_GROUP_CLS) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -212,11 +212,11 @@ H5G__close_cb(H5VL_object_t *grp_vol_obj, void **request) /* Close the group */ if (H5VL_group_close(grp_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to close group") + HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to close group"); /* Free the VOL object */ if (H5VL_free_object(grp_vol_obj) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to free VOL object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -260,7 +260,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") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group"); assert(ocrt_info.new_obj); /* Set the return value */ @@ -299,20 +299,20 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info) /* create an open group */ if (NULL == (grp = H5FL_CALLOC(H5G_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Create the group object header */ if (H5G__obj_create(file, gcrt_info, &(grp->oloc) /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header"); oloc_init = 1; /* Indicate that the object location information is valid */ /* Add group to list of open objects in file */ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count") + HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count"); if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects"); /* Set the count of times the object is opened */ grp->shared->fo_count = 1; @@ -376,18 +376,18 @@ H5G__open_name(const H5G_loc_t *loc, const char *name) /* Find the group object */ if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found"); loc_found = TRUE; /* Check that the object found is the correct type */ if (H5O_obj_type(&grp_oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type"); if (obj_type != H5O_TYPE_GROUP) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group"); /* Open the group */ if (NULL == (grp = H5G_open(&grp_loc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group"); /* Set return value */ ret_value = grp; @@ -426,13 +426,13 @@ H5G_open(const H5G_loc_t *loc) /* Allocate the group structure */ if (NULL == (grp = H5FL_CALLOC(H5G_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group"); /* Shallow copy (take ownership) of the group location object */ if (H5O_loc_copy_shallow(&(grp->oloc), loc->oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location"); if (H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path"); /* Check if group was already open */ if ((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) { @@ -442,17 +442,17 @@ H5G_open(const H5G_loc_t *loc) /* Open the group object */ if (H5G__open_oid(grp) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found"); /* Add group to list of open objects in file */ if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) { grp->shared = H5FL_FREE(H5G_shared_t, grp->shared); - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects"); } /* end if */ /* Increment object count for the object in the top file */ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count"); /* Set open object count */ grp->shared->fo_count = 1; @@ -468,12 +468,12 @@ H5G_open(const H5G_loc_t *loc) if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) { /* Open the object through this top file */ if (H5O_open(&(grp->oloc)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header"); } /* end if */ /* Increment object count for the object in the top file */ if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count"); } /* end else */ /* Set return value */ @@ -514,16 +514,16 @@ H5G__open_oid(H5G_t *grp) /* Allocate the shared information for the group */ if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Grab the object header */ if (H5O_open(&(grp->oloc)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group"); obj_opened = TRUE; /* Check if this object has the right message(s) to be treated as a group */ if ((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID) <= 0) && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID) <= 0)) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group"); done: if (ret_value < 0) { @@ -565,25 +565,25 @@ H5G_close(H5G_t *grp) /* Uncork cache entries with object address tag */ if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status"); if (corked) if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__UNCORK, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + HGOTO_ERROR(H5E_SYM, H5E_CANTUNCORK, FAIL, "unable to uncork an object"); /* Remove the group from the list of opened objects in the file */ if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object"); if (H5FO_delete(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects"); if (H5O_close(&(grp->oloc), &file_closed) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close"); /* Evict group metadata if evicting on close */ if (!file_closed && H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) { if (H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata"); if (H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata"); } /* end if */ /* Free memory */ @@ -592,17 +592,17 @@ H5G_close(H5G_t *grp) else { /* Decrement the ref. count for this object in the top file */ if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object"); /* Check reference count for this object in the top file */ if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) { if (H5O_close(&(grp->oloc), NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close"); } /* end if */ else /* Free object location (i.e. "unhold" the file if appropriate) */ if (H5O_loc_free(&(grp->oloc)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location"); /* If this group is a mount point and the mount point is the last open * reference to the group (i.e. fo_count == 1 now), then attempt to @@ -611,13 +611,13 @@ H5G_close(H5G_t *grp) if (grp->shared->mounted && grp->shared->fo_count == 1) { /* Attempt to close down the file hierarchy */ if (H5F_try_close(grp->oloc.file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close"); } /* end if */ } /* end else */ if (H5G_name_free(&(grp->path)) < 0) { grp = H5FL_FREE(H5G_t, grp); - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name"); } /* end if */ grp = H5FL_FREE(H5G_t, grp); @@ -809,7 +809,7 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata) /* Retrieve the info for the link */ if (H5G_link_to_info(udata->link_loc, lnk, &info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link"); /* Make the application callback */ ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data); @@ -853,9 +853,9 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter * we can pass to the application-defined operator. */ if (NULL == (grp = H5G__open_name(loc, group_name))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group"); if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group"); /* Set up user data for callback */ udata.gid = gid; @@ -866,7 +866,7 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter /* Call the real group iteration routine */ if ((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G__iterate_cb, &udata)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links"); done: /* Release the group opened */ @@ -938,7 +938,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Attempt to allocate larger buffer for path */ if (NULL == (new_path = H5MM_realloc(udata->path, len_needed))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string"); udata->path = (char *)new_path; udata->path_buf_size = len_needed; } /* end if */ @@ -950,7 +950,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Construct the link info from the link message */ if (H5G_link_to_info(udata->curr_loc->oloc, lnk, &info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link"); /* Make the application callback */ ret_value = (udata->op)(udata->gid, udata->path, &info, udata->op_data); @@ -967,7 +967,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Find the object using the LAPL passed in */ /* (Correctly handles mounted files) */ if (H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found"); obj_found = TRUE; /* Construct unique "position" for this object */ @@ -981,7 +981,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Get the object's reference count and type */ if (H5O_get_rc_and_type(&obj_oloc, &rc, &otype) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info"); /* If its ref count is > 1, we add it to the list of visited objects */ /* (because it could come up again during traversal) */ @@ -990,7 +990,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Allocate new object "position" node */ if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node"); /* Set node information */ *new_node = obj_pos; @@ -998,7 +998,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Add to list of visited objects */ if (H5SL_insert(udata->visited, new_node, new_node) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, - "can't insert object node into visited list") + "can't insert object node into visited list"); } /* end if */ /* If it's a group, we recurse into it */ @@ -1015,7 +1015,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata) /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(&obj_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { @@ -1104,19 +1104,19 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o /* Check args */ if (!loc) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc parameter cannot be NULL"); /* Open the group to begin visiting within */ if (NULL == (grp = H5G__open_name(loc, group_name))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group"); /* Register an ID for the starting group */ if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group"); /* Get the location of the starting group */ if (H5G_loc(gid, &start_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Set up user data */ udata.gid = gid; @@ -1128,17 +1128,17 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o /* Allocate space for the path name */ if (NULL == (udata.path = H5MM_strdup(""))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer"); udata.path_buf_size = 1; udata.curr_path_len = 0; /* Create skip list to store visited object information */ if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects"); /* Get the group's reference count */ if (H5O_get_rc_and_type(&grp->oloc, &rc, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info"); /* If its ref count is > 1, we add it to the list of visited objects */ /* (because it could come up again during traversal) */ @@ -1147,7 +1147,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o /* Allocate new object "position" node */ if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node"); /* Construct unique "position" for this object */ H5F_GET_FILENO(grp->oloc.file, obj_pos->fileno); @@ -1155,12 +1155,12 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o /* Add to list of visited objects */ if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list"); } /* end if */ /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { @@ -1182,7 +1182,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o /* Call the link iteration routine */ if ((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G__visit_cb, &udata)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links"); done: /* Release user data resources */ @@ -1230,53 +1230,53 @@ H5G_get_create_plist(const H5G_t *grp) /* Copy the default group creation property list */ if (NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list"); if ((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list"); if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list"); /* Retrieve any object creation properties */ if (H5O_get_create_plist(&grp->oloc, new_plist) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info"); /* Check for the group having a group info message */ if ((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header"); if (ginfo_exists) { H5O_ginfo_t ginfo; /* Group info message */ /* Read the group info */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get group info"); /* Set the group info for the property list */ if (H5P_set(new_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info"); } /* end if */ /* Check for the group having a link info message */ if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header"); if (linfo_exists) { /* Set the link info for the property list */ if (H5P_set(new_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link info"); } /* end if */ /* Check for the group having a pipeline message */ if ((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to read object header"); if (pline_exists) { H5O_pline_t pline; /* Pipeline message */ /* Read the pipeline */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get link pipeline") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get link pipeline"); /* Set the pipeline for the property list */ if (H5P_poke(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link pipeline"); } /* end if */ /* Set the return value */ @@ -1323,12 +1323,12 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in /* Find the group object */ if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found"); loc_found = TRUE; /* Retrieve the group's information */ if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); done: /* Clean up */ @@ -1370,12 +1370,12 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id /* Find the object's location, according to the order in the index */ if (H5G_loc_find_by_idx(loc, group_name, idx_type, order, n, &grp_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found"); loc_found = TRUE; /* Retrieve the group's information */ if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); done: /* Clean up */ diff --git a/src/H5Glink.c b/src/H5Glink.c index cea691b..be34877 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -204,18 +204,18 @@ H5G__ent_to_link(H5O_link_t *lnk, const H5HL_t *heap, const H5G_entry_t *ent, co lnk->corder = 0; lnk->corder_valid = FALSE; /* Creation order not valid for this link */ if ((lnk->name = H5MM_xstrdup(name)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate link name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate link name"); /* Object is a symbolic or hard link */ if (ent->type == H5G_CACHED_SLINK) { const char *s; /* Pointer to link value */ if ((s = (const char *)H5HL_offset_into(heap, ent->cache.slink.lval_offset)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get symbolic link name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get symbolic link name"); /* Copy the link value */ if ((lnk->u.soft.name = H5MM_xstrdup(s)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate symbolic link name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to duplicate symbolic link name"); dup_soft = TRUE; @@ -272,7 +272,7 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t * /* Serialize the address into a VOL token */ if (H5VL_native_addr_to_token(link_loc->file, H5I_FILE, lnk->u.hard.addr, &info->u.token) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTSERIALIZE, FAIL, - "can't serialize address into object token") + "can't serialize address into object token"); break; case H5L_TYPE_SOFT: @@ -286,7 +286,7 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t * const H5L_class_t *link_class; /* User-defined link class */ if (lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "unknown link class") + HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "unknown link class"); /* User-defined link; call its query function to get the link udata size. */ /* Get the link class for this type of link. It's okay if the class @@ -304,7 +304,7 @@ H5G_link_to_info(const H5O_loc_t *link_loc, const H5O_link_t *lnk, H5L_info2_t * if ((cb_ret = (link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, NULL, (size_t)0)) < 0) HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, - "query buffer size callback returned failure") + "query buffer size callback returned failure"); info->u.val_size = (size_t)cb_ret; } /* end if */ @@ -345,11 +345,11 @@ H5G__link_to_loc(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t *obj /* Check for unknown library-internal link */ if (lnk->type > H5L_TYPE_BUILTIN_MAX && lnk->type < H5L_TYPE_UD_MIN) - HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "unknown link type") + HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "unknown link type"); /* Build object's group hier. location */ if (H5G_name_set(grp_loc->path, obj_loc->path, lnk->name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name"); /* Set the object location, if it's a hard link set the address also */ obj_loc->oloc->file = grp_loc->oloc->file; @@ -482,7 +482,7 @@ H5G__link_release_table(H5G_link_table_t *ltable) /* Free link message information */ for (u = 0; u < ltable->nlinks; u++) if (H5O_msg_reset(H5O_LINK_ID, &(ltable->lnks[u])) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link message"); /* Free table of links */ H5MM_xfree(ltable->lnks); @@ -519,7 +519,7 @@ H5G__link_name_replace(H5F_t *file, H5RS_str_t *grp_full_path_r, const H5O_link_ if (grp_full_path_r) { obj_path_r = H5G_build_fullpath_refstr_str(grp_full_path_r, lnk->name); if (H5G_name_replace(lnk, H5G_NAME_DELETE, file, obj_path_r, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to replace name") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to replace name"); } done: diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 885fdca..24590d0 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -151,7 +151,7 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) /* Construct a group location for root group of the file */ if (H5G_root_loc(f, loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file"); break; } @@ -159,9 +159,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) H5G_t *group = (H5G_t *)obj; if (NULL == (loc->oloc = H5G_oloc(group))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group"); if (NULL == (loc->path = H5G_nameof(group))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group"); break; } @@ -172,9 +172,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) dt = H5T_get_actual_type((H5T_t *)obj); if (NULL == (loc->oloc = H5T_oloc(dt))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype"); if (NULL == (loc->path = H5T_nameof(dt))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype"); break; } @@ -182,9 +182,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) H5D_t *dset = (H5D_t *)obj; if (NULL == (loc->oloc = H5D_oloc(dset))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset"); if (NULL == (loc->path = H5D_nameof(dset))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset"); break; } @@ -192,48 +192,48 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) H5A_t *attr = (H5A_t *)obj; if (NULL == (loc->oloc = H5A_oloc(attr))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute"); if (NULL == (loc->path = H5A_nameof(attr))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute"); break; } case H5I_DATASPACE: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace"); case H5I_MAP: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maps not supported in native VOL connector"); case H5I_GENPROP_CLS: case H5I_GENPROP_LST: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of property list"); case H5I_ERROR_CLASS: case H5I_ERROR_MSG: case H5I_ERROR_STACK: HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to get group location of error class, message or stack") + "unable to get group location of error class, message or stack"); case H5I_VFL: HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to get group location of a virtual file driver (VFD)") + "unable to get group location of a virtual file driver (VFD)"); case H5I_VOL: HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to get group location of a virtual object layer (VOL) connector") + "unable to get group location of a virtual object layer (VOL) connector"); case H5I_SPACE_SEL_ITER: HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unable to get group location of a dataspace selection iterator") + "unable to get group location of a dataspace selection iterator"); case H5I_EVENTSET: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a event set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a event set"); case H5I_UNINIT: case H5I_BADID: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid location ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid location ID"); } /* end switch */ done: @@ -259,11 +259,11 @@ H5G_loc(hid_t loc_id, H5G_loc_t *loc) /* Get the object from the VOL */ if (NULL == (obj = H5VL_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Fill in the struct */ if (H5G_loc_real(obj, H5I_get_type(loc_id), loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to fill in location struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to fill in location struct"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -291,9 +291,9 @@ H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth) /* Copy components of the location */ if (H5O_loc_copy(dst->oloc, src->oloc, depth) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy entry"); if (H5G_name_copy(dst->path, src->path, depth) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy path") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -320,9 +320,9 @@ H5G_loc_reset(H5G_loc_t *loc) /* Reset components of the location */ if (H5O_loc_reset(loc->oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset entry"); if (H5G_name_reset(loc->path) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset path") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -349,9 +349,9 @@ H5G_loc_free(H5G_loc_t *loc) /* Reset components of the location */ if (H5G_name_free(loc->path) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free path") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free path"); if (H5O_loc_free(loc->oloc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to free object header location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to free object header location"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -378,7 +378,7 @@ H5G__loc_find_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, /* Check if the name in this group resolved to a valid object */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object '%s' doesn't exist", name) + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object '%s' doesn't exist", name); /* Take ownership of the object's group location */ /* (Group traversal callbacks are responsible for either taking ownership @@ -418,7 +418,7 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/) /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_find_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -450,23 +450,23 @@ H5G__loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Query link */ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found"); lnk_copied = TRUE; /* Build the initial object location for the link */ if (H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location"); obj_loc_valid = TRUE; /* Perform any special traversals that the link needs */ /* (soft links, user-defined links, file mounting, etc.) */ /* (may modify the object location) */ if (H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, TRUE, udata->loc, &obj_exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed") + HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed"); done: /* Reset the link information, if we have a copy */ @@ -516,7 +516,7 @@ H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, group_name, H5G_TARGET_NORMAL, H5G__loc_find_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -554,11 +554,11 @@ H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t o /* Insert new group into current group's symbol table */ if (H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object"); /* Set the name of the object location */ if (H5G_name_set(grp_loc->path, obj_loc->path, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -588,7 +588,7 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_ if (lnk) *exists = FALSE; else - HGOTO_ERROR(H5E_SYM, H5E_INTERNAL, FAIL, "no object or link info?") + HGOTO_ERROR(H5E_SYM, H5E_INTERNAL, FAIL, "no object or link info?"); else *exists = TRUE; @@ -624,7 +624,7 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists) /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G__loc_exists_cb, exists) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -651,7 +651,7 @@ H5G__loc_addr_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Set address of object */ *udata = obj_loc->oloc->addr; @@ -688,7 +688,7 @@ H5G__loc_addr(const H5G_loc_t *loc, const char *name, haddr_t *addr /*out*/) /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_addr_cb, addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -715,11 +715,11 @@ H5G__loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Query object information */ if (H5O_get_info(obj_loc->oloc, udata->oinfo, udata->fields) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info"); done: /* Indicate that this callback didn't take ownership of the group * @@ -758,7 +758,7 @@ H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info2_t *oinfo /*out*/, /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_info_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -785,11 +785,11 @@ H5G__loc_native_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Query object information */ if (H5O_get_native_info(obj_loc->oloc, udata->oinfo, udata->fields) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info"); done: /* Indicate that this callback didn't take ownership of the group * @@ -828,7 +828,7 @@ H5G_loc_native_info(const H5G_loc_t *loc, const char *name, H5O_native_info_t *o /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_native_info_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -857,24 +857,24 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Check for existing comment message */ if ((exists = H5O_msg_exists(obj_loc->oloc, H5O_NAME_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header"); /* Remove the previous comment message if any */ if (exists) if (H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, TRUE) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, - "unable to delete existing comment object header message") + "unable to delete existing comment object header message"); /* Add the new message */ if (udata->comment && *udata->comment) { if (NULL == (comment.s = HDstrdup(udata->comment))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment"); if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message"); } /* end if */ done: @@ -914,7 +914,7 @@ H5G_loc_set_comment(const H5G_loc_t *loc, const char *name, const char *comment) /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_set_comment_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -942,7 +942,7 @@ H5G__loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Query object comment */ comment.s = NULL; @@ -997,7 +997,7 @@ H5G_loc_get_comment(const H5G_loc_t *loc, const char *name, char *comment /*out* /* Traverse group hierarchy to locate object */ if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_get_comment_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object"); /* Set value to return */ if (comment_len) diff --git a/src/H5Gname.c b/src/H5Gname.c index 92957c0..2d7d855 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -147,7 +147,7 @@ H5G_normalize(const char *name) /* Duplicate the name, to return */ if (NULL == (norm = H5MM_strdup(name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for normalized string"); /* Walk through the characters, omitting duplicated '/'s */ s = d = 0; @@ -265,7 +265,7 @@ H5G__build_fullpath(const char *prefix, const char *name) /* Create full path */ if (NULL == (ret_value = H5RS_create(prefix))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, NULL, "can't create ref-counted string") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, NULL, "can't create ref-counted string"); if (prefix[HDstrlen(prefix) - 1] != '/') H5RS_aputc(ret_value, '/'); /* Add separator, if the prefix doesn't end in one */ H5RS_acat(ret_value, name); @@ -361,14 +361,14 @@ H5G_name_set(const H5G_name_t *loc, H5G_name_t *obj, const char *name) if (loc->full_path_r) { /* Go build the new full path */ if ((obj->full_path_r = H5G_build_fullpath_refstr_str(loc->full_path_r, name)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name") + HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name"); } /* end if */ /* Create the object's user path, if a user path exists in the location */ if (loc->user_path_r) { /* Go build the new user path */ if ((obj->user_path_r = H5G_build_fullpath_refstr_str(loc->user_path_r, name)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name") + HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name"); } /* end if */ done: @@ -472,7 +472,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name /*out*/, size_t size, size_t *name else if (!loc->path->obj_hidden) { /* Search for name of object */ if (H5G_get_name_by_addr(loc->oloc->file, loc->oloc, name, size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name"); /* Indicate that the name is _not_ cached, if requested */ /* (Currently only used for testing - QAK, 2010/07/26) */ @@ -607,7 +607,7 @@ H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char /* Allocate new ref-counted string */ if (NULL == (rs = H5RS_create(NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string"); /* Create the new path */ if (path_prefix2_len > 0) @@ -672,7 +672,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) break; case H5I_MAP: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -690,7 +690,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object"); } /* end switch */ assert(oloc); assert(obj_path); @@ -744,7 +744,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) /* Create new full path */ if (NULL == (rs = H5RS_create(src_path))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string"); H5RS_acat(rs, full_path); /* Release previous full path */ @@ -785,7 +785,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) /* Create new full path suffix */ if (NULL == (rs = H5RS_create(full_suffix))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string"); /* Release previous full path */ H5RS_decr(obj_path->full_path_r); @@ -853,11 +853,11 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) /* Update the user path, if one exists */ if (obj_path->user_path_r) if (H5G__name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0) - HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name") + HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name"); /* Create new full path */ if (NULL == (rs = H5RS_create(dst_path))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create ref-counted string"); H5RS_acat(rs, full_suffix); /* Release previous full path */ @@ -869,7 +869,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid operation"); } /* end switch */ done: @@ -921,7 +921,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS /* Get the type of the object */ if (H5O_obj_type(&tmp_oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type"); /* Determine which type of objects to operate on */ switch (obj_type) { @@ -942,13 +942,13 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS case H5O_TYPE_MAP: HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, - "maps not supported in native VOL connector") + "maps not supported in native VOL connector"); case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: /* Search and replace names through datatype IDs */ default: - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not valid object type") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not valid object type"); } /* end switch */ } /* end case */ break; @@ -964,7 +964,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS default: /* User-defined link */ /* Check for unknown library-defined link type */ if (lnk->type < H5L_TYPE_UD_MIN) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown link type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unknown link type"); /* User-defined & external links automatically wipe out * names (because it would be too much work to track them), @@ -996,17 +996,17 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file, H5RS /* Search through group IDs */ if (search_group) if (H5I_iterate(H5I_GROUP, H5G__name_replace_cb, &names, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups"); /* Search through dataset IDs */ if (search_dataset) if (H5I_iterate(H5I_DATASET, H5G__name_replace_cb, &names, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets"); /* Search through datatype IDs */ if (search_datatype) if (H5I_iterate(H5I_DATATYPE, H5G__name_replace_cb, &names, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes"); } /* end if */ } /* end if */ @@ -1049,14 +1049,14 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo, /* Retrieve hard link address from VOL token */ if (H5VL_native_token_to_addr(udata->loc->file, H5I_FILE, linfo->u.token, &link_addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token into address") + HGOTO_ERROR(H5E_SYM, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token into address"); if (udata->loc->addr == link_addr) { H5G_loc_t grp_loc; /* Location of group */ /* Get group's location */ if (H5G_loc(gid, &grp_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "bad group location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "bad group location"); /* Set up opened object location to fill in */ obj_loc.oloc = &obj_oloc; @@ -1065,14 +1065,14 @@ H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo, /* Find the object */ if (H5G_loc_find(&grp_loc, path, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found"); obj_found = TRUE; /* Check for object in same file (handles mounted files) */ /* (re-verify address, in case we traversed a file mount) */ if (udata->loc->addr == obj_loc.oloc->addr && udata->loc->file == obj_loc.oloc->file) { if (NULL == (udata->path = H5MM_strdup(path))) - HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, H5_ITER_ERROR, "can't duplicate path string") + HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, H5_ITER_ERROR, "can't duplicate path string"); /* We found a match so we return immediately */ HGOTO_DONE(H5_ITER_STOP); @@ -1117,12 +1117,12 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si /* Construct a group location for root group of the file */ if (H5G_root_loc(f, &root_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get root group's location") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get root group's location"); /* Check for root group being the object looked for */ if (root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) { if (NULL == (udata.path = H5MM_strdup(""))) - HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string") + HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string"); found_obj = TRUE; } /* end if */ else { @@ -1133,7 +1133,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size, si /* Visit all the links in the file */ if ((status = H5G_visit(&root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G__get_name_by_addr_cb, &udata)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name"); else if (status > 0) found_obj = TRUE; } /* end else */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 9e55e0f..bff0ae6 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -288,15 +288,15 @@ H5G__node_create(H5F_t *f, H5B_ins_t H5_ATTR_UNUSED op, void *_lt_key, void H5_A assert(H5B_INS_FIRST == op); if (NULL == (sym = H5FL_CALLOC(H5G_node_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); sym->node_size = H5G_NODE_SIZE(f); if (HADDR_UNDEF == (*addr_p = H5MF_alloc(f, H5FD_MEM_BTREE, (hsize_t)sym->node_size))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to allocate file space"); if (NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) - HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed"); if (H5AC_insert_entry(f, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node"); /* * The left and right symbols in an empty tree are both the * empty string stored at offset zero by the H5G functions. This @@ -355,9 +355,9 @@ H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key) /* Get pointers to string names */ if ((s1 = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name"); if ((s2 = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name"); /* Set return value */ ret_value = HDstrcmp(s1, s2); @@ -405,13 +405,13 @@ H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key) /* left side */ if ((s = (const char *)H5HL_offset_into(udata->heap, lt_key->offset)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name"); if (HDstrcmp(udata->name, s) <= 0) ret_value = (-1); else { /* right side */ if ((s = (const char *)H5HL_offset_into(udata->heap, rt_key->offset)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get key name"); if (HDstrcmp(udata->name, s) > 0) ret_value = 1; } /* end else */ @@ -465,7 +465,7 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo * Load the symbol table node for exclusive access. */ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table node"); /* * Binary search. @@ -475,7 +475,7 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo idx = (lt + rt) / 2; if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name"); cmp = HDstrcmp(udata->common.name, s); if (cmp < 0) @@ -492,7 +492,7 @@ H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key, hboo /* Call user's callback operator */ if ((udata->op)(&sn->entry[idx], udata->op_data) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "iterator callback failed") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "iterator callback failed"); } /* end else */ done: @@ -562,7 +562,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H * Load the symbol node. */ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node"); /* * Where does the new symbol get inserted? We use a binary search. @@ -571,11 +571,11 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H while (lt < rt) { idx = (int)((lt + rt) / 2); if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name"); /* Check if symbol is already present */ if (0 == (cmp = HDstrcmp(udata->common.name, s))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR, "symbol is already present in symbol table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR, "symbol is already present in symbol table"); if (cmp < 0) rt = (unsigned)idx; @@ -587,7 +587,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H /* Convert link information & name to symbol table entry */ if (H5G__ent_convert(f, udata->common.heap, udata->common.name, udata->lnk, udata->obj_type, udata->crt_info, &ent) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link") + HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5B_INS_ERROR, "unable to convert link"); /* Determine where to place entry in node */ if (sn->nsyms >= 2 * H5F_SYM_LEAF_K(f)) { @@ -600,10 +600,10 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key, hbool_t H /* The right node */ if (H5G__node_create(f, H5B_INS_FIRST, NULL, NULL, NULL, new_node_p /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to split symbol table node"); if (NULL == (snrt = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, *new_node_p, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node"); H5MM_memcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f), H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t)); snrt->nsyms = H5F_SYM_LEAF_K(f); @@ -712,7 +712,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i /* Load the symbol table */ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to protect symbol table node"); /* "Normal" removal of a single entry from the symbol table node */ if (udata->common.name != NULL) { @@ -726,7 +726,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i idx = (lt + rt) / 2; if ((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name"); cmp = HDstrcmp(udata->common.name, s); if (cmp < 0) rt = idx; @@ -735,11 +735,11 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i } /* end while */ if (cmp) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5B_INS_ERROR, "name not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5B_INS_ERROR, "name not found"); /* Get a pointer to the name of the link */ if (NULL == (lnk.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off))) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name"); link_name_len = HDstrlen(lnk.name) + 1; /* Set up rest of link structure */ @@ -750,7 +750,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i lnk.type = H5L_TYPE_SOFT; if (NULL == (lnk.u.soft.name = (char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].cache.slink.lval_offset))) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get link name"); } /* end if */ else { lnk.type = H5L_TYPE_HARD; @@ -760,7 +760,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i /* Replace any object names */ if (H5G__link_name_replace(f, udata->grp_full_path_r, &lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get object type") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get object type"); /* Decrement the ref. count for hard links */ if (lnk.type == H5L_TYPE_HARD) { @@ -771,7 +771,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i tmp_oloc.addr = lnk.u.hard.addr; if (H5O_link(&tmp_oloc, -1) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to decrement object link count") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5B_INS_ERROR, "unable to decrement object link count"); } /* end if */ else { /* Remove the soft link's value from the local heap */ @@ -782,13 +782,13 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i if (H5HL_remove(f, udata->common.heap, sn->entry[idx].cache.slink.lval_offset, soft_link_len) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, - "unable to remove soft link from local heap") + "unable to remove soft link from local heap"); } /* end if */ } /* end else */ /* Remove the link's name from the local heap */ if (H5HL_remove(f, udata->common.heap, sn->entry[idx].name_off, link_name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, "unable to remove link name from local heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, "unable to remove link name from local heap"); /* Remove the entry from the symbol table node */ if (1 == sn->nsyms) { @@ -852,7 +852,7 @@ H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key /*i if (H5O_link(&tmp_oloc, -1) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, H5B_INS_ERROR, - "unable to decrement object link count") + "unable to decrement object link count"); } /* end if */ } /* end for */ @@ -903,7 +903,7 @@ H5G__node_iterate(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, /* 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))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* * Iterate over the symbol table node entries. @@ -917,19 +917,19 @@ H5G__node_iterate(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, /* Get the pointer to the name of the link in the heap */ if ((name = (const char *)H5HL_offset_into(udata->heap, ents[u].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table node name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table node name"); /* Convert the entry to a link */ if (H5G__ent_to_link(&lnk, udata->heap, &ents[u], name) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, - "unable to convert symbol table entry to link") + "unable to convert symbol table entry to link"); /* Make the callback */ ret_value = (udata->op)(&lnk, udata->op_data); /* Release memory for link object */ if (H5O_msg_reset(H5O_LINK_ID, &lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, H5_ITER_ERROR, "unable to release link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, H5_ITER_ERROR, "unable to release link message"); } /* end else */ /* Increment the number of entries passed through */ @@ -977,7 +977,7 @@ H5G__node_sumup(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, /* 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))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); *num_objs += sn->nsyms; @@ -1030,7 +1030,7 @@ H5G__node_by_idx(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, /* Call 'by index' callback */ 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") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "'by index' callback failed"); /* Indicate that we found the entry we are interested in */ ret_value = H5_ITER_STOP; @@ -1073,14 +1073,14 @@ H5G__node_init(H5F_t *f) /* Allocate & initialize global info for the shared structure */ if (NULL == (shared = H5B_shared_new(f, H5B_SNODE, sizeof_rkey))) - HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info") + HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed for shared B-tree info"); /* Set up the "local" information for this file's groups */ /* */ /* Make shared B-tree info reference counted */ if (H5F_SET_GRP_BTREE_SHARED(f, H5UC_create(shared, H5B_shared_free)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create ref-count wrapper for shared B-tree info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1144,11 +1144,11 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* 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))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* get the base address of the heap */ if (NULL == (heap = H5HL_protect(f, udata->src_heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to protect symbol name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to protect symbol name"); /* copy object in this node one by one */ for (i = 0; i < sn->nsyms; i++) { @@ -1180,7 +1180,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* Get pointer to link value in local heap */ if ((link_name = (char *)H5HL_offset_into(heap, tmp_src_ent.cache.slink.lval_offset)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name"); /* Check if the object pointed by the soft link exists in the source file */ if (H5G__loc_addr(&grp_loc, link_name, &obj_addr) >= 0) { @@ -1208,7 +1208,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* Copy the shared object from source to destination */ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, TRUE, &obj_type, (void **)&cpy_udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy object"); /* Set up object creation info for symbol table insertion. Only * case so far is for inserting old-style groups (for caching stab @@ -1231,7 +1231,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* Construct link information for eventual insertion */ lnk.type = H5L_TYPE_SOFT; if ((lnk.u.soft.name = (char *)H5HL_offset_into(heap, src_ent->cache.slink.lval_offset)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get link name"); } /* else if */ else assert(0 && "Unknown entry type"); @@ -1244,7 +1244,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const /* Determine name of source object */ if ((name = (const char *)H5HL_offset_into(heap, src_ent->name_off)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name"); /* Set copied metadata tag */ H5_BEGIN_TAG(H5AC__COPIED_TAG) @@ -1302,7 +1302,7 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr * because we're about to call an application function. */ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* Check if the link table needs to be extended */ if ((udata->ltable->nlinks + sn->nsyms) >= udata->alloc_nlinks) { @@ -1312,7 +1312,7 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr /* Re-allocate the link table */ if (NULL == (x = (H5O_link_t *)H5MM_realloc(udata->ltable->lnks, sizeof(H5O_link_t) * na))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed"); udata->ltable->lnks = x; } /* end if */ @@ -1323,7 +1323,7 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr /* Get pointer to link's name in the heap */ if ((name = (const char *)H5HL_offset_into(udata->heap, sn->entry[u].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get symbol table link name"); /* Determine the link to operate on in the table */ linkno = udata->ltable->nlinks++; @@ -1331,7 +1331,7 @@ H5G__node_build_table(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr /* Convert the entry to a link */ if (H5G__ent_to_link(&udata->ltable->lnks[linkno], udata->heap, &sn->entry[u], name) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, H5_ITER_ERROR, - "unable to convert symbol table entry to link") + "unable to convert symbol table entry to link"); } /* end for */ done: @@ -1401,7 +1401,7 @@ H5G_node_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, had /* Pin the heap down in memory */ if (heap_addr > 0 && H5_addr_defined(heap_addr)) if (NULL == (heap = H5HL_protect(f, heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to protect symbol table heap"); /* * If we couldn't load the symbol table node, then try loading the diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 963a4ff..6878e51 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -120,23 +120,23 @@ H5G__obj_create(H5F_t *f, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/) /* Get the property list */ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id))) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a property list"); /* Get the group info property */ if (H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Get the link info property */ if (H5P_get(gc_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Get the pipeline property */ if (H5P_peek(gc_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Call the "real" group creation routine now */ if (H5G__obj_create_real(f, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -173,7 +173,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file"); /* Check for using the latest version of the group format which is introduced in v18 */ /* (add more checks for creating "new format" groups when needed) */ @@ -186,7 +186,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf * going to be built on it. */ if (linfo->index_corder && !linfo->track_corder) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it"); /* Check if we should be using the latest version of the group format */ if (use_at_least_v18) { @@ -229,23 +229,23 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf * incremented if the object is added to the group directed graph. */ if (H5O_create(f, hdr_size, (size_t)1, gcpl_id, oloc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header"); /* Check for format of group to create */ if (use_at_least_v18) { H5_GCC_CLANG_DIAG_OFF("cast-qual") /* Insert link info message */ if (H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert group info message */ if (H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert pipeline message */ if (pline && pline->nused) if (H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else { @@ -253,7 +253,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf /* The group doesn't currently have a 'stab' message, go create one */ if (H5G__stab_create(oloc, ginfo, &stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table"); /* Cache the symbol table information */ gcrt_info->cache_type = H5G_CACHED_STAB; @@ -290,11 +290,11 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo) /* Check for the group having a link info message */ if ((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (ret_value) { /* Retrieve the "link info" structure */ if (NULL == H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "link info message not present") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "link info message not present"); /* Check if we don't know how many links there are */ if (linfo->nlinks == HSIZET_MAX) { @@ -302,17 +302,17 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo) if (H5_addr_defined(linfo->fheap_addr)) { /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(grp_oloc->file, linfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Retrieve # of records in "name" B-tree */ /* (should be same # of records in all indices) */ if (H5B2_get_nrec(bt2_name, &linfo->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of records in index") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of records in index"); } /* end if */ else { /* Retrieve # of links from object header */ if (H5O_get_nlinks(grp_oloc, &linfo->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of links for object") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of links for object"); } /* end if */ } /* end if */ } /* end if */ @@ -350,7 +350,7 @@ H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi /* Insert link into dense link storage */ if (H5G__dense_insert(udata->f, udata->linfo, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -381,7 +381,7 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata) /* Insert link into group */ H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE, H5O_TYPE_UNKNOWN, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group"); H5_GCC_CLANG_DIAG_ON("cast-qual") done: @@ -423,7 +423,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *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) */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { H5O_ginfo_t ginfo; /* Group info message */ size_t link_msg_size; /* Size of new link message in the file */ @@ -443,11 +443,11 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Get the link's message size */ if ((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size"); /* Get the group info */ if (NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info"); /* If there's still a small enough number of links, use the 'link' message */ /* (If the encoded form of the link is too large to fit into an object @@ -464,16 +464,16 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Get the pipeline message, if it exists */ if ((pline_exists = H5O_msg_exists(grp_oloc, H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (pline_exists) { if (NULL == H5O_msg_read(grp_oloc, H5O_PLINE_ID, &tmp_pline)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline"); pline = &tmp_pline; } /* end if */ /* The group doesn't currently have "dense" storage for links */ if (H5G__dense_create(grp_oloc->file, &linfo, pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group"); /* Set up user data for object header message iteration */ udata.f = grp_oloc->file; @@ -484,11 +484,11 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, op.op_type = H5O_MESG_OP_APP; op.u.app_op = H5G__obj_compact_to_dense_cb; if (H5O_msg_iterate(grp_oloc, H5O_LINK_ID, &op, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links"); /* Remove all the 'link' messages */ if (H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages"); use_new_dense = TRUE; } /* end else */ @@ -504,12 +504,12 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Insert link info message */ if (H5O_msg_create(grp_oloc, H5O_LINFO_ID, 0, 0, &new_linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert group info message */ if (H5O_msg_create(grp_oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, H5O_UPDATE_TIME, &new_ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Set up user data for iteration */ udata.grp_oloc = grp_oloc; @@ -517,18 +517,18 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Iterate through all links in "old format" group and insert them into new format */ if (H5G__stab_iterate(grp_oloc, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G__obj_stab_to_new_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links"); /* Remove the symbol table message from the group */ if (H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage"); /* Recursively call this routine to insert the new link, since the * group is in the "new format" now and the link info should be * set up, etc. */ if (H5G_obj_insert(grp_oloc, name, obj_lnk, adj_link, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into group"); /* Done with insertion now */ HGOTO_DONE(SUCCEED); @@ -541,18 +541,18 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, if (use_old_format) { /* Insert into symbol table */ if (H5G__stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table"); } /* end if */ else { if (use_new_dense) { /* Insert into dense link storage */ if (H5G__dense_insert(grp_oloc->file, &linfo, obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage"); } /* end if */ else { /* Insert with link message */ if (H5G__compact_insert(grp_oloc, obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message"); } /* end else */ } /* end else */ @@ -560,7 +560,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, if (!use_old_format) { linfo.nlinks++; if (H5O_msg_write(grp_oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, &linfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message"); } /* end if */ /* Increment link count on object, if requested and it's a hard link */ @@ -574,7 +574,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Increment reference count for object */ if (H5O_link(&obj_oloc, 1) < 0) - HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "unable to increment hard link count") + HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "unable to increment hard link count"); } /* end if */ done: @@ -613,40 +613,40 @@ H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for going out of bounds */ if (skip > 0 && (size_t)skip >= linfo.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ if (H5_addr_defined(linfo.fheap_addr)) { /* Iterate over the links in the group, building a table of the link messages */ if ((ret_value = H5G__dense_iterate(grp_oloc->file, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links"); } /* end if */ else { /* Get the object's name from the link messages */ if ((ret_value = H5G__compact_iterate(grp_oloc, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Iterate over symbol table */ if ((ret_value = H5G__stab_iterate(grp_oloc, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table"); } /* end else */ done: @@ -686,18 +686,18 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info) /* Deep copy (duplicate) of the group location object */ if (H5O_loc_copy_deep(&grp_oloc, oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location"); /* Open the group */ if (NULL == (grp = H5G_open(&grp_loc))) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found"); /* Get information from the group */ grp_info->mounted = H5G_MOUNTED(grp); /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Retrieve the information about the links */ grp_info->nlinks = linfo.nlinks; @@ -712,7 +712,7 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info) else { /* Get the number of objects in this group by iterating over symbol table */ if (H5G__stab_count(oloc, &grp_info->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects"); /* Set the other information about the group */ grp_info->storage_type = H5G_STORAGE_TYPE_SYMBOL_TABLE; @@ -752,35 +752,35 @@ H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, H5_iter_orde /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the object's name from the dense link storage */ if (H5G__dense_get_name_by_idx(oloc->file, &linfo, idx_type, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end if */ else { /* Get the object's name from the link messages */ if (H5G__compact_get_name_by_idx(oloc, &linfo, idx_type, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Get the object's name from the symbol table */ if (H5G__stab_get_name_by_idx(oloc, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end else */ done: @@ -821,7 +821,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) if (linfo->nlinks == 0) { /* Delete the dense storage */ if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage"); } /* end if */ /* Check for switching back to compact storage */ else { @@ -829,7 +829,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) /* Get the group info */ if (NULL == H5O_msg_read(oloc, H5O_GINFO_ID, &ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info"); /* Check if we should switch from dense storage back to link messages */ if (linfo->nlinks < ginfo.min_dense) { @@ -840,11 +840,11 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) /* Build the table of links for this group */ if (H5G__dense_build_table(oloc->file, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links"); /* Pin the object header */ if (NULL == (oh = H5O_pin(oloc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header"); /* Inspect links in table for ones that can't be converted back * into link message form (currently only links which can't fit @@ -868,28 +868,28 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header"); - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); } /* end if */ /* Remove the dense storage */ if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage"); } /* end if */ /* Release object header */ if (H5O_unpin(oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header"); /* Free link table information */ if (H5G__link_release_table(<able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table") + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table"); } /* end if */ } /* end else */ } /* end if */ /* Update link info in the object header */ if (H5O_msg_write(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, linfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -921,7 +921,7 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Using the new format for groups */ use_old_format = FALSE; @@ -930,12 +930,12 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n if (H5_addr_defined(linfo.fheap_addr)) { /* Remove object from the dense link storage */ if (H5G__dense_remove(oloc->file, &linfo, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else /* Remove object from the link messages */ if (H5G__compact_remove(oloc, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else { /* Using the old format for groups */ @@ -943,13 +943,13 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n /* Remove object from the symbol table */ if (H5G__stab_remove(oloc, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ /* Update link info for a new-style group */ if (!use_old_format) if (H5G__obj_remove_update_linfo(oloc, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info") + HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -981,13 +981,13 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5 /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ /* Using the new format for groups */ @@ -997,31 +997,31 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5 if (H5_addr_defined(linfo.fheap_addr)) { /* Remove object from the dense link storage */ if (H5G__dense_remove_by_idx(grp_oloc->file, &linfo, grp_full_path_r, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else { /* Remove object from compact link storage */ if (H5G__compact_remove_by_idx(grp_oloc, &linfo, grp_full_path_r, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Using the old format for groups */ use_old_format = TRUE; /* Remove object from the symbol table */ if (H5G__stab_remove_by_idx(grp_oloc, grp_full_path_r, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ /* Update link info for a new-style group */ if (!use_old_format) if (H5G__obj_remove_update_linfo(grp_oloc, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info") + HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1051,24 +1051,24 @@ H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O /* Attempt to get the link info message for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the object's info from the dense link storage */ if (H5G__dense_lookup(grp_oloc->file, &linfo, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end if */ else { /* Get the object's info from the link messages */ if (H5G__compact_lookup(grp_oloc, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ } /* end if */ else /* Get the object's info from the symbol table */ if (H5G__stab_lookup(grp_oloc, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -1099,35 +1099,35 @@ H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_or /* Attempt to get the link info message for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the link from the dense storage */ if (H5G__dense_lookup_by_idx(grp_oloc->file, &linfo, idx_type, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end if */ else { /* Get the link from the link messages */ if (H5G__compact_lookup_by_idx(grp_oloc, &linfo, idx_type, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Get the object's info from the symbol table */ if (H5G__stab_lookup_by_idx(grp_oloc, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ done: diff --git a/src/H5Goh.c b/src/H5Goh.c index 8daf0fd..6083617 100644 --- a/src/H5Goh.c +++ b/src/H5Goh.c @@ -99,7 +99,7 @@ H5O__group_get_copy_file_udata(void) * Currently this is only a ginfo, so there is no specific struct type for * this operation. */ if (NULL == (ret_value = H5FL_CALLOC(H5G_copy_file_ud_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -161,9 +161,9 @@ H5O__group_isa(const H5O_t *oh) /* Check for any of the messages that indicate a group */ if ((stab_exists = H5O_msg_exists_oh(oh, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header"); if ((linfo_exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header"); ret_value = (stab_exists > 0 || linfo_exists > 0); @@ -195,7 +195,7 @@ H5O__group_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* Open the group */ if (NULL == (grp = H5G_open(obj_loc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group"); ret_value = (void *)grp; @@ -233,13 +233,13 @@ H5O__group_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc) /* Create the group */ if (NULL == (grp = H5G__create(f, crt_info))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group"); /* Set up the new group's location */ if (NULL == (obj_loc->oloc = H5G_oloc(grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of group"); if (NULL == (obj_loc->path = H5G_nameof(grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of group"); /* Set the return value */ ret_value = grp; @@ -272,11 +272,11 @@ H5O__group_get_oloc(hid_t obj_id) /* Get the group */ if (NULL == (grp = (H5G_t *)H5VL_object(obj_id))) - HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID") + HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID"); /* Get the group's object header location */ if (NULL == (ret_value = H5G_oloc(grp))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -312,23 +312,23 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Check for "new style" group info */ if ((exists = H5O_msg_exists_oh(oh, H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header"); if (exists > 0) { H5O_linfo_t linfo; /* Link info message */ /* Get "new style" group info */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_LINFO_ID, &linfo)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't read LINFO message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't read LINFO message"); /* Check if name index available */ if (H5_addr_defined(linfo.name_bt2_addr)) { /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(loc->file, linfo.name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Get name index B-tree size */ if (H5B2_size(bt2_name, &bh_info->index_size) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info for name index"); } /* end if */ /* Check if creation order index available */ @@ -336,23 +336,23 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Open the creation order index v2 B-tree */ if (NULL == (bt2_corder = H5B2_open(loc->file, linfo.corder_bt2_addr, NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for creation order index") + "unable to open v2 B-tree for creation order index"); /* Get creation order index B-tree size */ if (H5B2_size(bt2_corder, &bh_info->index_size) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, - "can't retrieve B-tree storage info for creation order index") + "can't retrieve B-tree storage info for creation order index"); } /* end if */ /* Get fractal heap size, if available */ if (H5_addr_defined(linfo.fheap_addr)) { /* Open the fractal heap for links */ if (NULL == (fheap = H5HF_open(loc->file, linfo.fheap_addr))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Get heap storage size */ if (H5HF_size(fheap, &bh_info->heap_size) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info"); } /* end if */ } /* end if */ else { @@ -360,11 +360,11 @@ H5O__group_bh_info(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info) /* Must be "old style" group, get symbol table message */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages"); /* Get symbol table size info */ if (H5G__stab_bh_size(loc->file, &stab, bh_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve symbol table size info"); } /* end else */ done: diff --git a/src/H5Groot.c b/src/H5Groot.c index 8346fc4..7f5b956 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -144,16 +144,16 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) /* Create information needed for group nodes */ if (H5G__node_init(f) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group node info"); /* * Create the group pointer */ if (NULL == (f->shared->root_grp = H5FL_CALLOC(H5G_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (NULL == (f->shared->root_grp->shared = H5FL_CALLOC(H5G_shared_t))) { f->shared->root_grp = H5FL_FREE(H5G_t, f->shared->root_grp); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end if */ /* Initialize the root_loc structure to point to fields in the newly created @@ -172,14 +172,14 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) gcrt_info.gcpl_id = f->shared->fcpl_id; gcrt_info.cache_type = H5G_NOTHING_CACHED; if (H5G__obj_create(f, &gcrt_info, root_loc.oloc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry"); if (1 != H5O_link(root_loc.oloc, 1)) - HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)") + HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)"); /* Decrement refcount on root group's object header in memory */ if (H5O_dec_rc_by_loc(root_loc.oloc) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, - "unable to decrement refcount on root group's object header") + "unable to decrement refcount on root group's object header"); /* Mark superblock dirty, so root group info is flushed */ sblock_dirty = TRUE; @@ -189,7 +189,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) 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)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry"); /* Initialize the root group symbol table entry */ f->shared->sblock->root_ent->type = gcrt_info.cache_type; @@ -208,7 +208,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * Open the root object as a group. */ if (H5O_open(root_loc.oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open root group"); /* Actions to take if the symbol table information is cached */ if (f->shared->sblock->root_ent && f->shared->sblock->root_ent->type == H5G_CACHED_STAB) { @@ -216,7 +216,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * not exist. This can happen if, for example, an external link is * added to the root group. */ if ((stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists"); /* Remove the cache if the stab does not exist */ if (!stab_exists) @@ -234,7 +234,7 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) /* Check if the symbol table message is valid, and replace with the * cached symbol table if necessary */ if (H5G__stab_valid(root_loc.oloc, &cached_stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table"); } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ } /* end if */ @@ -253,12 +253,12 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) * to use the latest version while the superblock is an old version. * If stab_exists is not -1 then we have already checked. */ if (stab_exists == -1 && (stab_exists = H5O_msg_exists(root_loc.oloc, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check if symbol table message exists"); if (stab_exists) { /* Read the root group's symbol table message */ if (NULL == H5O_msg_read(root_loc.oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message"); /* Update the root group symbol table entry */ f->shared->sblock->root_ent->type = H5G_CACHED_STAB; @@ -362,9 +362,9 @@ H5G_root_loc(H5F_t *f, H5G_loc_t *loc) /* Build the group location for the root group */ if (NULL == (loc->oloc = H5G_oloc(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (loc->path = H5G_nameof(root_grp))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Patch up root group's object location to reflect this file */ /* (Since the root group info is only stored once for files which diff --git a/src/H5Gstab.c b/src/H5Gstab.c index e253ff5..e7f6c02 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -130,19 +130,19 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint) /* Create the B-tree */ if (H5B_create(f, H5B_SNODE, NULL, &(stab->btree_addr) /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree"); /* Create symbol table private heap */ if (H5HL_create(f, size_hint, &(stab->heap_addr) /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Insert name into the heap */ if (H5HL_insert(f, heap, (size_t)1, "", &name_offset) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert name into heap"); /* B-trees won't work if the first name isn't at the beginning * of the heap. @@ -202,14 +202,14 @@ H5G__stab_create(H5O_loc_t *grp_oloc, const H5O_ginfo_t *ginfo, H5O_stab_t *stab /* Go create the B-tree & local heap */ if (H5G__stab_create_components(grp_oloc->file, stab, size_hint) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components"); /* * Insert the symbol table message into the object header and the symbol * table entry. */ if (H5O_msg_create(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME, stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -244,7 +244,7 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_li /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Initialize data to pass through B-tree */ udata.common.name = name; @@ -255,7 +255,7 @@ H5G__stab_insert_real(H5F_t *f, const H5O_stab_t *stab, const char *name, H5O_li /* Insert into symbol table */ if (H5B_insert(f, H5B_SNODE, stab->btree_addr, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry"); done: /* Release resources */ @@ -292,10 +292,10 @@ H5G__stab_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_ln /* Retrieve symbol table message */ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table"); if (H5G__stab_insert_real(grp_oloc->file, &stab, name, obj_lnk, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "unable to insert the name"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -325,11 +325,11 @@ H5G__stab_remove(const H5O_loc_t *loc, H5RS_str_t *grp_full_path_r, const char * /* Read in symbol table message */ if (NULL == H5O_msg_read(loc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(loc->file, stab.heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Initialize data to pass through B-tree */ udata.common.name = name; @@ -338,7 +338,7 @@ H5G__stab_remove(const H5O_loc_t *loc, H5RS_str_t *grp_full_path_r, const char * /* Remove from symbol table */ if (H5B_remove(loc->file, H5B_SNODE, stab.btree_addr, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry"); done: /* Release resources */ @@ -374,16 +374,16 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, /* Look up name of link to remove, by index */ if (H5G__stab_lookup_by_idx(grp_oloc, order, n, &obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get link information") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get link information"); lnk_copied = TRUE; /* Read in symbol table message */ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "not a symbol table"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(grp_oloc->file, stab.heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Initialize data to pass through B-tree */ udata.common.name = obj_lnk.name; @@ -392,7 +392,7 @@ H5G__stab_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, /* Remove link from symbol table */ if (H5B_remove(grp_oloc->file, H5B_SNODE, stab.btree_addr, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to remove entry"); done: /* Release resources */ @@ -431,7 +431,7 @@ H5G__stab_delete(H5F_t *f, const H5O_stab_t *stab) /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(f, stab->heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Set up user data for B-tree deletion */ udata.common.name = NULL; @@ -439,16 +439,16 @@ H5G__stab_delete(H5F_t *f, const H5O_stab_t *stab) /* Delete entire B-tree */ if (H5B_delete(f, H5B_SNODE, stab->btree_addr, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table B-tree") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table B-tree"); /* Release resources */ if (H5HL_unprotect(heap) < 0) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap"); heap = NULL; /* Delete local heap for names */ if (H5HL_delete(f, stab->heap_addr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table heap"); done: /* Release resources */ @@ -484,11 +484,11 @@ H5G__stab_iterate(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t skip, hs /* Get the B-tree info */ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(oloc->file, stab.heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Check on iteration order */ /* ("native" iteration order is increasing for this link storage mechanism) */ @@ -509,7 +509,7 @@ H5G__stab_iterate(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t skip, hs /* Check for too high of a starting index (ex post facto :-) */ /* (Skipping exactly as many entries as are in the group is currently an error) */ if (skip > 0 && skip >= *last_lnk) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); } /* end if */ else { H5G_bt_it_bt_t udata; /* User data to pass to B-tree callback */ @@ -521,15 +521,15 @@ H5G__stab_iterate(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t skip, hs /* Iterate over the group members */ if (H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_build_table, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to build link table") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to build link table"); /* Check for skipping out of bounds */ if (skip > 0 && (size_t)skip >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Sort link table in correct iteration order */ if (H5G__link_sort_table(<able, H5_INDEX_NAME, order) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTSORT, FAIL, "error sorting link messages"); /* Iterate over links in table */ if ((ret_value = H5G__link_iterate_table(<able, skip, last_lnk, op, op_data)) < 0) @@ -572,11 +572,11 @@ H5G__stab_count(const H5O_loc_t *oloc, hsize_t *num_objs) /* Get the B-tree info */ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address"); /* Iterate over the group members */ if (H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_sumup, num_objs) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -610,14 +610,14 @@ H5G__stab_bh_size(H5F_t *f, const H5O_stab_t *stab, H5_ih_info_t *bh_info) /* Get the B-tree & symbol table node size info */ if (H5B_get_info(f, H5B_SNODE, stab->btree_addr, &bt_info, H5G__node_iterate_size, &snode_size) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iteration operator failed"); /* Add symbol table & B-tree node sizes to index info */ bh_info->index_size += snode_size + bt_info.size; /* Get the size of the local heap for the group */ if (H5HL_heapsize(f, stab->heap_addr, &(bh_info->heap_size)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "iteration operator failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -652,10 +652,10 @@ H5G__stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata) name_off = ent->name_off; if ((name = (const char *)H5HL_offset_into(udata->heap, name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name"); if ((udata->name = H5MM_strdup(name)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to duplicate symbol table link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to duplicate symbol table link name"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -690,11 +690,11 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t /* Get the B-tree & local heap info */ if (NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(oloc->file, stab.heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Remap index for decreasing iteration order */ if (order == H5_ITER_DEC) { @@ -702,7 +702,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t /* Iterate over the symbol table nodes, to count the links */ if (H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed"); /* Map decreasing iteration order index to increasing iteration order index */ n = nlinks - (n + 1); @@ -718,11 +718,11 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t /* Iterate over the group members */ if (H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed"); /* If we don't know the name now, we almost certainly went out of bounds */ if (udata.name == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound"); /* Get the length of the name */ *name_len = HDstrlen(udata.name); @@ -769,7 +769,7 @@ H5G__stab_lookup_cb(const H5G_entry_t *ent, void *_udata) if (udata->lnk) /* Convert the entry to a link */ if (H5G__ent_to_link(udata->lnk, udata->heap, ent, udata->name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link") + HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -803,11 +803,11 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5 /* Retrieve the symbol table message for the group */ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't read message") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't read message"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(grp_oloc->file, stab.heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Set up user data to pass to 'find' operation callback */ udata.name = name; @@ -822,7 +822,7 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5 /* Search the B-tree */ if (H5B_find(grp_oloc->file, H5B_SNODE, stab.btree_addr, found, &bt_udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found"); done: /* Release resources */ @@ -858,11 +858,11 @@ H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata) /* Get a pointer to the link name */ if ((name = (const char *)H5HL_offset_into(udata->heap, ent->name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table link name"); /* Convert the entry to a link */ if (H5G__ent_to_link(udata->lnk, udata->heap, ent, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link") + HGOTO_ERROR(H5E_SYM, H5E_CANTCONVERT, FAIL, "unable to convert symbol table entry to link"); udata->found = TRUE; done: @@ -894,11 +894,11 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_ /* Get the B-tree & local heap info */ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(grp_oloc->file, stab.heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap") + HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to protect symbol table heap"); /* Remap index for decreasing iteration order */ if (order == H5_ITER_DEC) { @@ -906,7 +906,7 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_ /* Iterate over the symbol table nodes, to count the links */ if (H5B_iterate(grp_oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_sumup, &nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed"); /* Map decreasing iteration order index to increasing iteration order index */ n = nlinks - (n + 1); @@ -922,11 +922,11 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_ /* Iterate over the group members */ if (H5B_iterate(grp_oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "iteration operator failed"); /* If we didn't find the link, we almost certainly went out of bounds */ if (!udata.found) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "index out of bound"); done: /* Release resources */ @@ -975,7 +975,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab) /* Address is invalid, try the b-tree address in the alternate symbol * table message */ if (!alt_stab || H5B_valid(grp_oloc->file, H5B_SNODE, alt_stab->btree_addr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to locate b-tree") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "unable to locate b-tree"); else { /* The alternate symbol table's b-tree address is valid. Adjust the * symbol table message in the group. */ @@ -990,7 +990,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab) * table message */ if (!alt_stab || NULL == (heap = H5HL_protect(grp_oloc->file, alt_stab->heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "unable to locate heap") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "unable to locate heap"); else { /* The alternate symbol table's heap address is valid. Adjust the * symbol table message in the group. */ @@ -1003,7 +1003,7 @@ H5G__stab_valid(H5O_loc_t *grp_oloc, H5O_stab_t *alt_stab) if (changed) { H5E_clear_stack(NULL); if (H5O_msg_write(grp_oloc, H5O_STAB_ID, 0, H5O_UPDATE_TIME | H5O_UPDATE_FORCE, &stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to correct symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to correct symbol table message"); } /* end if */ done: diff --git a/src/H5Gtest.c b/src/H5Gtest.c index c917686..a68ffae 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -93,43 +93,43 @@ H5G__is_empty_test(hid_t gid) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* "New format" checks */ /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) { /* Sanity check that new group format shouldn't have old messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found"); HGOTO_DONE(FALSE); } /* end if */ /* Check for a link info message */ if ((linfo_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (linfo_exists > 0) { H5O_linfo_t linfo; /* Link info message */ /* Sanity check that new group format shouldn't have old messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found"); /* Get the link info */ if (H5G__obj_get_linfo(&(grp->oloc), &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info"); /* Check for 'dense' link storage file addresses being defined */ if (H5_addr_defined(linfo.fheap_addr)) @@ -148,26 +148,26 @@ H5G__is_empty_test(hid_t gid) /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) { H5O_stab_t stab; /* Info about local heap & B-tree */ hsize_t nlinks; /* Number of links in the group */ /* Sanity check that old group format shouldn't have new messages */ if (linfo_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link info messages found"); if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and group info messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and group info messages found"); /* Get the B-tree & local heap info */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read symbol table message"); /* Get the count of links in the group */ if (H5G__stab_count(&(grp->oloc), &nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to count links") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to count links"); /* Check for link count */ if (nlinks > 0) @@ -212,24 +212,24 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists == 0) HGOTO_DONE(FALSE); /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found"); /* Check if we should retrieve the number of link messages */ if (nmsgs) { @@ -237,7 +237,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs) /* Check how many link messages there are */ if ((msg_count = H5O_msg_count(&(grp->oloc), H5O_LINK_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count link messages"); *nmsgs = (unsigned)msg_count; } /* end if */ @@ -278,24 +278,24 @@ H5G__has_stab_test(hid_t gid) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists == 0) HGOTO_DONE(FALSE); /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "both symbol table and link messages found"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -336,34 +336,34 @@ H5G__is_new_dense_test(hid_t gid) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Check if the group has a symbol table message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) HGOTO_DONE(FALSE); /* Check if the group has any link messages */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINK_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) HGOTO_DONE(FALSE); /* Check if the group has link info message */ if ((msg_exists = H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); if (msg_exists > 0) { H5O_linfo_t linfo; /* Link info message */ /* Get the link info */ if (H5G__obj_get_linfo(&(grp->oloc), &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link info"); /* Check for 'dense' link storage file addresses being defined */ if (!H5_addr_defined(linfo.fheap_addr)) @@ -414,11 +414,11 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Set metadata tag in API context */ @@ -503,20 +503,20 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size) /* Get group structure */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Make certain the group has a symbol table message */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbol table message"); /* Check the size of the local heap for the group */ if (H5HL_get_size(grp->oloc.file, stab.heap_addr, lheap_size) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't query local heap size"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -563,11 +563,11 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign /* Get pointer to object for ID */ if (NULL == (obj_ptr = H5VL_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get object for ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get object for ID"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the symbol table entry */ @@ -583,13 +583,13 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign case H5I_DATATYPE: /* Avoid non-named datatypes */ if (!H5T_is_named((H5T_t *)obj_ptr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a named datatype"); obj_path = H5T_nameof((H5T_t *)obj_ptr); break; case H5I_MAP: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -607,7 +607,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object type"); } /* end switch */ assert(obj_path); @@ -660,25 +660,25 @@ H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent) /* Verify that stab info is cached in ent */ if (ent->type != H5G_CACHED_STAB) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "symbol table information is not cached") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "symbol table information is not cached"); /* Read the symbol table message from the group */ if (NULL == H5O_msg_read(grp_oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "unable to read symbol table message"); /* Verify that the cached symbol table info matches the symbol table message * in the object header. */ if ((ent->cache.stab.btree_addr != stab.btree_addr) || (ent->cache.stab.heap_addr != stab.heap_addr)) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "cached stab info does not match object header") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "cached stab info does not match object header"); /* Verify that the btree address is valid */ if (H5B_valid(grp_oloc->file, H5B_SNODE, stab.btree_addr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "b-tree address is invalid") + HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "b-tree address is invalid"); /* Verify that the heap address is valid */ if (NULL == (heap = H5HL_protect(grp_oloc->file, stab.heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "heap address is invalid") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "heap address is invalid"); done: /* Release resources */ @@ -720,7 +720,7 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h /* Load the node */ if (NULL == (sn = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, addr, f, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5_ITER_ERROR, "unable to load symbol table node"); /* Check each target object to see if its stab message (if present) matches * the cached stab (if present). If one exists, both must exist. */ @@ -735,28 +735,28 @@ H5G__verify_cached_stabs_test_cb(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, h /* Load target object header */ if (NULL == (targ_oh = H5O_protect(&targ_oloc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to protect target object header"); /* Check if a symbol table message exists */ if ((stab_exists = H5O_msg_exists_oh(targ_oh, H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to check for STAB message") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "unable to check for STAB message"); if (stab_exists) { /* Read symbol table message */ if (NULL == H5O_msg_read_oh(f, targ_oh, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to read STAB message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to read STAB message"); /* Check if the stab matches the cached stab info */ if (sn->entry[i].type != H5G_CACHED_STAB) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "STAB message is not cached in group node") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "STAB message is not cached in group node"); if ((sn->entry[i].cache.stab.btree_addr != stab.btree_addr) || (sn->entry[i].cache.stab.heap_addr != stab.heap_addr)) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, - "cached symbol table information is incorrect") + "cached symbol table information is incorrect"); } else if (sn->entry[i].type == H5G_CACHED_STAB) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "nonexistent STAB message is cached") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, H5_ITER_ERROR, "nonexistent STAB message is cached"); /* Unprotect target object */ if (H5O_unprotect(&targ_oloc, targ_oh, H5AC__NO_FLAGS_SET) < 0) @@ -808,7 +808,7 @@ H5G__verify_cached_stabs_test(hid_t gid) /* Check args */ if (NULL == (grp = (H5G_t *)H5VL_object_verify(gid, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group"); /* Set up metadata tagging */ H5AC_tag(grp->oloc.addr, &prev_tag); @@ -816,7 +816,7 @@ H5G__verify_cached_stabs_test(hid_t gid) /* Check for group having a symbol table message */ /* Check for the group having a group info message */ if ((stab_exists = H5O_msg_exists(&(grp->oloc), H5O_STAB_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header"); /* No need to check anything if the symbol table doesn't exist */ if (!stab_exists) @@ -824,7 +824,7 @@ H5G__verify_cached_stabs_test(hid_t gid) /* Read the stab */ if (NULL == H5O_msg_read(&(grp->oloc), H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get symbol table info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get symbol table info"); /* Iterate over the b-tree, checking validity of cached information */ if ((ret_value = H5B_iterate(grp->oloc.file, H5B_SNODE, stab.btree_addr, H5G__verify_cached_stabs_test_cb, diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 33dc7b3..41e990c 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -112,7 +112,7 @@ H5G__traverse_slink_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc, const char H5_ATTR_UNU if (udata->chk_exists) udata->exists = FALSE; else - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found"); } /* end if */ else { /* Copy new location information for resolved object */ @@ -164,7 +164,7 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G /* Get the link class for this type of link. */ if (NULL == (link_class = H5L_find_class(lnk->type))) - HGOTO_ERROR(H5E_SYM, H5E_NOTREGISTERED, FAIL, "unable to get UD link class") + HGOTO_ERROR(H5E_SYM, H5E_NOTREGISTERED, FAIL, "unable to get UD link class"); /* Set up location for user-defined callback. Use a copy of our current * grp_loc. */ @@ -172,13 +172,13 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G grp_loc_copy.oloc = &grp_oloc_copy; H5G_loc_reset(&grp_loc_copy); if (H5G_loc_copy(&grp_loc_copy, grp_loc, H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "unable to copy object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "unable to copy object location"); /* Create a group ID to pass to the user-defined callback */ if (NULL == (grp = H5G_open(&grp_loc_copy))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group"); if ((cur_grp = H5VL_wrap_register(H5I_GROUP, grp, FALSE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group"); /* User-defined callback function */ #ifndef H5_NO_DEPRECATED_SYMBOLS @@ -209,12 +209,12 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G } /* end if */ /* else, we really needed to open the object */ else - HGOTO_ERROR(H5E_SYM, H5E_BADID, FAIL, "traversal callback returned invalid ID") + HGOTO_ERROR(H5E_SYM, H5E_BADID, FAIL, "traversal callback returned invalid ID"); } /* end if */ /* Get the object location information from the ID the user callback returned */ if (H5G_loc(cb_return, &new_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to get object location from ID") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to get object location from ID"); /* Release any previous location information for the object */ H5G_loc_free(obj_loc); @@ -226,13 +226,13 @@ H5G__traverse_ud(const H5G_loc_t *grp_loc /*in,out*/, const H5O_link_t *lnk, H5G * object location will be invalidated when the file closes). */ if (H5O_loc_hold_file(obj_loc->oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open"); /* We have a copy of the location and we're holding the file open. * Close the open ID the user passed back. */ if (H5I_dec_ref(cb_return) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close ID from UD callback") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close ID from UD callback"); cb_return = (hid_t)(-1); done: @@ -306,7 +306,7 @@ H5G__traverse_slink(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, H5G_loc_t * /* Traverse the link */ if (H5G__traverse_real(&tmp_grp_loc, lnk->u.soft.name, target, H5G__traverse_slink_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link"); /* Pass back information about whether the object exists */ *obj_exists = udata.exists; @@ -356,19 +356,19 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned /* Get the # of soft / UD links left to traverse */ if (H5CX_get_nlinks(&nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse"); /* Decrement # of links and range check */ if ((nlinks)-- <= 0) - HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links") + HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links"); /* Update the # of links in the API context */ if (H5CX_set_nlinks(nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't update # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't update # of soft / UD links to traverse"); /* Traverse soft link */ if (H5G__traverse_slink(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), obj_exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "symbolic link traversal failed") + HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "symbolic link traversal failed"); } /* end if */ /* @@ -380,19 +380,19 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned /* Get the # of soft / UD links left to traverse */ if (H5CX_get_nlinks(&nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse"); /* Decrement # of links and range check */ if ((nlinks)-- <= 0) - HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links") + HGOTO_ERROR(H5E_LINK, H5E_NLINKS, FAIL, "too many links"); /* Update the # of links in the API context */ if (H5CX_set_nlinks(nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't update # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't update # of soft / UD links to traverse"); /* Traverse user-defined link */ if (H5G__traverse_ud(grp_loc, lnk, obj_loc, (target & H5G_TARGET_EXISTS), obj_exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "user-defined link traversal failed") + HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "user-defined link traversal failed"); } /* end if */ /* @@ -408,7 +408,7 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned */ if (H5_addr_defined(obj_loc->oloc->addr) && (0 == (target & H5G_TARGET_MOUNT) || !last_comp)) { if (H5F_traverse_mount(obj_loc->oloc /*in,out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "mount point traversal failed") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "mount point traversal failed"); } /* end if */ /* If the grp_loc is the only thing holding an external file open @@ -417,7 +417,7 @@ H5G__traverse_special(const H5G_loc_t *grp_loc, const H5O_link_t *lnk, unsigned */ if (grp_loc->oloc->holding_file && grp_loc->oloc->file == obj_loc->oloc->file) if (H5O_loc_hold_file(obj_loc->oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -494,25 +494,25 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G #if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG) /* Clear group location */ if (H5G_loc_reset(&grp_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location"); #endif /* H5_USING_MEMCHECKER */ /* Deep copy of the starting location to group location */ if (H5G_loc_copy(&grp_loc, &loc, H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy location") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy location"); group_copy = TRUE; /* Clear object location */ if (H5G_loc_reset(&obj_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset location"); /* Wrap the local buffer for serialized header info */ if (NULL == (wb = H5WB_wrap(comp_buf, sizeof(comp_buf)))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough */ if (NULL == (comp = (char *)H5WB_actual(wb, (HDstrlen(name) + 1)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Traverse the path */ while ((name = H5G__component(name, &nchars)) && *name) { @@ -548,7 +548,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Get information for object in current group */ lookup_status = FALSE; if (H5G__obj_lookup(grp_loc.oloc, comp, &lookup_status, &lnk /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't look up component"); obj_exists = FALSE; /* If the lookup was OK, build object location and traverse special links, etc. */ @@ -560,7 +560,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Build object location from the link */ if (H5G__link_to_loc(&grp_loc, &lnk, &obj_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location"); obj_loc_valid = TRUE; /* Assume object exists */ @@ -569,7 +569,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Perform any special traversals that the link needs */ /* (soft links, user-defined links, file mounting, etc.) */ if (H5G__traverse_special(&grp_loc, &lnk, target, last_comp, &obj_loc, &obj_exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed") + HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed"); } /* end if */ /* Check for last component in name provided */ @@ -593,7 +593,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Call 'operator' routine */ if ((op)(&grp_loc, comp, cb_lnk, cb_loc, op_data, &own_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CALLBACK, FAIL, "traversal operator failed") + HGOTO_ERROR(H5E_SYM, H5E_CALLBACK, FAIL, "traversal operator failed"); HGOTO_DONE(SUCCEED); } /* end if */ @@ -618,11 +618,11 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Check for the parent group having a group info message */ /* (OK if not found) */ if ((exists = H5O_msg_exists(grp_loc.oloc, H5O_GINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (exists) { /* Get the group info for parent group */ if (NULL == H5O_msg_read(grp_loc.oloc, H5O_GINFO_ID, &par_ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "group info message not present") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "group info message not present"); /* Use parent group info settings */ ginfo = &par_ginfo; @@ -635,7 +635,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* (OK if not found) */ /* Get the link info for parent group */ if ((exists = H5G__obj_get_linfo(grp_loc.oloc, &par_linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (exists) { /* Only keep the creation order information from the parent * group's link info @@ -652,11 +652,11 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G /* Check for the parent group having a filter pipeline message */ /* (OK if not found) */ if ((exists = H5O_msg_exists(grp_loc.oloc, H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (exists) { /* Get the filter pipeline for parent group */ if (NULL == H5O_msg_read(grp_loc.oloc, H5O_PLINE_ID, &par_pline)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "filter pipeline message not present") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "filter pipeline message not present"); /* Use parent filter pipeline settings */ pline = &par_pline; @@ -672,43 +672,43 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G 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") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry"); /* Insert new group into current group's symbol table */ if (H5G__loc_insert(&grp_loc, comp, &obj_loc, H5O_TYPE_GROUP, &gcrt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert intermediate group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert intermediate group"); /* Decrement refcount on intermediate group's object header in memory */ if (H5O_dec_rc_by_loc(obj_loc.oloc) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, - "unable to decrement refcount on newly created object") + "unable to decrement refcount on newly created object"); /* Close new group */ if (H5O_close(obj_loc.oloc, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close"); /* If the parent group was holding the file open, the * newly-created group should, as well. */ if (grp_loc.oloc->holding_file) if (H5O_loc_hold_file(obj_loc.oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to hold file open"); /* Reset any non-default object header messages */ H5_GCC_CLANG_DIAG_OFF("cast-qual") if (ginfo != &def_ginfo) if (H5O_msg_reset(H5O_GINFO_ID, (void *)ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset group info message"); if (linfo != &def_linfo) if (H5O_msg_reset(H5O_LINFO_ID, (void *)linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset link info message"); if (pline != &def_pline) if (H5O_msg_reset(H5O_PLINE_ID, (void *)pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message") + HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to reset I/O pipeline message"); H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "component not found"); } /* end if */ /* @@ -733,7 +733,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, H5G */ assert(group_copy); if ((op)(NULL, ".", NULL, &grp_loc, op_data, &own_loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "traversal operator failed") + 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 @@ -788,11 +788,11 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no name given") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no name given"); if (!loc) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no starting location") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no starting location"); if (!op) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no operation provided") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "no operation provided"); /* Retrieve the original # of soft / UD links that are able to be traversed * (So that multiple calls to H5G_traverse don't incorrectly look @@ -800,7 +800,7 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver * may need their own mechanism to set & reset the # of links to traverse) */ if (H5CX_get_nlinks(&orig_nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse"); /* Set up invalid tag. This is a precautionary step only. Setting an invalid * tag here will ensure that no metadata accessed while doing the traversal @@ -820,7 +820,7 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver /* Reset the # of soft / UD links that can be traversed */ if (H5CX_set_nlinks(orig_nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HF.c b/src/H5HF.c index 9579760..9faa6ad 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -145,24 +145,25 @@ H5HF_create(H5F_t *f, const H5HF_create_t *cparam) /* Create shared fractal heap header */ if (HADDR_UNDEF == (fh_addr = H5HF__hdr_create(f, cparam))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create fractal heap header"); /* Allocate fractal heap wrapper */ if (NULL == (fh = H5FL_MALLOC(H5HF_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info"); /* Lock the heap header into memory */ if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header"); /* Point fractal heap wrapper at header and bump it's ref count */ fh->hdr = hdr; if (H5HF__hdr_incr(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header"); /* Increment # of files using this heap header */ if (H5HF__hdr_fuse_incr(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, + "can't increment file reference count on shared heap header"); /* Set file pointer for this heap open context */ fh->f = f; @@ -207,24 +208,25 @@ H5HF_open(H5F_t *f, haddr_t fh_addr) /* Load the heap header into memory */ if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header"); /* Check for pending heap deletion */ if (hdr->pending_delete) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, NULL, "can't open fractal heap pending deletion") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, NULL, "can't open fractal heap pending deletion"); /* Create fractal heap info */ if (NULL == (fh = H5FL_MALLOC(H5HF_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for fractal heap info"); /* Point fractal heap wrapper at header */ fh->hdr = hdr; if (H5HF__hdr_incr(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header"); /* Increment # of files using this heap header */ if (H5HF__hdr_fuse_incr(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, + "can't increment file reference count on shared heap header"); /* Set file pointer for this heap open context */ fh->f = f; @@ -319,7 +321,7 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*out*/) /* Check arguments */ if (size == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "can't insert 0-sized objects") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "can't insert 0-sized objects"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -336,24 +338,24 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id /*out*/) */ H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5HF__huge_insert(hdr, size, (void *)obj, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'huge' object in fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'huge' object in fractal heap"); H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ /* Check for 'tiny' object */ else if (size <= hdr->tiny_max_len) { /* Store 'tiny' object in heap */ if (H5HF__tiny_insert(hdr, size, obj, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'tiny' object in fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'tiny' object in fractal heap"); } /* end if */ else { /* Check if we are in "append only" mode, or if there's enough room for the object */ if (hdr->write_once) { - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "'write once' managed blocks not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "'write once' managed blocks not supported yet"); } /* end if */ else { /* Allocate space for object in 'managed' heap */ if (H5HF__man_insert(hdr, size, obj, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'managed' object in fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'managed' object in fractal heap"); } /* end else */ } /* end else */ @@ -391,7 +393,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -399,19 +401,19 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p) /* Check type of object in heap */ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) { if (H5HF__man_get_obj_len(fh->hdr, id, obj_len_p) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'managed' object's length") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'managed' object's length"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { if (H5HF__huge_get_obj_len(fh->hdr, id, obj_len_p) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's length") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's length"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { if (H5HF__tiny_get_obj_len(fh->hdr, id, obj_len_p) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length"); } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -448,7 +450,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -460,7 +462,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p) else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { /* Huge objects are located directly in the file */ if (H5HF__huge_get_obj_off(fh->hdr, id, obj_off_p) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's offset") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's offset"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { /* Tiny objects are not stored in the heap */ @@ -468,7 +470,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p) } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -505,7 +507,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -514,21 +516,21 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/) if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) { /* Read object from managed heap blocks */ if (H5HF__man_read(fh->hdr, id, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { /* Read 'huge' object from file */ if (H5HF__huge_read(fh->hdr, id, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'huge' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'huge' object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { /* Read 'tiny' object from file */ if (H5HF__tiny_read(fh->hdr, id, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap"); } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -577,7 +579,7 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -587,21 +589,21 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void /* Operate on object from managed heap blocks */ /* (ID can't change and modifying object is "easy" to manage) */ if (H5HF__man_write(fh->hdr, id, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'managed' heap object") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'managed' heap object"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { /* Operate on "huge" object */ if (H5HF__huge_write(fh->hdr, id, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'huge' heap object") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "can't write to 'huge' heap object"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { /* Check for writing a 'tiny' object */ /* (which isn't supported yet - ID will change) */ - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet"); } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -643,7 +645,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -652,21 +654,21 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data) if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) { /* Operate on object from managed heap blocks */ if (H5HF__man_op(fh->hdr, id, op, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { /* Operate on 'huge' object from file */ if (H5HF__huge_op(fh->hdr, id, op, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'huge' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'huge' object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { /* Operate on 'tiny' object from file */ if (H5HF__tiny_op(fh->hdr, id, op, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap"); } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -703,7 +705,7 @@ H5HF_remove(H5HF_t *fh, const void *_id) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Set the shared heap header's file context for this operation */ fh->hdr->f = fh->f; @@ -712,21 +714,21 @@ H5HF_remove(H5HF_t *fh, const void *_id) if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) { /* Remove object from managed heap blocks */ if (H5HF__man_remove(fh->hdr, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) { /* Remove 'huge' object from file & v2 B-tree tracker */ if (H5HF__huge_remove(fh->hdr, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'huge' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'huge' object from fractal heap"); } /* end if */ else if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) { /* Remove 'tiny' object from heap statistics */ if (H5HF__tiny_remove(fh->hdr, id) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap"); } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ done: @@ -768,7 +770,7 @@ H5HF_close(H5HF_t *fh) * the metadata cache - QAK) */ if (H5HF__space_close(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info"); /* Reset the block iterator, if necessary */ /* (Can't put this in header "destroy" routine, because it has @@ -778,7 +780,7 @@ H5HF_close(H5HF_t *fh) */ if (H5HF__man_iter_ready(&fh->hdr->next_block)) if (H5HF__man_iter_reset(&fh->hdr->next_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator"); /* Shut down the huge object information */ /* (Can't put this in header "destroy" routine, because it has @@ -786,7 +788,7 @@ H5HF_close(H5HF_t *fh) * modified by the shutdown routine - QAK) */ if (H5HF__huge_term(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release 'huge' object info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release 'huge' object info"); /* Check for pending heap deletion */ if (fh->hdr->pending_delete) { @@ -803,7 +805,7 @@ H5HF_close(H5HF_t *fh) * immediately -QAK) */ if (H5HF__hdr_decr(fh->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header"); /* Check for pending heap deletion */ if (pending_delete) { @@ -811,11 +813,11 @@ H5HF_close(H5HF_t *fh) /* Lock the heap header into memory */ if (NULL == (hdr = H5HF__hdr_protect(fh->f, heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* Delete heap, starting with header (unprotects header) */ if (H5HF__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap"); } /* end if */ done: @@ -850,7 +852,7 @@ H5HF_delete(H5F_t *f, haddr_t fh_addr) /* Lock the heap header into memory */ if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* Check for files using shared heap header */ if (hdr->file_rc) @@ -858,7 +860,7 @@ H5HF_delete(H5F_t *f, haddr_t fh_addr) else { /* Delete heap now, starting with header (unprotects header) */ if (H5HF__hdr_delete(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap"); hdr = NULL; } /* end if */ diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c index c5d12c9..56e5270 100644 --- a/src/H5HFbtree2.c +++ b/src/H5HFbtree2.c @@ -196,7 +196,7 @@ H5HF__huge_bt2_crt_context(void *_f) /* Allocate callback context */ if (NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context"); /* Determine the size of addresses & lengths in the file */ ctx->sizeof_addr = H5F_SIZEOF_ADDR(f); @@ -280,7 +280,7 @@ H5HF__huge_bt2_indir_remove(const void *nrecord, void *_udata) /* Free the space in the file for the object being removed */ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk"); /* Set the length of the object removed */ udata->obj_len = ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len; @@ -457,7 +457,7 @@ H5HF__huge_bt2_filt_indir_remove(const void *nrecord, void *_udata) if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk"); /* Set the length of the object removed */ udata->obj_len = ((const H5HF_huge_bt2_filt_indir_rec_t *)nrecord)->obj_size; @@ -617,7 +617,7 @@ H5HF__huge_bt2_dir_remove(const void *nrecord, void *_udata) /* Free the space in the file for the object being removed */ if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk"); /* Set the length of the object removed */ udata->obj_len = ((const H5HF_huge_bt2_indir_rec_t *)nrecord)->len; @@ -803,7 +803,7 @@ H5HF__huge_bt2_filt_dir_remove(const void *nrecord, void *_udata) if (H5MF_xfree(udata->hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->addr, ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free space for huge object on disk"); /* Set the length of the object removed */ udata->obj_len = ((const H5HF_huge_bt2_filt_dir_rec_t *)nrecord)->obj_size; diff --git a/src/H5HFcache.c b/src/H5HFcache.c index d1146d7..c34a374 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -204,12 +204,12 @@ H5HF__hdr_prefix_decode(H5HF_hdr_t *hdr, const uint8_t **image_ref) /* Magic number */ if (memcmp(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "wrong fractal heap header signature") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "wrong fractal heap header signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5HF_HDR_VERSION) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong fractal heap header version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong fractal heap header version"); /* General heap information */ UINT16DECODE(image, hdr->id_len); /* Heap ID length */ @@ -381,7 +381,7 @@ H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_NDEBUG_UN /* Deserialize the fractal heap header's prefix */ if (H5HF__hdr_prefix_decode(&hdr, &image) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode fractal heap header prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode fractal heap header prefix"); /* Check for I/O filter info on this heap */ if (hdr.filter_len > 0) @@ -460,11 +460,11 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Allocate space for the fractal heap data structure */ if (NULL == (hdr = H5HF__hdr_alloc(udata->f))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Deserialize the fractal heap header's prefix */ if (H5HF__hdr_prefix_decode(hdr, &image) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode fractal heap header prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode fractal heap header prefix"); /* Heap status flags */ /* (bit 0: "huge" object IDs have wrapped) */ @@ -495,7 +495,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Managed objects' doubling-table info */ if (H5HF__dtable_decode(hdr->f, &image, &(hdr->man_dtable)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, NULL, "unable to encode managed obj. doubling table info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, NULL, "unable to encode managed obj. doubling table info"); /* Set the fractal heap header's 'base' size */ hdr->heap_size = (size_t)H5HF_HEADER_SIZE(hdr); @@ -524,14 +524,14 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Decode I/O filter information */ if (NULL == (pline = (H5O_pline_t *)H5O_msg_decode(hdr->f, NULL, H5O_PLINE_ID, len, image))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode I/O pipeline filters") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode I/O pipeline filters"); /* Advance past filter info to checksum */ image += hdr->filter_len; /* Copy the information into the header's I/O pipeline structure */ if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &(hdr->pline))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, NULL, "can't copy I/O filter pipeline") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, NULL, "can't copy I/O filter pipeline"); /* Release the space allocated for the I/O pipeline filters */ H5O_msg_free(H5O_PLINE_ID, pline); @@ -545,7 +545,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, hbool_ /* Finish initialization of heap header */ if (H5HF__hdr_finish_init(hdr) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header"); /* Set return value */ ret_value = (void *)hdr; @@ -659,7 +659,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.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean."); assert(fd_children_clean); } #endif /* NDEBUG */ @@ -753,7 +753,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN /* Managed objects' doubling-table info */ if (H5HF__dtable_encode(hdr->f, &image, &(hdr->man_dtable)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info"); /* Check for I/O filter information to encode */ if (hdr->filter_len > 0) { @@ -765,7 +765,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN /* Encode I/O filter information */ if (H5O_msg_encode(hdr->f, H5O_PLINE_ID, FALSE, image, &(hdr->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline filters") + HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "can't encode I/O pipeline filters"); image += hdr->filter_len; } /* end if */ @@ -813,7 +813,7 @@ H5HF__cache_hdr_free_icr(void *_thing) assert(hdr->rc == 0); if (H5HF__hdr_free(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -926,12 +926,12 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Allocate space for the fractal heap indirect block */ if (NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Share common heap information */ iblock->hdr = hdr; if (H5HF__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header"); /* Set block's internal information */ iblock->rc = 0; @@ -946,17 +946,17 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Magic number */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap indirect block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5HF_IBLOCK_VERSION) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version"); /* Address of heap that owns this block */ H5F_addr_decode(udata->f, &image, &heap_addr); if (H5_addr_ne(heap_addr, hdr->heap_addr)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block"); /* Address of parent block */ iblock->parent = udata->par_info->iblock; @@ -972,7 +972,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Share parent block */ if (H5HF__iblock_incr(iblock->parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, - "can't increment reference count on shared indirect block") + "can't increment reference count on shared indirect block"); /* Set max. # of rows in this block */ iblock->max_rows = iblock->nrows; @@ -989,7 +989,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries"); if (hdr->filter_len > 0) { unsigned dir_rows; /* Number of direct rows in this indirect block */ @@ -1000,7 +1000,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Allocate indirect block filtered entry array */ if (NULL == (iblock->filt_ents = H5FL_SEQ_MALLOC(H5HF_indirect_filt_ent_t, (size_t)(dir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block entries") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block entries"); } /* end if */ else iblock->filt_ents = NULL; @@ -1059,7 +1059,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED /* Allocate & initialize child indirect block pointer array */ if (NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC( H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for block entries") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for block entries"); } /* end if */ else iblock->child_iblocks = NULL; @@ -1154,7 +1154,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5 * iblock are clean. */ if (H5AC_get_entry_status(f, iblock->addr, &iblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status"); /* since the current iblock is the guest of honor in a flush, we know * that it is locked into the cache for the duration of the call. Hence @@ -1163,7 +1163,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.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean."); assert(fd_children_clean); } #endif /* NDEBUG */ @@ -1177,14 +1177,15 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5 /* Allocate 'normal' space for the new indirect block on disk */ if (HADDR_UNDEF == (iblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_IBLOCK, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, + "file allocation failed for fractal heap indirect block"); /* Sanity check */ assert(!H5_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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move indirect block"); /* Update the internal address for the block */ iblock->addr = iblock_addr; @@ -1196,7 +1197,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5 /* Mark that heap header was modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end if */ else { H5HF_indirect_t *par_iblock; /* Parent indirect block */ @@ -1211,7 +1212,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t H5 /* Mark that parent was modified */ if (H5HF__iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end if */ *new_addr = iblock_addr; @@ -1404,7 +1405,7 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing) /* Create flush dependency with parent, if there is one */ if (iblock->fd_parent) if (H5AC_create_flush_dependency(iblock->fd_parent, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -1421,13 +1422,13 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing) if (iblock->fd_parent) { /* Destroy flush dependency with parent */ if (H5AC_destroy_flush_dependency(iblock->fd_parent, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); iblock->fd_parent = NULL; } /* end if */ break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); break; } /* end switch */ @@ -1462,7 +1463,7 @@ H5HF__cache_iblock_free_icr(void *thing) /* Destroy fractal heap indirect block */ if (H5HF__man_iblock_dest(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1567,7 +1568,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata) * provided to it. */ if (NULL == (read_buf = H5MM_malloc(len))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer"); /* Set up parameters for filter pipeline */ nbytes = len; @@ -1577,7 +1578,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata) /* Push direct block data through I/O filter pipeline */ if (H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &len, &read_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed"); /* Update info about direct block */ udata->decompressed = TRUE; @@ -1622,7 +1623,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata) /* Allocate block buffer */ if (NULL == (udata->dblk = H5FL_BLK_MALLOC(direct_block, (size_t)len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy un-filtered data into block's buffer */ H5MM_memcpy(udata->dblk, read_buf, len); @@ -1679,7 +1680,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); memset(&dblock->cache_info, 0, sizeof(H5AC_info_t)); /* Set the shared heap header's file context for this operation */ @@ -1688,7 +1689,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Share common heap information */ dblock->hdr = hdr; if (H5HF__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header"); /* Set block's internal information */ dblock->size = udata->dblock_size; @@ -1721,7 +1722,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo * provided to it. */ if (NULL == (read_buf = H5MM_malloc(len))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for pipeline buffer") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for pipeline buffer"); /* Copy compressed image into buffer */ H5MM_memcpy(read_buf, image, len); @@ -1731,7 +1732,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo filter_mask = udata->filter_mask; if (H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &len, &read_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, NULL, "output pipeline failed"); /* Sanity check */ assert(nbytes == dblock->size); @@ -1748,7 +1749,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Allocate block buffer */ /* XXX: Change to using free-list factories */ if (NULL == (dblock->blk = H5FL_BLK_MALLOC(direct_block, (size_t)dblock->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy image to dblock->blk */ assert(dblock->size == len); @@ -1760,17 +1761,17 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Magic number */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong fractal heap direct block signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (*image++ != H5HF_DBLOCK_VERSION) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version"); /* Address of heap that owns this block (just for file integrity checks) */ H5F_addr_decode(udata->f, &image, &heap_addr); if (H5_addr_ne(heap_addr, hdr->heap_addr)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block"); /* Address of parent block */ dblock->parent = par_info->iblock; @@ -1783,7 +1784,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata, hbo /* Share parent block */ if (H5HF__iblock_incr(dblock->parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, - "can't increment reference count on shared indirect block") + "can't increment reference count on shared indirect block"); } /* end if */ /* Offset of heap within the heap's address space */ @@ -2083,7 +2084,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Allocate buffer to perform I/O filtering on */ write_size = dblock->size; if (NULL == (write_buf = H5MM_malloc(write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer"); /* Copy the direct block's image into the buffer to compress */ H5MM_memcpy(write_buf, dblock->blk, write_size); @@ -2092,7 +2093,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le nbytes = write_size; if (H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &write_size, &write_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "output pipeline failed"); /* Use the compressed number of bytes as the size to write */ write_size = nbytes; @@ -2135,13 +2136,13 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le if (!at_tmp_addr) /* Release direct block's current disk space */ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, addr, (hsize_t)hdr->pline_root_direct_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block"); /* Allocate space for the compressed direct block */ if (HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, (hsize_t)write_size))) HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap direct block") + "file allocation failed for fractal heap direct block"); /* Update information about compressed direct block's * location & size @@ -2158,7 +2159,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Check if heap header was modified */ if (hdr_changed) if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end if */ else { /* the direct block's parent is an indirect block */ hbool_t par_changed = FALSE; /* Whether the parent's infochanged */ @@ -2190,13 +2191,13 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Release direct block's current disk space */ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, addr, (hsize_t)par_iblock->filt_ents[par_entry].size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block"); /* Allocate space for the compressed direct block */ if (HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, (hsize_t)write_size))) HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap direct block") + "file allocation failed for fractal heap direct block"); /* Update information about compressed direct block's * location & size @@ -2213,7 +2214,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Check if parent was modified */ if (par_changed) if (H5HF__iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end else */ } /* end if */ else { @@ -2238,7 +2239,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le if (HADDR_UNDEF == (dblock_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FHEAP_DBLOCK, (hsize_t)write_size))) HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap direct block") + "file allocation failed for fractal heap direct block"); /* Check for root direct block */ if (NULL == dblock->parent) { @@ -2251,7 +2252,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Mark that heap header was modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end if */ else { /* the direct block's parent is an indirect block */ /* Sanity checks */ @@ -2265,7 +2266,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, size_t le /* Mark that parent was modified */ if (H5HF__iblock_dirty(par_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end else */ } /* end if */ } /* end else */ @@ -2393,7 +2394,7 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) /* Create flush dependency with parent, if there is one */ if (dblock->fd_parent) if (H5AC_create_flush_dependency(dblock->fd_parent, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -2410,13 +2411,13 @@ H5HF__cache_dblock_notify(H5AC_notify_action_t action, void *_thing) if (dblock->fd_parent) { /* Destroy flush dependency with parent */ if (H5AC_destroy_flush_dependency(dblock->fd_parent, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); dblock->fd_parent = NULL; } /* end if */ break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); break; } /* end switch */ @@ -2449,7 +2450,7 @@ H5HF__cache_dblock_free_icr(void *_thing) /* Destroy fractal heap direct block */ if (H5HF__man_dblock_dest(dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2567,7 +2568,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get hdr status"); assert(hdr_status & H5AC_ES__IN_CACHE); /* We have three basic scenarios we have to deal with: @@ -2620,7 +2621,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ /* get the status of the root iblock */ 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") + 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); assert(root_iblock_in_cache || (root_iblock == NULL)); @@ -2638,7 +2639,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ * the root inode. */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); assert(fd_exists); *fd_clean = FALSE; @@ -2721,7 +2722,7 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ * or we think of a better way. */ 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.") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() failed."); assert(root_iblock); } /* end else */ } /* end if */ @@ -2770,14 +2771,14 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ if (H5HF__cache_verify_iblock_descendants_clean(f, hdr->heap_addr, root_iblock, &root_iblock_status, fd_clean, clean) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify root iblock & descendants clean.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify root iblock & descendants clean."); /* Unprotect the root indirect block if required */ if (unprotect_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.") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed."); } /* end if */ } /* end else */ } /* end if */ @@ -2790,14 +2791,14 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ /* this is scenario 2 -- we have a root dblock */ root_dblock_addr = hdr->man_dtable.table_addr; if (H5AC_get_entry_status(f, root_dblock_addr, &root_dblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root dblock status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root dblock status"); 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type"); assert(in_cache); if (!type_ok) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?"); /* If a root dblock is in cache, it must have a flush * dependency relationship with the header, and it @@ -2809,12 +2810,12 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, H5HF_hdr_t *hdr, hbool_t *fd_ * relationship with the header. */ if (H5AC_flush_dependency_exists(f, hdr->heap_addr, root_dblock_addr, &fd_exists) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); if (!fd_exists) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock is not a flush dep parent of header.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock is not a flush dep parent of header."); if (0 != (root_dblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT)) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock in cache and is a flush dep parent.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock in cache and is a flush dep parent."); *clean = !((root_dblock_status & H5AC_ES__IS_DIRTY) && (((root_dblock_status & H5AC_ES__IMAGE_IS_UP_TO_DATE) == 0) || @@ -2928,19 +2929,19 @@ H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, haddr_t fd_parent_addr, H5 if ((*fd_clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean, &has_dblocks) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify dblocks clean.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify dblocks clean."); if ((*fd_clean) && H5HF__cache_verify_descendant_iblocks_clean(f, fd_parent_addr, iblock, fd_clean, clean, &has_iblocks) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify iblocks clean.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify iblocks clean."); /* verify that flush dependency setup is plausible */ if (0 == (*iblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD)) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock is not a flush dep child.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock is not a flush dep child."); if (((has_dblocks || has_iblocks)) && (0 == (*iblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT))) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not a flush dep parent.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not a flush dep parent."); if (((has_dblocks || has_iblocks)) && (0 == (*iblock_status & H5AC_ES__IS_PINNED))) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not pinned.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not pinned."); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3057,17 +3058,17 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_ hbool_t type_ok; if (H5AC_verify_entry_type(f, dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type"); if (in_cache) { /* dblock is in cache */ hbool_t fd_exists; unsigned dblock_status = 0; if (!type_ok) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "dblock addr doesn't refer to a dblock?!?") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "dblock addr doesn't refer to a dblock?!?"); if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status"); assert(dblock_status & H5AC_ES__IN_CACHE); @@ -3079,7 +3080,7 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_ *clean = FALSE; if (H5AC_flush_dependency_exists(f, fd_parent_addr, dblock_addr, &fd_exists) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); if (fd_exists) *fd_clean = FALSE; @@ -3090,11 +3091,11 @@ H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5HF_ * here. */ if (H5AC_flush_dependency_exists(f, iblock_addr, dblock_addr, &fd_exists) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); if (!fd_exists) HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, - "dblock in cache and not a flush dep child of iblock.") + "dblock in cache and not a flush dep child of iblock."); } /* end if */ } /* end if */ @@ -3216,7 +3217,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5 unsigned child_iblock_status = 0; if (H5AC_get_entry_status(f, child_iblock_addr, &child_iblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status"); if (child_iblock_status & H5AC_ES__IN_CACHE) { hbool_t fd_exists; @@ -3230,7 +3231,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5 *clean = FALSE; if (H5AC_flush_dependency_exists(f, fd_parent_addr, child_iblock_addr, &fd_exists) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); if (fd_exists) *fd_clean = FALSE; @@ -3332,7 +3333,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5 if (H5AC_get_entry_ptr_from_addr(f, child_iblock_addr, (void **)(&child_iblock)) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "H5AC_get_entry_ptr_from_addr() failed.") + "H5AC_get_entry_ptr_from_addr() failed."); assert(child_iblock); } /* end else */ } /* end if */ @@ -3354,7 +3355,7 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5 /* now make the recursive call */ if (H5HF__cache_verify_iblock_descendants_clean( f, fd_parent_addr, child_iblock, &child_iblock_status, fd_clean, clean) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify child iblock clean.") + HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify child iblock clean."); /* if iblock_addr != fd_parent_addr, verify that a flush * dependency relationship exists between iblock and @@ -3362,18 +3363,18 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, haddr_t fd_parent_addr, H5 */ if (fd_parent_addr != iblock_addr) { if (H5AC_flush_dependency_exists(f, iblock_addr, child_iblock_addr, &fd_exists) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check flush dependency"); if (!fd_exists) HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, - "iblock is not a flush dep parent of child_iblock.") + "iblock is not a flush dep parent of child_iblock."); } /* end if */ /* if we protected the child iblock, unprotect it now */ if (unprotect_child_iblock) { if (H5AC_unprotect(f, H5AC_FHEAP_IBLOCK, child_iblock_addr, child_iblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed.") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() failed."); } /* end if */ } /* end if */ } /* end if */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 3ad0791..0a86fc0 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -121,7 +121,7 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) /* Check for correct heap ID version */ if ((id_flags & H5HF_ID_VERS_MASK) != H5HF_ID_VERS_CURR) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "incorrect heap ID version"); /* Check type of object in heap */ if ((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) { @@ -135,16 +135,16 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) } /* end if */ else { fprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet"); } /* end else */ /* Get the length of the heap object */ if (H5HF_get_obj_len(fh, id, &obj_len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length"); /* Get the offset of the heap object */ if (H5HF_get_obj_off(fh, id, &obj_off) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length"); /* Display the heap ID */ fprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth, @@ -330,7 +330,7 @@ H5HF_hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) /* Load the fractal heap header */ if (NULL == (hdr = H5HF__hdr_protect(f, addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* Print the information about the heap's header */ H5HF_hdr_print(hdr, FALSE, stream, indent, fwidth); @@ -456,13 +456,13 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Load the fractal heap header */ if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* * Load the heap direct block */ if (NULL == (dblock = H5HF__man_dblock_protect(hdr, addr, block_size, NULL, 0, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap direct block"); /* Print opening message */ fprintf(stream, "%*sFractal Heap Direct Block...\n", indent, ""); @@ -479,11 +479,11 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Allocate space for the free space markers */ if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the free space information for the heap */ if (H5HF__space_start(hdr, FALSE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space"); /* If there is a free space manager for the heap, check for sections that overlap this block */ if (hdr->fspace) { @@ -504,11 +504,11 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* 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) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space"); /* Close the free space information */ if (H5HF__space_close(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info"); /* Keep the amount of space free */ amount_free = udata.amount_free; @@ -681,14 +681,14 @@ H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* Load the fractal heap header */ if (NULL == (hdr = H5HF__hdr_protect(f, hdr_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* * Load the heap indirect block */ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, addr, nrows, NULL, 0, FALSE, H5AC__READ_ONLY_FLAG, &did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block"); /* Print the information about the heap's indirect block */ H5HF_iblock_print(iblock, FALSE, stream, indent, fwidth); @@ -741,7 +741,7 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) /* Dump section-specific debugging information */ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't dump section's debugging info") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't dump section's debugging info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -775,11 +775,11 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent, int fwidth /* Load the fractal heap header */ if (NULL == (hdr = H5HF__hdr_protect(f, fh_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header"); /* Initialize the free space information for the heap */ if (H5HF__space_start(hdr, FALSE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space"); /* If there is a free space manager for the heap, iterate over them */ if (hdr->fspace) { @@ -793,11 +793,11 @@ H5HF_sects_debug(H5F_t *f, haddr_t fh_addr, FILE *stream, int indent, int fwidth /* Iterate over all the free space sections */ if (H5FS_sect_iterate(f, hdr->fspace, H5HF_sects_debug_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space"); /* Close the free space information */ if (H5HF__space_close(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info"); } /* end if */ done: diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 494e6e3..6b37f98 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -96,7 +96,8 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p * Allocate file and memory data structures. */ if (NULL == (dblock = H5FL_MALLOC(H5HF_direct_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fractal heap direct block") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed for fractal heap direct block"); /* Reset the metadata cache info for the heap header */ memset(&dblock->cache_info, 0, sizeof(H5AC_info_t)); @@ -104,7 +105,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Share common heap information */ dblock->hdr = hdr; if (H5HF__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header"); /* Set info for direct block */ if (par_iblock) { @@ -128,7 +129,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Allocate buffer for block */ /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); memset(dblock->blk, 0, dblock->size); dblock->write_buf = NULL; @@ -138,19 +139,19 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p if (H5F_USE_TMP_SPACE(hdr->f)) { if (HADDR_UNDEF == (dblock_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)dblock->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap direct block") + "file allocation failed for fractal heap direct block"); } /* end if */ else { if (HADDR_UNDEF == (dblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_DBLOCK, (hsize_t)dblock->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap direct block") + "file allocation failed for fractal heap direct block"); } /* end else */ /* Attach to parent indirect block, if there is one */ dblock->parent = par_iblock; if (dblock->parent) { if (H5HF__man_iblock_attach(dblock->parent, par_entry, dblock_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach direct block to parent indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach direct block to parent indirect block"); dblock->fd_parent = par_iblock; } /* end if */ else @@ -160,7 +161,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Create a new 'single' section for the free space in the block */ if (NULL == (sec_node = H5HF__sect_single_new((dblock->block_off + H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)), free_space, dblock->parent, dblock->par_entry))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for new direct block's free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for new direct block's free space"); /* Check what to do with section node */ if (ret_sec_node) @@ -169,16 +170,16 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p else { /* Add new free space to the heap's list of space */ if (H5HF__space_add(hdr, sec_node, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list"); } /* end else */ /* Cache the new fractal heap direct block */ if (H5AC_insert_entry(hdr->f, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache"); /* Increase the allocated heap size */ if (H5HF__hdr_inc_alloc(hdr, dblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size"); /* Set the address of of direct block, if requested */ if (addr_p) @@ -257,7 +258,7 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_ /* Reset header information back to "empty heap" state */ if (H5HF__hdr_empty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty"); } /* end if */ else { /* Adjust heap statistics */ @@ -267,13 +268,13 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock, haddr_t dblock_ if ((dblock->block_off + dblock->size) == hdr->man_iter_off) /* Move 'next block' iterator backwards (may shrink heap) */ if (H5HF__hdr_reverse_iter(hdr, dblock_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reverse 'next block' iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reverse 'next block' iterator"); /* Detach from parent indirect block */ if (dblock->parent) { /* Destroy flush dependency between direct block and parent */ if (H5AC_destroy_flush_dependency(dblock->fd_parent, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); dblock->fd_parent = NULL; /* If this is the last direct block for the indirect block, the @@ -347,7 +348,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ min_dblock_size == hdr->man_dtable.cparam.start_block_size) { /* Create new direct block at starting offset */ if (H5HF__man_dblock_create(hdr, NULL, 0, &dblock_addr, ret_sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block"); /* Point root at new direct block */ hdr->man_dtable.curr_root_rows = 0; @@ -360,7 +361,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ /* Extend heap to cover new direct block */ if (H5HF__hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block"); } /* end if */ /* Root entry already exists, allocate direct block from root indirect block */ else { @@ -372,11 +373,11 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ /* Update iterator to reflect any previous increments as well as allow for requested direct block size */ if (H5HF__hdr_update_iter(hdr, min_dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "unable to update block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "unable to update block iterator"); /* 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location"); assert(next_row < iblock->nrows); H5_CHECKED_ASSIGN(next_size, size_t, hdr->man_dtable.row_block_size[next_row], hsize_t); @@ -385,16 +386,16 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ 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") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet"); } /* end if */ /* Advance "next block" iterator to next direct block entry */ if (H5HF__hdr_inc_iter(hdr, (hsize_t)next_size, 1) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment 'next block' iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment 'next block' iterator"); /* Create new direct block at current location*/ if (H5HF__man_dblock_create(hdr, iblock, next_entry, &dblock_addr, ret_sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block"); } /* end else */ done: @@ -471,7 +472,7 @@ H5HF__man_dblock_protect(H5HF_hdr_t *hdr, haddr_t dblock_addr, size_t dblock_siz /* Protect the direct block */ if (NULL == (dblock = (H5HF_direct_t *)H5AC_protect(hdr->f, H5AC_FHEAP_DBLOCK, dblock_addr, &udata, flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap direct block"); /* Set the return value */ ret_value = dblock; @@ -515,7 +516,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_ /* Look up row & column for object */ if (H5HF__dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object"); /* Set initial indirect block info */ iblock_addr = hdr->man_dtable.table_addr; @@ -523,7 +524,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_ /* Lock root indirect block */ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, hdr->man_dtable.curr_root_rows, NULL, 0, FALSE, flags, &did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); /* Check for indirect block row */ while (row >= hdr->man_dtable.max_direct_rows) { @@ -545,7 +546,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_ /* Check if we need to (re-)create the child indirect block */ if (!H5_addr_defined(iblock_addr)) { if (H5HF__man_iblock_create(hdr, iblock, entry, nrows, nrows, &iblock_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block"); /* Indicate that the parent indirect block was modified */ cache_flags |= H5AC__DIRTIED_FLAG; @@ -554,11 +555,11 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off, H5HF_indirect_t **ret_ /* Lock child indirect block */ if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, iblock, entry, FALSE, flags, &new_did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); /* Release the current indirect block */ if (H5HF__man_iblock_unprotect(iblock, cache_flags, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); /* Switch variables to use new indirect block */ iblock = new_iblock; @@ -566,7 +567,7 @@ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object"); assert(row < iblock->nrows); /* child must be smaller than parent */ } /* end while */ @@ -611,7 +612,7 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size) /* Check the direct block's status in the metadata cache */ if (H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for direct block"); /* If the direct block is in the cache, expunge it now */ if (dblock_status & H5AC_ES__IN_CACHE) { @@ -621,7 +622,7 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size) /* Evict the direct block from the metadata cache */ if (H5AC_expunge_entry(f, H5AC_FHEAP_DBLOCK, dblock_addr, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove direct block from cache") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "unable to remove direct block from cache"); } /* end if */ /* Check if the direct block is NOT currently allocated in temp. file space */ @@ -639,7 +640,7 @@ H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr, hsize_t dblock_size) * so we just release the file space here, directly. -QAK) */ if (H5MF_xfree(f, H5FD_MEM_FHEAP_DBLOCK, dblock_addr, dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block file space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap direct block file space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -669,11 +670,11 @@ H5HF__man_dblock_dest(H5HF_direct_t *dblock) /* Decrement reference count on shared fractal heap info */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header"); if (dblock->parent) if (H5HF__iblock_decr(dblock->parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared indirect block") + "can't decrement reference count on shared indirect block"); /* Free block's buffer */ dblock->blk = H5FL_BLK_FREE(direct_block, dblock->blk); diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c index 2cca70a..f03060d 100644 --- a/src/H5HFdtable.c +++ b/src/H5HFdtable.c @@ -97,16 +97,16 @@ H5HF__dtable_init(H5HF_dtable_t *dtable) /* Build table of block sizes for each row */ if (NULL == (dtable->row_block_size = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block size table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block size table"); if (NULL == (dtable->row_block_off = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block offset table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't create doubling table block offset table"); if (NULL == (dtable->row_tot_dblock_free = (hsize_t *)H5MM_malloc(dtable->max_root_rows * sizeof(hsize_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "can't create doubling table total direct block free space table") + "can't create doubling table total direct block free space table"); if (NULL == (dtable->row_max_dblock_free = (size_t *)H5MM_malloc(dtable->max_root_rows * sizeof(size_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "can't create doubling table max. direct block free space table") + "can't create doubling table max. direct block free space table"); tmp_block_size = dtable->cparam.start_block_size; acc_block_off = dtable->cparam.start_block_size * dtable->cparam.width; dtable->row_block_size[0] = dtable->cparam.start_block_size; diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index 28346c0..d74d3a3 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -105,7 +105,7 @@ H5HF__hdr_alloc(H5F_t *f) /* Allocate space for the shared information */ if (NULL == (hdr = H5FL_CALLOC(H5HF_hdr_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "allocation failed for fractal heap shared header"); /* Set the internal parameters for the heap */ hdr->f = f; @@ -192,7 +192,7 @@ H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr) /* Compute/cache some values */ hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index); if (H5HF__dtable_init(&hdr->man_dtable) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info"); /* Set the size of heap IDs */ hdr->heap_len_size = @@ -234,20 +234,20 @@ H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr) } /* end if */ else if (H5HF__hdr_compute_free_space(hdr, u) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't initialize direct block free space for indirect block") + "can't initialize direct block free space for indirect block"); } /* end for */ /* Initialize the block iterator for searching for free space */ if (H5HF__man_iter_init(&hdr->next_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator"); /* Initialize the information for tracking 'huge' objects */ if (H5HF__huge_init(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects"); /* Initialize the information for tracking 'tiny' objects */ if (H5HF__tiny_init(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -276,11 +276,11 @@ H5HF__hdr_finish_init(H5HF_hdr_t *hdr) /* First phase of header final initialization */ if (H5HF__hdr_finish_init_phase1(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization"); /* Second phase of header final initialization */ if (H5HF__hdr_finish_init_phase2(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -313,35 +313,35 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam) #ifndef NDEBUG /* Check for valid parameters */ if (cparam->managed.width == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width must be greater than zero"); if (cparam->managed.width > H5HF_WIDTH_LIMIT) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width too large"); if (!POWER_OF_TWO(cparam->managed.width)) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "width not power of two"); if (cparam->managed.start_block_size == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size must be greater than zero"); if (!POWER_OF_TWO(cparam->managed.start_block_size)) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "starting block size not power of two"); if (cparam->managed.max_direct_size == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size must be greater than zero"); if (cparam->managed.max_direct_size > H5HF_MAX_DIRECT_SIZE_LIMIT) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size too large"); if (!POWER_OF_TWO(cparam->managed.max_direct_size)) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. direct block size not power of two"); if (cparam->managed.max_direct_size < cparam->max_man_size) HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, - "max. direct block size not large enough to hold all managed blocks") + "max. direct block size not large enough to hold all managed blocks"); if (cparam->managed.max_index == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size must be greater than zero"); #endif /* NDEBUG */ /* Allocate & basic initialization for the shared header */ if (NULL == (hdr = H5HF__hdr_alloc(f))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info"); #ifndef NDEBUG if (cparam->managed.max_index > (unsigned)(8 * hdr->sizeof_size)) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, "max. heap size too large for file"); #endif /* NDEBUG */ /* Set the creation parameters for the heap */ @@ -362,7 +362,7 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam) /* (doesn't need ID length set up) */ if (H5HF__hdr_finish_init_phase1(hdr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, - "can't finish phase #1 of header final initialization") + "can't finish phase #1 of header final initialization"); /* Copy any I/O filter pipeline */ /* (This code is not in the "finish init phase" routines because those @@ -372,26 +372,26 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam) if (cparam->pline.nused > 0) { /* Check if the filters in the DCPL can be applied to this dataset */ if (H5Z_can_apply_direct(&(cparam->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap"); /* Mark the filters as checked */ hdr->checked_filters = TRUE; /* Make the "set local" filter callbacks for this dataset */ if (H5Z_set_local_direct(&(cparam->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters"); /* Copy the I/O filter pipeline from the creation parameters to the header */ if (NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline"); /* Set the version for the I/O pipeline message */ if (H5O_pline_set_version(hdr->f, &(hdr->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set version of I/O filter pipeline"); /* Compute the I/O filters' encoded size */ if (0 == (hdr->filter_len = (unsigned)H5O_msg_raw_size(hdr->f, H5O_PLINE_ID, FALSE, &(hdr->pline)))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGETSIZE, HADDR_UNDEF, "can't get I/O filter pipeline size"); /* Compute size of header on disk */ hdr->heap_size = H5HF_HEADER_SIZE(hdr) /* Base header size */ @@ -436,10 +436,10 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam) /* Check boundaries */ if (cparam->id_len < (1 + hdr->heap_off_size + hdr->heap_len_size)) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF, - "ID length not large enough to hold object IDs") + "ID length not large enough to hold object IDs"); else if (cparam->id_len > H5HF_MAX_ID_LEN) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, HADDR_UNDEF, - "ID length too large to store tiny object lengths") + "ID length too large to store tiny object lengths"); /* Use the requested size for the heap ID */ hdr->id_len = cparam->id_len; @@ -450,22 +450,22 @@ H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam) /* (needs ID and filter lengths set up) */ if (H5HF__hdr_finish_init_phase2(hdr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, - "can't finish phase #2 of header final initialization") + "can't finish phase #2 of header final initialization"); /* Extra checking for possible gap between max. direct block size minus * overhead and "huge" object size */ dblock_overhead = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr); if ((cparam->managed.max_direct_size - dblock_overhead) < cparam->max_man_size) HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, HADDR_UNDEF, - "max. direct block size not large enough to hold all managed blocks") + "max. direct block size not large enough to hold all managed blocks"); /* Allocate space for the header on disk */ if (HADDR_UNDEF == (hdr->heap_addr = H5MF_alloc(f, H5FD_MEM_FHEAP_HDR, (hsize_t)hdr->heap_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header"); /* Cache the new fractal heap header */ if (H5AC_insert_entry(f, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache"); /* Set address of heap header to return */ ret_value = hdr->heap_addr; @@ -508,7 +508,7 @@ H5HF__hdr_protect(H5F_t *f, haddr_t addr, unsigned flags) /* Lock the heap header into memory */ if (NULL == (hdr = (H5HF_hdr_t *)H5AC_protect(f, H5AC_FHEAP_HDR, addr, &cache_udata, flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap header"); /* Set the header's address */ hdr->heap_addr = addr; @@ -545,7 +545,7 @@ H5HF__hdr_incr(H5HF_hdr_t *hdr) /* Mark header as un-evictable when a block is depending on it */ if (hdr->rc == 0) if (H5AC_pin_protected_entry(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header"); /* Increment reference count on shared header */ hdr->rc++; @@ -581,7 +581,7 @@ H5HF__hdr_decr(H5HF_hdr_t *hdr) if (hdr->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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header"); } /* end if */ done: @@ -657,11 +657,11 @@ H5HF__hdr_dirty(H5HF_hdr_t *hdr) /* Resize pinned header in cache if I/O filter is present. */ if (hdr->filter_len > 0) if (H5AC_resize_entry(hdr, (size_t)hdr->heap_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header"); /* Mark header as dirty in cache */ if (H5AC_mark_entry_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -694,7 +694,7 @@ H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -730,7 +730,7 @@ H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -786,7 +786,7 @@ H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, /* Set up "next block" iterator at correct location */ if (H5HF__man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator"); /* Set the offset of the iterator in the heap */ hdr->man_iter_off = curr_off; @@ -818,7 +818,7 @@ H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off) /* Reset "next block" iterator */ if (H5HF__man_iter_reset(&hdr->next_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator"); /* Set the offset of the iterator in the heap */ hdr->man_iter_off = curr_off; @@ -860,12 +860,12 @@ H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start_e /* Advance the new block iterator */ if (H5HF__hdr_inc_iter(hdr, sect_size, nentries) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size"); /* Add 'indirect' section for blocks skipped in this row */ if (H5HF__sect_indirect_add(hdr, iblock, start_entry, nentries) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't create indirect section for indirect block's free space") + "can't create indirect section for indirect block's free space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -899,7 +899,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Check for creating first indirect block */ if (hdr->man_dtable.curr_root_rows == 0) { if (H5HF__man_iblock_root_create(hdr, min_dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to create root indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to create root indirect block"); } /* end if */ else { H5HF_indirect_t *iblock; /* Pointer to indirect block */ @@ -915,12 +915,12 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) if (!H5HF__man_iter_ready(&hdr->next_block)) { /* Start iterator with previous offset of iterator */ if (H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location"); } /* end if */ /* Get information about current iterator location */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location"); /* Check for skipping over blocks in the current block */ if (min_dblock_row > next_row && next_row < iblock->nrows) { @@ -936,11 +936,12 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Add skipped direct blocks to heap's free space */ if (H5HF__hdr_skip_blocks(hdr, iblock, next_entry, skip_entries) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space"); /* Get information about new iterator location */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, + "unable to retrieve current block iterator location"); } /* end if */ do { @@ -953,23 +954,23 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Check for needing to expand root indirect block */ if (iblock->parent == NULL) { if (H5HF__man_iblock_root_double(hdr, min_dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to double root indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "unable to double root indirect block"); } /* end if */ else { /* Move iterator up one level */ if (H5HF__man_iter_up(&hdr->next_block) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, - "unable to advance current block iterator location") + "unable to advance current block iterator location"); /* Increment location of next block at this level */ if (H5HF__man_iter_next(hdr, &hdr->next_block, 1) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location"); } /* end else */ /* Get information about new iterator location */ 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") + "unable to retrieve current block iterator location"); /* Indicate that we walked up */ walked_up = TRUE; @@ -1005,7 +1006,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Add skipped indirect blocks to heap's free space */ if (H5HF__hdr_skip_blocks(hdr, iblock, next_entry, (child_entry - next_entry)) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't add skipped blocks to heap's free space") + "can't add skipped blocks to heap's free space"); } /* end if */ else { H5HF_indirect_t *new_iblock; /* Pointer to new indirect block */ @@ -1016,19 +1017,19 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) if (H5HF__man_iblock_create(hdr, iblock, next_entry, child_nrows, child_nrows, &new_iblock_addr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, - "can't allocate fractal heap indirect block") + "can't allocate fractal heap indirect block"); /* Lock new indirect block */ if (NULL == (new_iblock = H5HF__man_iblock_protect(hdr, new_iblock_addr, child_nrows, iblock, next_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, - "unable to protect fractal heap indirect block") + "unable to protect fractal heap indirect block"); /* Move iterator down one level (pins indirect block) */ if (H5HF__man_iter_down(&hdr->next_block, new_iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, - "unable to advance current block iterator location") + "unable to advance current block iterator location"); /* Check for skipping over rows and add free section for skipped rows */ if (min_dblock_size > hdr->man_dtable.cparam.start_block_size) { @@ -1040,19 +1041,19 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Add skipped blocks to heap's free space */ if (H5HF__hdr_skip_blocks(hdr, new_iblock, 0, new_entry) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't add skipped blocks to heap's free space") + "can't add skipped blocks to heap's free space"); } /* end if */ /* Unprotect child indirect block */ if (H5HF__man_iblock_unprotect(new_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, - "unable to release fractal heap indirect block") + "unable to release fractal heap indirect block"); } /* end else */ /* Get information about new iterator location */ 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") + "unable to retrieve current block iterator location"); /* Indicate that we walked down */ walked_down = TRUE; @@ -1089,7 +1090,7 @@ H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries) /* Advance the iterator for the current location within the indirect block */ if (hdr->next_block.curr) if (H5HF__man_iter_next(hdr, &hdr->next_block, nentries) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location"); /* Increment the offset of the iterator in the heap */ hdr->man_iter_off += adv_size; @@ -1128,13 +1129,13 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) if (!H5HF__man_iter_ready(&hdr->next_block)) /* Start iterator with previous offset of iterator */ if (H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location"); /* Walk backwards through heap, looking for direct block to place iterator after */ /* Get information about current iterator location */ if (H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information"); /* Move current iterator position backwards once */ curr_entry--; @@ -1160,12 +1161,12 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) /* Move iterator to parent of current block */ if (H5HF__man_iter_up(&hdr->next_block) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, - "unable to move current block iterator location up") + "unable to move current block iterator location up"); /* Get information about current iterator location */ if (H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "unable to retrieve current block iterator information") + "unable to retrieve current block iterator information"); /* Move current iterator position backwards once */ curr_entry--; @@ -1179,7 +1180,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) /* Reset 'next block' iterator */ if (H5HF__man_iter_reset(&hdr->next_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator"); } /* end else */ } /* end if */ else { @@ -1195,7 +1196,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) /* Set the current location of the iterator to next entry after the existing direct block */ if (H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location"); /* Update iterator offset */ hdr->man_iter_off = iblock->block_off; @@ -1218,16 +1219,16 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) child_nrows, iblock, curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, - "unable to protect fractal heap indirect block") + "unable to protect fractal heap indirect block"); /* Set the current location of the iterator */ if (H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location"); /* Walk down into child indirect block (pins child block) */ if (H5HF__man_iter_down(&hdr->next_block, child_iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, - "unable to advance current block iterator location") + "unable to advance current block iterator location"); /* Update iterator location */ iblock = child_iblock; @@ -1236,7 +1237,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr) /* Unprotect child indirect block */ if (H5HF__man_iblock_unprotect(child_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, - "unable to release fractal heap indirect block") + "unable to release fractal heap indirect block"); /* Note that we walked down */ walked_down = TRUE; @@ -1270,7 +1271,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr) /* Reset block iterator, if necessary */ if (H5HF__man_iter_ready(&hdr->next_block)) if (H5HF__man_iter_reset(&hdr->next_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator"); /* Shrink managed heap size */ hdr->man_size = 0; @@ -1288,7 +1289,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1317,12 +1318,12 @@ H5HF__hdr_free(H5HF_hdr_t *hdr) /* Free the block size lookup table for the doubling table */ if (H5HF__dtable_dest(&hdr->man_dtable) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table"); /* Release any I/O pipeline filter information */ if (hdr->pline.nused) if (H5O_msg_reset(H5O_PLINE_ID, &(hdr->pline)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to reset I/O pipeline message") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to reset I/O pipeline message"); /* Free the shared info itself */ hdr = H5FL_FREE(H5HF_hdr_t, hdr); @@ -1360,7 +1361,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr) /* Check the heap header's status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, hdr->heap_addr, &hdr_status) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to check metadata cache status for heap header"); /* Sanity checks on heap header */ assert(hdr_status & H5AC_ES__IN_CACHE); @@ -1375,7 +1376,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr) if (H5_addr_defined(hdr->fs_addr)) /* Delete free space manager for heap */ if (H5HF__space_delete(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap free space manager") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap free space manager"); /* Check for root direct/indirect block */ if (H5_addr_defined(hdr->man_dtable.table_addr)) { @@ -1396,14 +1397,14 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr) /* Delete root direct block */ if (H5HF__man_dblock_delete(hdr->f, hdr->man_dtable.table_addr, dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to release fractal heap root direct block"); } /* end if */ else { /* Delete root indirect block */ if (H5HF__man_iblock_delete(hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL, 0) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, - "unable to release fractal heap root indirect block") + "unable to release fractal heap root indirect block"); } /* end else */ } /* end if */ @@ -1412,7 +1413,7 @@ H5HF__hdr_delete(H5HF_hdr_t *hdr) /* Delete huge objects in heap and their tracker */ if (H5HF__huge_delete(hdr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, - "unable to release fractal heap 'huge' objects and tracker") + "unable to release fractal heap 'huge' objects and tracker"); } /* end if */ /* Indicate that the heap header should be deleted & file space freed */ diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index 4f18c4f..ddf5684 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -142,12 +142,13 @@ H5HF__huge_bt2_create(H5HF_hdr_t *hdr) /* Create v2 B-tree for tracking 'huge' objects */ if (NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, &bt2_cparam, hdr->f))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, + "can't create v2 B-tree for tracking 'huge' heap objects"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(hdr->huge_bt2, &hdr->huge_bt2_addr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "can't get v2 B-tree address for tracking 'huge' heap objects") + "can't get v2 B-tree address for tracking 'huge' heap objects"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -244,7 +245,7 @@ H5HF__huge_new_id(H5HF_hdr_t *hdr) /* Check for wrapping around 'huge' object ID space */ if (hdr->huge_ids_wrapped) /* Fail for now - eventually should iterate through v2 B-tree, looking for available ID */ - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, 0, "wrapping 'huge' object IDs not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, 0, "wrapping 'huge' object IDs not supported yet"); else { /* Get new 'huge' object ID to use for object */ /* (avoids using ID 0) */ @@ -296,7 +297,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Go create (& open) v2 B-tree */ if (H5HF__huge_bt2_create(hdr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, - "can't create v2 B-tree for tracking 'huge' heap objects") + "can't create v2 B-tree for tracking 'huge' heap objects"); } /* end if */ else { /* Check if v2 B-tree is open yet */ @@ -304,7 +305,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* end if */ } /* end else */ assert(hdr->huge_bt2); @@ -321,14 +322,14 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Allocate buffer to perform I/O filtering on */ write_size = obj_size; if (NULL == (write_buf = H5MM_malloc(write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer"); H5MM_memcpy(write_buf, obj, write_size); /* Push direct block data through I/O filter pipeline */ nbytes = write_size; if (H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &write_size, &write_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed"); /* Update size of object on disk */ write_size = nbytes; @@ -340,11 +341,11 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Allocate space in the file for storing the 'huge' object */ if (HADDR_UNDEF == (obj_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, (hsize_t)write_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap huge object") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap huge object"); /* Write the object's data to disk */ if (H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, write_size, write_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed"); /* Release buffer for writing, if we had one */ if (write_buf != obj) { @@ -366,7 +367,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Insert record for object in v2 B-tree */ if (H5B2_insert(hdr->huge_bt2, &obj_rec) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, - "couldn't insert object tracking record in v2 B-tree") + "couldn't insert object tracking record in v2 B-tree"); /* Encode ID for user */ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE; @@ -385,7 +386,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Insert record for object in v2 B-tree */ if (H5B2_insert(hdr->huge_bt2, &obj_rec) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, - "couldn't insert object tracking record in v2 B-tree") + "couldn't insert object tracking record in v2 B-tree"); /* Encode ID for user */ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE; @@ -401,7 +402,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Get new ID for object */ if (0 == (new_id = H5HF__huge_new_id(hdr))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't generate new ID for object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't generate new ID for object"); if (hdr->filter_len > 0) { /* Initialize record for object in v2 B-tree */ @@ -426,7 +427,8 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Insert record for tracking object in v2 B-tree */ if (H5B2_insert(hdr->huge_bt2, ins_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "couldn't insert object tracking record in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, + "couldn't insert object tracking record in v2 B-tree"); /* Encode ID for user */ *id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE; @@ -439,7 +441,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -497,7 +499,7 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p) /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* end if */ if (hdr->filter_len > 0) { @@ -510,9 +512,9 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p) /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's length */ *obj_len_p = (size_t)found_rec.obj_size; @@ -526,9 +528,9 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p) /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's length */ *obj_len_p = (size_t)found_rec.len; @@ -583,7 +585,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p) /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* end if */ if (hdr->filter_len > 0) { @@ -596,9 +598,9 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p) /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's address & length */ obj_addr = found_rec.addr; @@ -612,9 +614,9 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p) /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's address & length */ obj_addr = found_rec.addr; @@ -679,7 +681,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* end if */ if (hdr->filter_len > 0) { @@ -692,9 +694,9 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's address & length */ obj_addr = found_rec.addr; @@ -710,9 +712,9 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's address & length */ obj_addr = found_rec.addr; @@ -723,7 +725,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope /* Set up buffer for reading */ if (hdr->filter_len > 0 || !is_read) { if (NULL == (read_buf = H5MM_malloc((size_t)obj_size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer"); } /* end if */ else read_buf = op_data; @@ -731,7 +733,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope /* Read the object's (possibly filtered) data from the file */ /* (reads directly into application's buffer if no filters are present) */ if (H5F_block_read(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, (size_t)obj_size, read_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_READERROR, FAIL, "can't read 'huge' object's data from the file") + HGOTO_ERROR(H5E_HEAP, H5E_READERROR, FAIL, "can't read 'huge' object's data from the file"); /* Check for I/O pipeline filter on heap */ if (hdr->filter_len > 0) { @@ -747,7 +749,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope read_size = nbytes = obj_size; if (H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &read_size, &read_buf) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "input filter failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "input filter failed"); obj_size = nbytes; } /* end if */ @@ -765,7 +767,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope read_buf = H5MM_xfree(read_buf); /* Indicate error */ - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed"); } /* end if */ } /* end if */ @@ -806,7 +808,8 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) /* Check for filters on the heap */ if (hdr->filter_len > 0) - HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'huge' object with filters not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, + "modifying 'huge' object with filters not supported yet"); /* Skip over the flag byte */ id++; @@ -830,7 +833,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* Get ID for looking up 'huge' object in v2 B-tree */ @@ -838,9 +841,9 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) /* Look up object in v2 B-tree */ if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFIND, FAIL, "can't check for object in v2 B-tree"); if (!found) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "can't find object in v2 B-tree"); /* Retrieve the object's address & length */ obj_addr = found_rec.addr; @@ -850,7 +853,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) /* Write the object's data to the file */ /* (writes directly from application's buffer) */ if (H5F_block_write(hdr->f, H5FD_MEM_FHEAP_HUGE_OBJ, obj_addr, obj_size, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "writing 'huge' object to file failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -881,7 +884,7 @@ H5HF__huge_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj) /* Call the internal 'op' routine */ if (H5HF__huge_op_real(hdr, id, TRUE, NULL, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -912,7 +915,7 @@ H5HF__huge_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d /* Call the internal 'op' routine routine */ if (H5HF__huge_op_real(hdr, id, FALSE, op, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -947,7 +950,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Open existing v2 B-tree */ if (NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' heap objects") + "unable to open v2 B-tree for tracking 'huge' heap objects"); } /* end if */ /* Skip over the flag byte */ @@ -969,7 +972,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Remove the record for tracking the 'huge' object from the v2 B-tree */ /* (space in the file for the object is freed in the 'remove' callback) */ if (H5B2_remove(hdr->huge_bt2, &search_rec, H5HF__huge_bt2_filt_dir_remove, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree"); } /* end if */ else { H5HF_huge_bt2_dir_rec_t search_rec; /* Record for searching for object */ @@ -982,7 +985,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Remove the record for tracking the 'huge' object from the v2 B-tree */ /* (space in the file for the object is freed in the 'remove' callback) */ if (H5B2_remove(hdr->huge_bt2, &search_rec, H5HF__huge_bt2_dir_remove, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree"); } /* end else */ } /* end if */ else { @@ -995,7 +998,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Remove the record for tracking the 'huge' object from the v2 B-tree */ /* (space in the file for the object is freed in the 'remove' callback) */ if (H5B2_remove(hdr->huge_bt2, &search_rec, H5HF__huge_bt2_filt_indir_remove, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree"); } /* end if */ else { H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */ @@ -1006,7 +1009,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Remove the record for tracking the 'huge' object from the v2 B-tree */ /* (space in the file for the object is freed in the 'remove' callback) */ if (H5B2_remove(hdr->huge_bt2, &search_rec, H5HF__huge_bt2_indir_remove, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove object from B-tree"); } /* end else */ } /* end else */ @@ -1016,7 +1019,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1050,7 +1053,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr) /* Close v2 B-tree index */ if (H5B2_close(hdr->huge_bt2) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree"); hdr->huge_bt2 = NULL; } /* end if */ @@ -1064,7 +1067,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr) /* Delete the v2 B-tree */ /* (any v2 B-tree class will work here) */ if (H5B2_delete(hdr->f, hdr->huge_bt2_addr, hdr->f, NULL, NULL) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree"); /* Reset the information about 'huge' objects in the file */ hdr->huge_bt2_addr = HADDR_UNDEF; @@ -1073,7 +1076,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); } /* end if */ done: @@ -1126,7 +1129,7 @@ H5HF__huge_delete(H5HF_hdr_t *hdr) /* Delete the v2 B-tree */ if (H5B2_delete(hdr->f, hdr->huge_bt2_addr, hdr->f, op, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index b126bf0..db9901f 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -100,7 +100,7 @@ H5HF__iblock_pin(H5HF_indirect_t *iblock) /* Mark block as un-evictable */ if (H5AC_pin_protected_entry(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block"); /* If this indirect block has a parent, update it's child iblock pointer */ if (iblock->parent) { @@ -162,7 +162,7 @@ H5HF__iblock_unpin(H5HF_indirect_t *iblock) /* Mark block as evictable again */ if (H5AC_unpin_entry(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -191,7 +191,7 @@ H5HF__iblock_incr(H5HF_indirect_t *iblock) /* Mark block as un-evictable when a child block is depending on it */ if (iblock->rc == 0) if (H5HF__iblock_pin(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block"); /* Increment reference count on shared indirect block */ iblock->rc++; @@ -264,12 +264,12 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock) if (!iblock->removed_from_cache) { /* Unpin the indirect block, making it evictable again */ if (H5HF__iblock_unpin(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block"); } /* end if */ else { /* Destroy the indirect block */ if (H5HF__man_iblock_dest(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block"); } /* end else */ } /* end if */ @@ -298,7 +298,7 @@ H5HF__iblock_dirty(H5HF_indirect_t *iblock) /* Mark indirect block as dirty in cache */ if (H5AC_mark_entry_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -347,14 +347,14 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Allocate root indirect block */ if (H5HF__man_iblock_create(hdr, NULL, 0, nrows, hdr->man_dtable.max_root_rows, &iblock_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap indirect block"); /* Move current direct block (used as root) into new indirect block */ /* Lock new indirect block */ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, NULL, 0, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); /* Check if there's already a direct block as root) */ have_direct_block = H5_addr_defined(hdr->man_dtable.table_addr); @@ -365,7 +365,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) if (NULL == (dblock = H5HF__man_dblock_protect(hdr, hdr->man_dtable.table_addr, hdr->man_dtable.cparam.start_block_size, NULL, 0, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block"); /* Attach direct block to new root indirect block */ dblock->parent = iblock; @@ -373,17 +373,17 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Destroy flush dependency between direct block and header */ if (H5AC_destroy_flush_dependency(dblock->fd_parent, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); dblock->fd_parent = NULL; /* Create flush dependency between direct block and new root indirect block */ if (H5AC_create_flush_dependency(iblock, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); dblock->fd_parent = iblock; if (H5HF__man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, - "can't attach root direct block to parent indirect block") + "can't attach root direct block to parent indirect block"); /* Check for I/O filters on this heap */ if (hdr->filter_len > 0) { @@ -399,12 +399,12 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Scan free space sections to set any 'parent' pointers to new indirect block */ if (H5HF__space_create_root(hdr, iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, - "can't set free space section info to new root indirect block") + "can't set free space section info to new root indirect block"); /* Unlock first (previously the root) direct block */ if (H5AC_unprotect(hdr->f, H5AC_FHEAP_DBLOCK, hdr->man_dtable.table_addr, dblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap direct block"); dblock = NULL; } /* end if */ @@ -412,22 +412,22 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) if (H5HF__hdr_start_iter(hdr, iblock, (hsize_t)(have_direct_block ? hdr->man_dtable.cparam.start_block_size : 0), have_direct_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator"); /* Check for skipping over direct blocks, in order to get to large enough block */ if (min_dblock_size > hdr->man_dtable.cparam.start_block_size) /* Add skipped blocks to heap's free space */ if (H5HF__hdr_skip_blocks(hdr, iblock, have_direct_block, ((nrows - 1) * hdr->man_dtable.cparam.width) - have_direct_block) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space"); /* Mark indirect block as modified */ if (H5HF__iblock_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty"); /* Unprotect root indirect block (it's pinned by the iterator though) */ if (H5HF__man_iblock_unprotect(iblock, H5AC__DIRTIED_FLAG, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); iblock = NULL; /* Point heap header at new indirect block */ @@ -445,7 +445,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Extend heap to cover new root indirect block */ if (H5HF__hdr_adjust_heap(hdr, hdr->man_dtable.row_block_off[nrows], (hssize_t)acc_dblock_free) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -482,7 +482,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Get "new block" iterator information */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location"); next_size = hdr->man_dtable.row_block_size[next_row]; /* Make certain the iterator is at the root indirect block */ @@ -515,7 +515,8 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) if (!H5F_IS_TMP_ADDR(hdr->f, iblock->addr)) /* Free previous indirect block disk space */ if (H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, iblock->addr, (hsize_t)iblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block file space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, + "unable to free fractal heap indirect block file space"); /* Compute size of buffer needed for new indirect block */ iblock->nrows = new_nrows; @@ -525,36 +526,38 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Allocate [temporary] space for the new indirect block on disk */ if (H5F_USE_TMP_SPACE(hdr->f)) { if (HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, + "file allocation failed for fractal heap indirect block"); } /* end if */ else { if (HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, + "file allocation failed for fractal heap indirect block"); } /* end else */ /* Resize pinned indirect block in the cache, if its changed size */ if (old_iblock_size != iblock->size) { if (H5AC_resize_entry(iblock, (size_t)iblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block"); } /* end if */ /* Move object in cache, if it actually was relocated */ if (H5_addr_ne(iblock->addr, new_addr)) { if (H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move fractal heap root indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMOVE, FAIL, "unable to move fractal heap root indirect block"); iblock->addr = new_addr; } /* end if */ /* Re-allocate child block entry array */ if (NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries"); /* Check for skipping over rows and add free section for skipped rows */ if (skip_direct_rows) /* Add skipped blocks to heap's free space */ if (H5HF__hdr_skip_blocks(hdr, iblock, next_entry, (new_next_entry - next_entry)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space"); /* Initialize new direct block entries in rows added */ acc_dblock_free = 0; @@ -577,7 +580,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Re-allocate filtered direct block entry array */ if (NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents, (size_t)(dir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries"); /* Initialize new entries allocated */ for (u = (old_nrows * hdr->man_dtable.cparam.width); u < (dir_rows * hdr->man_dtable.cparam.width); @@ -599,7 +602,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) if (NULL == (iblock->child_iblocks = H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks, (size_t)(indir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries"); /* Compute the previous # of indirect rows in this block */ if (old_nrows < hdr->man_dtable.max_direct_rows) @@ -615,7 +618,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Mark indirect block as dirty */ if (H5HF__iblock_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty"); /* Update other shared header info */ hdr->man_dtable.curr_root_rows = new_nrows; @@ -624,7 +627,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size) /* Extend heap to cover new root indirect block */ if (H5HF__hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], (hssize_t)acc_dblock_free) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -670,7 +673,8 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) if (!H5F_IS_TMP_ADDR(hdr->f, iblock->addr)) /* Free previous indirect block disk space */ if (H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, iblock->addr, (hsize_t)iblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to free fractal heap indirect block file space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, + "unable to free fractal heap indirect block file space"); /* Compute free space in rows to delete */ acc_dblock_free = 0; @@ -686,30 +690,32 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) /* Allocate [temporary] space for the new indirect block on disk */ if (H5F_USE_TMP_SPACE(hdr->f)) { if (HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, + "file allocation failed for fractal heap indirect block"); } /* end if */ else { if (HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, + "file allocation failed for fractal heap indirect block"); } /* end else */ /* Resize pinned indirect block in the cache, if it has changed size */ if (old_size != iblock->size) { if (H5AC_resize_entry(iblock, (size_t)iblock->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap indirect block"); } /* end if */ /* Move object in cache, if it actually was relocated */ if (H5_addr_ne(iblock->addr, new_addr)) { if (H5AC_move_entry(hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, new_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSPLIT, FAIL, "unable to move fractal heap root indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSPLIT, FAIL, "unable to move fractal heap root indirect block"); iblock->addr = new_addr; } /* end if */ /* Re-allocate child block entry array */ if (NULL == (iblock->ents = H5FL_SEQ_REALLOC(H5HF_indirect_ent_t, iblock->ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for direct entries"); /* Check for needing to re-allocate filtered entry array */ if (hdr->filter_len > 0 && new_nrows < hdr->man_dtable.max_direct_rows) { @@ -717,7 +723,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) if (NULL == (iblock->filt_ents = H5FL_SEQ_REALLOC(H5HF_indirect_filt_ent_t, iblock->filt_ents, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for filtered direct entries"); } /* end if */ /* Check for needing to re-allocate child iblock pointer array */ @@ -734,7 +740,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) H5FL_SEQ_REALLOC(H5HF_indirect_ptr_t, iblock->child_iblocks, (size_t)(indir_rows * hdr->man_dtable.cparam.width)))) HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, - "memory allocation failed for filtered direct entries") + "memory allocation failed for filtered direct entries"); } /* end if */ else iblock->child_iblocks = @@ -743,7 +749,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) /* Mark indirect block as dirty */ if (H5HF__iblock_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty"); /* Update other shared header info */ hdr->man_dtable.curr_root_rows = new_nrows; @@ -752,7 +758,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock) /* Shrink heap to only cover new root indirect block */ if (H5HF__hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], -(hssize_t)acc_dblock_free) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce space to cover root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce space to cover root direct block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -794,7 +800,7 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock) /* Get pointer to last direct block */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block"); assert(dblock->parent == root_iblock); assert(dblock->par_entry == 0); @@ -807,18 +813,18 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock) /* Destroy flush dependency between old root iblock and new root direct block */ if (H5AC_destroy_flush_dependency(dblock->fd_parent, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); dblock->fd_parent = NULL; /* Detach direct block from parent */ if (H5HF__man_iblock_detach(dblock->parent, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach direct block from parent indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach direct block from parent indirect block"); dblock->parent = NULL; dblock->par_entry = 0; /* Create flush dependency between header and new root direct block */ if (H5AC_create_flush_dependency(hdr, dblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); dblock->fd_parent = hdr; /* Point root at direct block */ @@ -827,16 +833,16 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock) /* Reset 'next block' iterator */ if (H5HF__hdr_reset_iter(hdr, (hsize_t)dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator"); /* Extend heap to just cover first direct block */ if (H5HF__hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block"); /* Scan free space sections to reset any 'parent' pointers */ if (H5HF__space_revert_root(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESET, FAIL, "can't reset free space section info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESET, FAIL, "can't reset free space section info"); done: if (dblock && H5AC_unprotect(hdr->f, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) @@ -882,24 +888,24 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node) (TRUE == old_sec_node->u.row.under->u.indirect.u.iblock->removed_from_cache)) /* Revive row and / or indirect section */ if (H5HF__sect_row_revive(hdr, old_sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section"); /* Get a pointer to the indirect block covering the section */ if (NULL == (iblock = H5HF__sect_row_get_iblock(old_sec_node))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve indirect block for row section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve indirect block for row section"); /* Hold indirect block in memory, until direct block can point to it */ if (H5HF__iblock_incr(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block"); iblock_held = TRUE; /* Reduce (& possibly re-add) 'row' section */ if (H5HF__sect_row_reduce(hdr, old_sec_node, &dblock_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce row section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce row section node"); /* Create direct block & single section */ if (H5HF__man_dblock_create(hdr, iblock, dblock_entry, NULL, sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't allocate fractal heap direct block"); done: /* Release hold on indirect block */ @@ -942,7 +948,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p */ if (NULL == (iblock = H5FL_MALLOC(H5HF_indirect_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for fractal heap indirect block") + "memory allocation failed for fractal heap indirect block"); /* Reset the metadata cache info for the heap header */ memset(&iblock->cache_info, 0, sizeof(H5AC_info_t)); @@ -950,7 +956,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Share common heap information */ iblock->hdr = hdr; if (H5HF__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header"); /* Set info for indirect block */ iblock->rc = 0; @@ -964,7 +970,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Allocate child block entry array */ 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, FAIL, "memory allocation failed for block entries") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries"); /* Initialize indirect block entry tables */ for (u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) @@ -980,7 +986,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Allocate & initialize indirect block filtered entry array */ if (NULL == (iblock->filt_ents = H5FL_SEQ_CALLOC(H5HF_indirect_filt_ent_t, (size_t)(dir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries"); } /* end if */ else iblock->filt_ents = NULL; @@ -995,7 +1001,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Allocate & initialize child indirect block pointer array */ if (NULL == (iblock->child_iblocks = H5FL_SEQ_CALLOC( H5HF_indirect_ptr_t, (size_t)(indir_rows * hdr->man_dtable.cparam.width)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for block entries"); } /* end if */ else iblock->child_iblocks = NULL; @@ -1004,12 +1010,12 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p if (H5F_USE_TMP_SPACE(hdr->f)) { if (HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap indirect block") + "file allocation failed for fractal heap indirect block"); } /* end if */ else { if (HADDR_UNDEF == (*addr_p = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, (hsize_t)iblock->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "file allocation failed for fractal heap indirect block") + "file allocation failed for fractal heap indirect block"); } /* end else */ iblock->addr = *addr_p; @@ -1020,7 +1026,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Attach new block to parent */ if (H5HF__man_iblock_attach(iblock->parent, par_entry, *addr_p) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, - "can't attach indirect block to parent indirect block") + "can't attach indirect block to parent indirect block"); /* Compute the indirect block's offset in the heap's address space */ /* (based on parent's block offset) */ @@ -1045,7 +1051,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock, unsigned p /* Cache the new indirect block */ if (H5AC_insert_entry(hdr->f, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache"); done: if (ret_value < 0) @@ -1147,7 +1153,7 @@ H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_n /* Protect the indirect block */ if (NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(hdr->f, H5AC_FHEAP_IBLOCK, iblock_addr, &cache_udata, flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect fractal heap indirect block"); /* Set the indirect block's address */ iblock->addr = iblock_addr; @@ -1222,7 +1228,7 @@ H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags, hbool_ /* Unprotect the indirect block */ if (H5AC_unprotect(iblock->hdr->f, H5AC_FHEAP_IBLOCK, iblock->addr, iblock, cache_flags) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); } /* end if */ done: @@ -1254,7 +1260,7 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a /* Increment the reference count on this indirect block */ if (H5HF__iblock_incr(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block"); /* Point at the child block */ iblock->ents[entry].addr = child_addr; @@ -1283,7 +1289,7 @@ H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_a /* Mark indirect block as modified */ if (H5HF__iblock_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1377,7 +1383,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) if (iblock->nchildren == 1 && H5_addr_defined(iblock->ents[0].addr)) if (H5HF__man_iblock_root_revert(iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, - "can't convert root indirect block back to root direct block") + "can't convert root indirect block back to root direct block"); /* If the indirect block wasn't removed already (by reverting it) */ if (!iblock->removed_from_cache) { @@ -1393,7 +1399,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) if (iblock->nrows > 1 && max_child_row <= (iblock->nrows / 2)) if (H5HF__man_iblock_root_halve(iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, - "can't reduce size of root indirect block") + "can't reduce size of root indirect block"); } /* end if */ } /* end if */ } /* end if */ @@ -1402,7 +1408,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) if (!iblock->removed_from_cache) { /* Mark indirect block as modified */ if (H5HF__iblock_dirty(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty"); /* Check for last child being removed from indirect block */ if (iblock->nchildren == 0) { @@ -1422,25 +1428,25 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) if (NULL == (del_iblock = H5HF__man_iblock_protect(hdr, iblock->addr, iblock->nrows, 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); 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) /* Reset header information back to "empty heap" state */ if (H5HF__hdr_empty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't make heap empty"); /* Detach from parent indirect block */ if (iblock->parent) { /* Destroy flush dependency between indirect block and parent */ if (H5AC_destroy_flush_dependency(iblock->fd_parent, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); iblock->fd_parent = NULL; /* Detach from parent indirect block */ if (H5HF__man_iblock_detach(iblock->parent, iblock->par_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block"); iblock->parent = NULL; iblock->par_entry = 0; } /* end if */ @@ -1453,7 +1459,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) * not being deleted) */ if (H5HF__iblock_decr(iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block"); iblock = NULL; /* Delete indirect block from cache, if appropriate */ @@ -1482,7 +1488,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) /* Unprotect the indirect block, with appropriate flags */ if (H5HF__man_iblock_unprotect(del_iblock, cache_flags, TRUE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); /* if took ownership, free file space & mark block as removed from cache */ if (took_ownership) { @@ -1491,7 +1497,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry) if (H5MF_xfree(hdr->f, H5FD_MEM_FHEAP_IBLOCK, del_iblock->addr, (hsize_t)del_iblock->size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, - "unable to free fractal heap indirect block file space") + "unable to free fractal heap indirect block file space"); del_iblock->addr = HADDR_UNDEF; /* Mark block as removed from the cache */ @@ -1565,7 +1571,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr /* 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); assert(iblock->nchildren > 0); assert(did_protect == TRUE); @@ -1589,7 +1595,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr /* Delete child direct block */ if (H5HF__man_dblock_delete(hdr->f, iblock->ents[entry].addr, dblock_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, - "unable to release fractal heap child direct block") + "unable to release fractal heap child direct block"); } /* end if */ else { hsize_t row_block_size; /* The size of blocks in this row */ @@ -1605,7 +1611,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr if (H5HF__man_iblock_delete(hdr, iblock->ents[entry].addr, child_nrows, iblock, entry) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, - "unable to release fractal heap child indirect block") + "unable to release fractal heap child indirect block"); } /* end else */ } /* end if */ } /* end for */ @@ -1618,7 +1624,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned iblock_nr /* Check the indirect block's status in the metadata cache */ if (H5AC_get_entry_status(hdr->f, iblock_addr, &iblock_status) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "unable to check metadata cache status for indirect block") + "unable to check metadata cache status for indirect block"); /* Check if indirect block is pinned */ assert(!(iblock_status & H5AC_ES__IS_PINNED)); @@ -1673,7 +1679,7 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n /* Protect the indirect block */ if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, nrows, par_iblock, par_entry, FALSE, H5AC__READ_ONLY_FLAG, &did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block"); /* Accumulate size of this indirect block */ *heap_size += iblock->size; @@ -1699,14 +1705,14 @@ H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr, haddr_t iblock_addr, unsigned n if (H5HF__man_iblock_size(f, hdr, iblock->ents[entry].addr, num_indirect_rows, iblock, entry, heap_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, - "unable to get fractal heap storage info for indirect block") + "unable to get fractal heap storage info for indirect block"); } /* end for */ } /* end if */ done: /* Release the indirect block */ if (iblock && H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); iblock = NULL; FUNC_LEAVE_NOAPI(ret_value) @@ -1745,7 +1751,7 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t * /* 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block"); /* Sanity check - first lookup must be an indirect block */ assert(row >= hdr->man_dtable.max_direct_rows); @@ -1769,7 +1775,7 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off, hsize_t * /* Look up row & column in new indirect block for object */ if (H5HF__dtable_lookup(&hdr->man_dtable, (block_off - par_block_off), &row, &col) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block"); } /* end while */ /* Sanity check */ @@ -1809,11 +1815,11 @@ H5HF__man_iblock_dest(H5HF_indirect_t *iblock) /* Decrement reference count on shared info */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header"); if (iblock->parent) if (H5HF__iblock_decr(iblock->parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared indirect block") + "can't decrement reference count on shared indirect block"); /* Release entry tables */ if (iblock->ents) diff --git a/src/H5HFiter.c b/src/H5HFiter.c index caa5d99..9d87cc6 100644 --- a/src/H5HFiter.c +++ b/src/H5HFiter.c @@ -129,7 +129,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o /* Allocate level structure */ if (NULL == (biter->curr = H5FL_MALLOC(H5HF_block_loc_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* 1: = offset> @@ -198,7 +198,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o if (NULL == (iblock = H5HF__man_iblock_protect(hdr, iblock_addr, iblock_nrows, iblock_parent, iblock_par_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block"); /* Make indirect block the context for the current location */ biter->curr->context = iblock; @@ -206,11 +206,11 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o /* Hold the indirect block with the location */ if (H5HF__iblock_incr(biter->curr->context) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, - "can't increment reference count on shared indirect block") + "can't increment reference count on shared indirect block"); /* Release the current indirect block */ if (H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); iblock = NULL; /* See if the location falls in a direct block row */ @@ -227,7 +227,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t o /* Allocate level structure */ if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* Link new level into iterator */ new_loc->up = biter->curr; @@ -304,7 +304,7 @@ H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indir /* Create new location for iterator */ if (NULL == (new_loc = H5FL_MALLOC(H5HF_block_loc_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* Set up location context */ new_loc->entry = start_entry; @@ -315,7 +315,7 @@ H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, H5HF_indir /* Increment reference count on indirect block */ if (H5HF__iblock_incr(new_loc->context) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block"); /* Make new location the current location */ biter->curr = new_loc; @@ -367,7 +367,7 @@ H5HF__man_iter_reset(H5HF_block_iter_t *biter) if (curr_loc->context) if (H5HF__iblock_decr(curr_loc->context) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared indirect block") + "can't decrement reference count on shared indirect block"); /* Free the current location context */ curr_loc = H5FL_FREE(H5HF_block_loc_t, curr_loc); @@ -446,7 +446,7 @@ H5HF__man_iter_up(H5HF_block_iter_t *biter) /* Release hold on current location's indirect block */ if (H5HF__iblock_decr(biter->curr->context) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block"); /* Get pointer to location context above this one */ up_loc = biter->curr->up; @@ -489,7 +489,7 @@ H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock) /* Create new location to move down to */ if (NULL == (down_loc = H5FL_MALLOC(H5HF_block_loc_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* Initialize down location */ down_loc->row = 0; @@ -500,7 +500,7 @@ H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock) /* Increment reference count on indirect block */ if (H5HF__iblock_incr(down_loc->context) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block"); /* Make down location the current location */ biter->curr = down_loc; diff --git a/src/H5HFman.c b/src/H5HFman.c index 83c1585..d5075c0 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -46,7 +46,7 @@ if (!((HDR)->checked_filters)) { \ if ((HDR)->pline.nused) \ if (H5Z_can_apply_direct(&((HDR)->pline)) < 0) \ - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap") \ + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap"); \ \ (HDR)->checked_filters = TRUE; \ } /* end if */ \ @@ -114,13 +114,13 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id) /* Look for free space */ if ((node_found = H5HF__space_find(hdr, (hsize_t)obj_size, &sec_node)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap"); /* If we didn't find a node, go create a direct block big enough to hold the requested block */ if (!node_found) /* Allocate direct block big enough to hold requested size */ if (H5HF__man_dblock_new(hdr, obj_size, &sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create fractal heap direct block"); /* Check for row section */ if (sec_node->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW || @@ -128,24 +128,24 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id) /* Allocate 'single' selection out of 'row' selection */ if (H5HF__man_iblock_alloc_row(hdr, &sec_node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't break up row section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't break up row section"); } /* end if */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section"); 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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information"); /* Lock direct block */ if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, sec_node->u.single.parent, sec_node->u.single.par_entry, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block"); /* Insert object into block */ @@ -158,7 +158,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id) /* Reduce (& possibly re-add) single section */ if (H5HF__sect_single_reduce(hdr, sec_node, obj_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce single section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce single section node"); sec_node = NULL; /* Encode the object in the block */ @@ -184,7 +184,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id) /* Reduce space available in heap (marks header dirty) */ if (H5HF__hdr_adj_free(hdr, -(ssize_t)obj_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap"); done: /* Release section node on error */ @@ -322,15 +322,15 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Check for bad offset or length */ if (obj_off == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset"); if (obj_off > hdr->man_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large"); if (obj_len == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size"); if (obj_len > hdr->man_dtable.cparam.max_direct_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block"); if (obj_len > hdr->max_man_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone"); /* Check for root direct block */ if (hdr->man_dtable.curr_root_rows == 0) { @@ -341,7 +341,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Lock direct block */ if (NULL == (dblock = H5HF__man_dblock_protect(hdr, dblock_addr, dblock_size, NULL, 0, dblock_access_flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block"); } /* end if */ else { H5HF_indirect_t *iblock; /* Pointer to indirect block */ @@ -350,7 +350,7 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Look up indirect block containing direct block */ if (H5HF__man_dblock_locate(hdr, obj_off, &iblock, &entry, &did_protect, H5AC__READ_ONLY_FLAG) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section"); /* Set direct block info */ dblock_addr = iblock->ents[entry].addr; @@ -363,9 +363,9 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Unlock indirect block */ if (H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, - "unable to release fractal heap indirect block") + "unable to release fractal heap indirect block"); - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block"); } /* end if */ /* Lock direct block */ @@ -374,14 +374,14 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Unlock indirect block */ if (H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, - "unable to release fractal heap indirect block") + "unable to release fractal heap indirect block"); - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap direct block"); } /* end if */ /* Unlock indirect block */ if (H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); iblock = NULL; } /* end else */ @@ -391,18 +391,18 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * /* Check for object's offset in the direct block prefix information */ if (blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block"); /* Check for object's length overrunning the end of the direct block */ if ((blk_off + obj_len) > dblock_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block"); /* Point to location for object */ p = dblock->blk + blk_off; /* Call the user's 'op' callback */ if (op(p, obj_len, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed"); done: /* Unlock direct block */ @@ -437,7 +437,7 @@ H5HF__man_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj) /* Call the internal 'op' routine routine */ if (H5HF__man_op_real(hdr, id, H5HF__op_read, obj, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -474,7 +474,7 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj) */ H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5HF__man_op_real(hdr, id, H5HF__op_write, (void *)obj, H5HF_OP_MODIFY) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); H5_GCC_CLANG_DIAG_ON("cast-qual") done: @@ -506,7 +506,7 @@ H5HF__man_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_da /* Call the internal 'op' routine routine */ if (H5HF__man_op_real(hdr, id, op, op_data, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -555,15 +555,15 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Check for bad offset or length */ if (obj_off == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset"); if (obj_off > hdr->man_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large"); if (obj_len == 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size"); if (obj_len > hdr->man_dtable.cparam.max_direct_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block"); if (obj_len > hdr->max_man_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object should be standalone"); /* Check for root direct block */ if (hdr->man_dtable.curr_root_rows == 0) { @@ -576,11 +576,11 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Look up indirect block containing direct block */ if (H5HF__man_dblock_locate(hdr, obj_off, &iblock, &dblock_entry, &did_protect, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section"); /* Check for offset of invalid direct block */ if (!H5_addr_defined(iblock->ents[dblock_entry].addr)) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block"); /* Set direct block info */ H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]), @@ -601,33 +601,33 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Check for object's offset in the direct block prefix information */ if (blk_off < (size_t)H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object located in prefix of direct block"); /* Check for object's length overrunning the end of the direct block */ if ((blk_off + obj_len) > dblock_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block"); /* Create free space section node */ if (NULL == (sec_node = H5HF__sect_single_new(obj_off, obj_len, iblock, dblock_entry))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for direct block's free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for direct block's free space"); /* Unlock indirect block */ if (iblock) { if (H5HF__man_iblock_unprotect(iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); iblock = NULL; } /* end if */ /* Increase space available in heap (marks header dirty) */ if (H5HF__hdr_adj_free(hdr, (ssize_t)obj_len) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap"); /* Update statistics about heap */ hdr->man_nobjs--; /* Return free space to the heap's list of space */ if (H5HF__space_add(hdr, sec_node, H5FS_ADD_RETURNED_SPACE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add direct block free space to global list"); sec_node = NULL; done: diff --git a/src/H5HFsection.c b/src/H5HFsection.c index e2e669e..0dd9f3f 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -297,13 +297,13 @@ H5FS__sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr) * for this type of section */ if (NULL == (cls_prvt = (H5HF_sect_private_t *)H5MM_malloc(sizeof(H5HF_sect_private_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); cls_prvt->hdr = hdr; cls->cls_private = cls_prvt; /* Increment reference count on heap header */ if (H5HF__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -335,7 +335,7 @@ H5FS__sect_term_cls(H5FS_section_class_t *cls) /* Decrement reference count on heap header */ if (H5HF__hdr_decr(cls_prvt->hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header"); /* Free the class private information */ cls->cls_private = H5MM_xfree(cls_prvt); @@ -369,7 +369,7 @@ H5FS__sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size, H5 /* Create free list section node */ if (NULL == (new_sect = H5FL_MALLOC(H5HF_free_section_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* Set the information passed in */ new_sect->sect_info.addr = sect_addr; @@ -410,7 +410,7 @@ H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock) if (iblock) if (H5HF__iblock_decr(iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, - "can't decrement reference count on section's indirect block") + "can't decrement reference count on section's indirect block"); /* Release the section */ sect = H5FL_FREE(H5HF_free_section_t, sect); @@ -444,14 +444,14 @@ H5HF__sect_single_new(hsize_t sect_off, size_t sect_size, H5HF_indirect_t *paren /* Create free space section node */ if (NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_off, (hsize_t)sect_size, H5FS_SECT_LIVE))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for single section") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for single section"); /* Set the 'single' specific fields */ sect->u.single.parent = parent; if (sect->u.single.parent) { if (H5HF__iblock_incr(sect->u.single.parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, - "can't increment reference count on shared indirect block") + "can't increment reference count on shared indirect block"); } /* end if */ sect->u.single.par_entry = par_entry; @@ -496,11 +496,11 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_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, H5AC__READ_ONLY_FLAG) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section"); /* Increment reference count on indirect block that free section is in */ if (H5HF__iblock_incr(sec_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block"); /* Check for refreshing existing parent information */ if (refresh) { @@ -508,7 +508,7 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_sect /* Release hold on previous parent indirect block */ 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") + "can't decrement reference count on section's indirect block"); } /* end if */ } /* end if */ @@ -518,7 +518,7 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh, H5HF_free_sect /* Unlock indirect block */ if (H5HF__man_iblock_unprotect(sec_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block"); sec_iblock = NULL; done: @@ -558,7 +558,7 @@ H5HF__sect_single_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) else { /* Look up indirect block information for section */ if (H5HF__sect_single_locate_parent(hdr, FALSE, sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get section's parent info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get section's parent info"); } /* end else */ /* Section is "live" now */ @@ -640,7 +640,7 @@ H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, size_t amt) if (sect->sect_info.size == amt) { /* Free single section */ if (H5HF__sect_single_free((H5FS_section_info_t *)sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free single section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free single section node"); } /* end if */ else { /* Adjust information for section */ @@ -649,7 +649,7 @@ H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, size_t amt) /* Re-insert section node into heap's free space */ if (H5HF__space_add(hdr, sect, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add single section to free space manager") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add single section to free space manager"); } /* end else */ done: @@ -687,7 +687,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) /* Retrieve direct block address from section */ if (H5HF__sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information"); /* Check for section occupying entire direct block */ /* (and not the root direct block) */ @@ -698,16 +698,16 @@ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block"); assert(H5_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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't convert single section into row section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't convert single section into row section"); /* Destroy direct block */ if (H5HF__man_dblock_destroy(hdr, dblock, dblock_addr, &parent_removed) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block"); dblock = NULL; /* If the parent for this direct block was removed and the indirect @@ -715,7 +715,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) */ if (parent_removed && H5FS_SECT_LIVE == sect->u.row.under->sect_info.state) if (H5HF__sect_row_parent_removed(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "can't update section info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "can't update section info"); } /* end if */ done: @@ -755,7 +755,7 @@ H5HF__sect_single_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata /* Check if single section covers entire direct block it's in */ /* (converts to row section possibly) */ if (H5HF__sect_single_full_dblock(hdr, (*sect)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section"); /* Set the "returned space" flag if the single section was changed * into a row section, so the "merging & shrinking" algorithm @@ -796,7 +796,7 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls, /* Create free list section node */ if (NULL == (new_sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_addr, sect_size, H5FS_SECT_SERIALIZED))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "allocation failed for direct block free list section") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "allocation failed for direct block free list section"); /* Set return value */ ret_value = (H5FS_section_info_t *)new_sect; @@ -882,17 +882,17 @@ H5HF__sect_single_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect /* Get rid of second section */ if (H5HF__sect_single_free((H5FS_section_info_t *)sect2) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); /* Check to see if we should revive first section */ if ((*sect1)->sect_info.state != H5FS_SECT_LIVE) if (H5HF__sect_single_revive(hdr, (*sect1)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section"); /* Check if single section covers entire direct block it's in */ /* (converts to row section possibly) */ if (H5HF__sect_single_full_dblock(hdr, (*sect1)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't check/convert single section"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -985,27 +985,27 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata) /* Check to see if we should revive section */ if ((*sect)->sect_info.state != H5FS_SECT_LIVE) if (H5HF__sect_single_revive(hdr, (*sect)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section"); /* Retrieve direct block address from section */ if (H5HF__sect_single_dblock_info(hdr, (*sect), &dblock_addr, &dblock_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information"); /* Protect the direct block for the section */ /* (should be a root direct block) */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap direct block"); assert(H5_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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); /* Destroy direct block */ if (H5HF__man_dblock_destroy(hdr, dblock, dblock_addr, NULL) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release direct block"); dblock = NULL; /* Indicate that the section has been released */ @@ -1046,7 +1046,7 @@ H5HF__sect_single_free(H5FS_section_info_t *_sect) /* Release the section */ if (H5HF__sect_node_free(sect, parent) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1165,7 +1165,7 @@ H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first, uns if (NULL == (sect = H5FS__sect_node_new( (unsigned)(is_first ? H5HF_FSPACE_SECT_FIRST_ROW : H5HF_FSPACE_SECT_NORMAL_ROW), sect_off, sect_size, under_sect->sect_info.state))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for row section") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for row section"); /* Set the 'row' specific fields */ sect->u.row.under = under_sect; @@ -1214,11 +1214,11 @@ H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_dire /* Create indirect section that underlies the row section */ if (NULL == (sect->u.row.under = H5HF__sect_indirect_for_row(hdr, dblock->parent, sect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "serializing row section not supported yet") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "serializing row section not supported yet"); /* Release single section's hold on underlying indirect block */ if (H5HF__iblock_decr(dblock->parent) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1253,12 +1253,12 @@ H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) if ((H5FS_SECT_LIVE == sect->u.row.under->sect_info.state) && (TRUE == sect->u.row.under->u.indirect.u.iblock->removed_from_cache)) if (H5HF__sect_row_parent_removed(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "can't update section info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "can't update section info"); /* Pass along "revive" request to underlying indirect section */ /* (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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section"); assert(sect->sect_info.state == H5FS_SECT_LIVE); done: @@ -1301,7 +1301,7 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr /* Forward row section to indirect routines, to handle reducing underlying indirect section */ alloc_from_start = FALSE; if (H5HF__sect_indirect_reduce_row(hdr, sect, &alloc_from_start) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce underlying section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce underlying section"); /* Determine entry allocated */ *entry_p = (sect->u.row.row * hdr->man_dtable.cparam.width) + sect->u.row.col; @@ -1312,7 +1312,7 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr if (sect->u.row.num_entries == 1) { /* Free row section */ if (H5HF__sect_row_free((H5FS_section_info_t *)sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section node"); } /* end if */ else { /* Check whether to allocate from the beginning or end of the row */ @@ -1330,7 +1330,7 @@ H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned *entr /* Add 'row' section back to free space list */ if (H5HF__space_add(hdr, sect, 0) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add indirect section to free space manager") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add indirect section to free space manager"); } /* end else */ done: @@ -1367,7 +1367,7 @@ H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) else /* Change row section to be the "first row" */ if (H5HF__space_sect_change_class(hdr, sect, H5HF_FSPACE_SECT_FIRST_ROW) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1429,7 +1429,7 @@ H5HF__sect_row_parent_removed(H5HF_free_section_t *sect) /* Decrement the refcount on the indirect block, since serialized sections don't hold a reference */ if (H5HF__iblock_decr(sect->u.row.under->u.indirect.u.iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block"); /* Switch indirect block info to serialized form */ /* (Overwrites iblock pointer in the indirect section) */ @@ -1478,7 +1478,7 @@ H5HF__sect_row_init_cls(H5FS_section_class_t *cls, void *_udata) /* Call common class initialization */ if (H5FS__sect_init_cls(cls, hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class"); /* First row sections actually are proxies for indirection sections on disk */ if (cls->type == H5HF_FSPACE_SECT_FIRST_ROW) @@ -1516,7 +1516,7 @@ H5HF__sect_row_term_cls(H5FS_section_class_t *cls) /* Call common class termination */ if (H5FS__sect_term_cls(cls) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1553,7 +1553,7 @@ H5HF__sect_row_serialize(const H5FS_section_class_t *cls, const H5FS_section_inf hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr; if (H5HF__sect_indirect_serialize(hdr, sect->u.row.under, buf) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, - "can't serialize row section's underlying indirect section") + "can't serialize row section's underlying indirect section"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1592,7 +1592,7 @@ H5HF__sect_row_deserialize(const H5FS_section_class_t *cls, const uint8_t *buf, hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr; if (NULL == (ret_value = H5HF__sect_indirect_deserialize(hdr, buf, sect_addr, sect_size, des_flags))) HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, - "can't deserialize row section's underlying indirect section") + "can't deserialize row section's underlying indirect section"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1690,12 +1690,12 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, /* Shrink away underlying indirect section */ if (H5HF__sect_indirect_shrink(hdr, top_indir_sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section"); } /* end if */ else /* Merge rows' underlying indirect sections together */ if (H5HF__sect_indirect_merge_row(hdr, (*sect1), sect2) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMERGE, FAIL, "can't merge underlying indirect sections") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMERGE, FAIL, "can't merge underlying indirect sections"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1770,7 +1770,7 @@ H5HF__sect_row_shrink(H5FS_section_info_t **_sect, void *_udata) /* Shrink away underlying indirect section */ if (H5HF__sect_indirect_shrink(hdr, top_indir_sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't shrink underlying indirect section"); /* Indicate that the section has been released */ *sect = NULL; @@ -1801,7 +1801,7 @@ H5HF__sect_row_free_real(H5HF_free_section_t *sect) /* Release the section */ if (H5HF__sect_node_free(sect, NULL) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1831,11 +1831,11 @@ H5HF__sect_row_free(H5FS_section_info_t *_sect) /* Decrement the ref. count on the row section's underlying indirect section */ if (H5HF__sect_indirect_decr(sect->u.row.under) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't detach section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't detach section node"); /* Release the section */ if (H5HF__sect_row_free_real(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2015,7 +2015,7 @@ H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata) /* Call to common class initialization */ if (H5FS__sect_init_cls(cls, hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class"); /* Set the size of all serialized objects of this class of sections */ cls->serial_size = H5HF_SECT_INDIRECT_SERIAL_SIZE(hdr); @@ -2047,7 +2047,7 @@ H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls) /* Call common class termination */ if (H5FS__sect_term_cls(cls) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2081,7 +2081,7 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5 /* Create free space section node */ if (NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off, sect_size, (iblock ? H5FS_SECT_LIVE : H5FS_SECT_SERIALIZED)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for indirect section") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for indirect section"); /* Set the 'indirect' specific fields */ if (iblock) { @@ -2089,7 +2089,7 @@ H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size, H5 sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width * sect->u.indirect.u.iblock->max_rows; if (H5HF__iblock_incr(sect->u.indirect.u.iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, - "can't increment reference count on shared indirect block") + "can't increment reference count on shared indirect block"); } /* end if */ else { sect->u.indirect.u.iblock_off = iblock_off; @@ -2148,7 +2148,7 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_ if (NULL == (sect = H5HF__sect_indirect_new(hdr, row_sect->sect_info.addr, row_sect->sect_info.size, iblock, iblock->block_off, row_sect->u.row.row, row_sect->u.row.col, row_sect->u.row.num_entries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section"); /* Set # of direct rows covered */ sect->u.indirect.dir_nrows = 1; @@ -2156,7 +2156,7 @@ H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, H5HF_free_ /* Allocate space for the derived row sections */ if (NULL == (sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "allocation failed for row section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "allocation failed for row section pointer array"); /* Attach the new row section to indirect section */ sect->u.indirect.dir_rows[0] = row_sect; @@ -2236,7 +2236,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ /* Allocate space for the derived row sections */ if (NULL == (sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *) * dir_nrows))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array"); } /* end if */ else { /* No rows of direct blocks covered, reset direct row information */ @@ -2271,7 +2271,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ /* Allocate space for the child indirect sections */ if (NULL == (sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc( sizeof(H5HF_free_section_t *) * sect->u.indirect.indir_nents))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array"); } /* end if */ else { /* No indirect block entries covered, reset indirect row information */ @@ -2299,7 +2299,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ if (NULL == (row_sect = H5HF__sect_row_create( curr_off, (hdr->man_dtable.row_block_size[u] - dblock_overhead), first_child, u, row_col, row_entries, sect))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "creation failed for child row section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "creation failed for child row section"); /* Add new row section to array for indirect section */ sect->u.indirect.dir_rows[curr_row] = row_sect; @@ -2310,7 +2310,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ else /* Add new row section to free space manager for the heap */ if (H5HF__space_add(hdr, row_sect, space_flags) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space"); /* Increment reference count for underlying indirect section */ sect->u.indirect.rc++; @@ -2348,7 +2348,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ if (H5HF__man_iblock_entry_addr(sect->u.indirect.u.iblock, curr_entry, &child_iblock_addr) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "unable to retrieve child indirect block's address") + "unable to retrieve child indirect block's address"); /* If the child indirect block's address is defined, protect it */ if (H5_addr_defined(child_iblock_addr)) { @@ -2356,7 +2356,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ hdr, child_iblock_addr, child_nrows, sect->u.indirect.u.iblock, curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect))) HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, - "unable to protect fractal heap indirect block") + "unable to protect fractal heap indirect block"); } /* end if */ else child_iblock = NULL; @@ -2367,20 +2367,20 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ /* Create free space section node */ if (NULL == (child_sect = H5HF__sect_indirect_new(hdr, curr_off, (hsize_t)0, child_iblock, curr_off, 0, 0, child_nentries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section"); /* Initialize rows for new indirect section */ if (H5HF__sect_indirect_init_rows(hdr, child_sect, first_child, first_row_sect, space_flags, 0, 0, (child_nrows - 1), (hdr->man_dtable.cparam.width - 1)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section"); /* If we have a valid child indirect block, release it now */ /* (will be pinned, if rows reference it) */ if (child_iblock) if (H5HF__man_iblock_unprotect(child_iblock, H5AC__NO_FLAGS_SET, did_protect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, - "unable to release fractal heap indirect block") + "unable to release fractal heap indirect block"); /* Attach child section to this section */ child_sect->u.indirect.parent = sect; @@ -2479,19 +2479,19 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start /* Create free space section node */ if (NULL == (sect = H5HF__sect_indirect_new(hdr, sect_off, (hsize_t)0, iblock, iblock->block_off, start_row, start_col, nentries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section"); /* Initialize rows for new indirect section */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize indirect section"); assert(first_row_sect); /* Now that underlying indirect section is consistent, add first row * section to free space manager for the heap */ if (H5HF__space_add(hdr, first_row_sect, H5FS_ADD_RETURNED_SPACE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add row section to free space"); done: if (ret_value < 0 && sect) @@ -2535,13 +2535,13 @@ H5HF__sect_indirect_decr(H5HF_free_section_t *sect) /* Free indirect section */ if (H5HF__sect_indirect_free(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node"); /* Decrement ref. count on indirect section's parent */ if (par_sect) if (H5HF__sect_indirect_decr(par_sect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, - "can't decrement ref. count on parent indirect section") + "can't decrement ref. count on parent indirect section"); } /* end if */ done: @@ -2576,11 +2576,11 @@ H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) /* Look up indirect block containing indirect blocks for section */ if (H5HF__man_dblock_locate(hdr, sect->sect_info.addr, &sec_iblock, NULL, &did_protect, H5AC__READ_ONLY_FLAG) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section"); /* Review the section */ if (H5HF__sect_indirect_revive(hdr, sect, sec_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section"); done: /* Unlock indirect block */ @@ -2617,7 +2617,7 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi /* Increment reference count on indirect block that free section is in */ if (H5HF__iblock_incr(sect_iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block"); /* Set the pointer to the section's indirect block */ sect->u.indirect.u.iblock = sect_iblock; @@ -2635,7 +2635,7 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi /* Revive parent indirect section, if there is one */ if (sect->u.indirect.parent && sect->u.indirect.parent->sect_info.state == H5FS_SECT_SERIALIZED) if (H5HF__sect_indirect_revive(hdr, sect->u.indirect.parent, sect->u.indirect.u.iblock->parent) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2713,14 +2713,14 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h /* Remove this indirect section from parent indirect section */ if (H5HF__sect_indirect_reduce(hdr, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section"); sect->u.indirect.parent = NULL; sect->u.indirect.par_entry = 0; /* If we weren't the first section, set "first row" for this indirect section */ if (!is_first) if (H5HF__sect_indirect_first(hdr, sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't make new 'first row' for indirect section"); } /* end if */ /* Adjust indirect section's span size */ @@ -2755,7 +2755,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) if (H5HF__sect_row_first(hdr, sect->u.indirect.dir_rows[0]) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't make new 'first row' for indirect section") + "can't make new 'first row' for indirect section"); } /* end if */ else { /* Sanity check */ @@ -2769,7 +2769,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h if (row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW) if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't make new 'first row' for child indirect section") + "can't make new 'first row' for child indirect section"); } /* end else */ } /* end if */ @@ -2828,7 +2828,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h if (NULL == (peer_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size, iblock, iblock_off, start_row, start_col, peer_nentries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section"); /* Set up direct row & indirect entry information for peer section */ peer_sect->u.indirect.indir_nents = 0; @@ -2836,7 +2836,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect, h peer_sect->u.indirect.dir_nrows = peer_dir_nrows; if (NULL == (peer_sect->u.indirect.dir_rows = (H5HF_free_section_t **)H5MM_malloc( sizeof(H5HF_free_section_t *) * peer_dir_nrows))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for row section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for row section pointer array"); /* Transfer row sections between current & peer sections */ H5MM_memcpy(&peer_sect->u.indirect.dir_rows[0], §->u.indirect.dir_rows[0], @@ -2958,7 +2958,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned /* Reduce parent indirect section */ if (H5HF__sect_indirect_reduce(hdr, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce parent indirect section"); sect->u.indirect.parent = NULL; sect->u.indirect.par_entry = 0; @@ -2966,7 +2966,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned if (!is_first) if (H5HF__sect_indirect_first(hdr, sect) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't make new 'first row' for indirect section") + "can't make new 'first row' for indirect section"); } /* end if */ /* Check if we can allocate from start of indirect section */ @@ -2998,7 +2998,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned /* Make new "first row" in new first indirect child section */ if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't make new 'first row' for child indirect section") + "can't make new 'first row' for child indirect section"); } /* end if */ else if (child_entry == end_entry) { /* Sanity check */ @@ -3063,7 +3063,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned if (NULL == (peer_sect = H5HF__sect_indirect_new(hdr, peer_sect_addr, sect->sect_info.size, iblock, iblock_off, peer_start_row, peer_start_col, peer_nentries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section"); /* Set up direct row & indirect entry information for peer section */ peer_sect->u.indirect.dir_nrows = 0; @@ -3072,7 +3072,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned if (NULL == (peer_sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc( sizeof(H5HF_free_section_t *) * peer_nentries))) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, - "allocation failed for indirect section pointer array") + "allocation failed for indirect section pointer array"); /* Transfer child indirect sections between current & peer sections */ H5MM_memcpy(&peer_sect->u.indirect.indir_ents[0], @@ -3106,7 +3106,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned /* Make new "first row" in peer section */ if (H5HF__sect_indirect_first(hdr, peer_sect->u.indirect.indir_ents[0]) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, - "can't make new 'first row' for peer indirect section") + "can't make new 'first row' for peer indirect section"); /* Reset the peer_sect variable, to indicate that it has been hooked into the data structures * correctly and shouldn't be freed */ @@ -3126,7 +3126,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, unsigned /* Decrement # of sections which depend on this row */ /* (Must be last as section can be freed) */ if (H5HF__sect_indirect_decr(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement section's ref. count ") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement section's ref. count "); done: /* Free allocated peer_sect. Note that this is necessary for all failures until peer_sect is linked @@ -3202,7 +3202,7 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) /* 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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set row section to be first row"); } /* end if */ else { /* Sanity checks */ @@ -3212,7 +3212,7 @@ H5HF__sect_indirect_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) /* Forward to first child indirect section */ if (H5HF__sect_indirect_first(hdr, sect->u.indirect.indir_ents[0]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set child indirect section to be first row") + HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "can't set child indirect section to be first row"); } /* end else */ done: @@ -3368,7 +3368,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H /* Extend the first section's row array */ if (NULL == (new_dir_rows = (H5HF_free_section_t **)H5MM_realloc( sect1->u.indirect.dir_rows, sizeof(H5HF_free_section_t *) * new_dir_nrows1))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array"); sect1->u.indirect.dir_rows = new_dir_rows; /* Transfer the second section's rows to first section */ @@ -3415,7 +3415,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H /* Extend the first section's entry array */ if (NULL == (new_indir_ents = (H5HF_free_section_t **)H5MM_realloc( sect1->u.indirect.indir_ents, sizeof(H5HF_free_section_t *) * new_indir_nents1))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for row section pointer array"); sect1->u.indirect.indir_ents = new_indir_ents; /* Transfer the second section's entries to first section */ @@ -3452,7 +3452,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free row section"); } /* end if */ else { /* Decrement ref. count on second indirect section's parent */ @@ -3460,11 +3460,11 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H if (sect2->u.indirect.parent) if (H5HF__sect_indirect_decr(sect2->u.indirect.parent) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, - "can't decrement ref. count on parent indirect section") + "can't decrement ref. count on parent indirect section"); /* Free second indirect section */ if (H5HF__sect_indirect_free(sect2) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node"); /* Re-add the second section's first row */ /* (it's already been added to first indirect section, but it's been removed @@ -3472,7 +3472,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H */ row_sect2->sect_info.type = H5HF_FSPACE_SECT_NORMAL_ROW; if (H5HF__space_add(hdr, row_sect2, H5FS_ADD_SKIP_VALID) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add second row section to free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't re-add second row section to free space"); } /* end else */ /* Check if we can create parent indirect section for first section */ @@ -3481,7 +3481,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1, H /* Build parent section for fully populated indirect section */ 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create parent for full indirect section"); } /* end if */ done: @@ -3529,7 +3529,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) else { /* Retrieve the information for the parent block */ if (H5HF__man_iblock_parent_info(hdr, sect->sect_info.addr, &par_block_off, &par_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get block entry") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get block entry"); par_iblock = NULL; } /* end else */ @@ -3541,7 +3541,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) /* Create parent indirect section */ if (NULL == (par_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr, sect->sect_info.size, par_iblock, par_block_off, par_row, par_col, 1))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section"); /* No rows of direct blocks covered in parent, reset direct row information */ par_sect->u.indirect.dir_nrows = 0; @@ -3551,7 +3551,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) par_sect->u.indirect.indir_nents = 1; if (NULL == (par_sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_malloc(sizeof(H5HF_free_section_t *)))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array") + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "allocation failed for indirect section pointer array"); /* Attach sections together */ sect->u.indirect.parent = par_sect; @@ -3598,22 +3598,22 @@ H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr, H5HF_free_section_t *sect) if (sect->u.indirect.dir_rows[u]->sect_info.type != H5HF_FSPACE_SECT_FIRST_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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space"); } /* end if */ /* Release the row section */ if (H5HF__sect_row_free_real(sect->u.indirect.dir_rows[u]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node"); } /* end for */ /* Walk through indirect entries, freeing them (recursively) */ for (u = 0; u < sect->u.indirect.indir_nents; u++) if (H5HF__sect_indirect_shrink(hdr, sect->u.indirect.indir_ents[u]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node"); /* Free the indirect section itself */ if (H5HF__sect_indirect_free(sect) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3647,7 +3647,7 @@ H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect, if (sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr) if (H5HF__sect_indirect_serialize(hdr, sect->u.indirect.parent, buf) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, - "can't serialize indirect section's parent indirect section") + "can't serialize indirect section's parent indirect section"); } /* end if */ else { /* Indirect range's indirect block's block offset */ @@ -3720,7 +3720,7 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec /* Create free space section node */ if (NULL == (new_sect = H5HF__sect_indirect_new(hdr, sect_addr, sect_size, NULL, iblock_off, start_row, start_col, nentries))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section"); /* Compute start entry */ start_entry = (start_row * hdr->man_dtable.cparam.width) + start_col; @@ -3734,7 +3734,7 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf, haddr_t sec if (H5HF__sect_indirect_init_rows(hdr, new_sect, TRUE, NULL, H5FS_ADD_DESERIALIZING, new_sect->u.indirect.row, new_sect->u.indirect.col, end_row, end_col) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize indirect section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize indirect section"); /* Indicate that this section shouldn't be added to free space manager's list */ *des_flags |= H5FS_DESERIALIZE_NO_ADD; @@ -3781,7 +3781,7 @@ H5HF__sect_indirect_free(H5HF_free_section_t *sect) /* Release the sections */ if (H5HF__sect_node_free(sect, iblock) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFspace.c b/src/H5HFspace.c index bdc0034..2913062 100644 --- a/src/H5HFspace.c +++ b/src/H5HFspace.c @@ -98,7 +98,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create) /* Open an existing free space structure for the heap */ if (NULL == (hdr->fspace = H5FS_open(hdr->f, hdr->fs_addr, 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info"); } /* end if */ else { /* Check if we are allowed to create the free space manager */ @@ -116,7 +116,7 @@ H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create) if (NULL == (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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize free space info"); assert(H5_addr_defined(hdr->fs_addr)); } /* end if */ } /* end else */ @@ -153,14 +153,14 @@ H5HF__space_add(H5HF_hdr_t *hdr, H5HF_free_section_t *node, unsigned flags) /* Check if the free space for the heap has been initialized */ if (!hdr->fspace) if (H5HF__space_start(hdr, TRUE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space"); /* Construct user data */ udata.hdr = hdr; /* Add to the free space for the heap */ if (H5FS_sect_add(hdr->f, hdr->fspace, (H5FS_section_info_t *)node, flags, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't add section to heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't add section to heap free space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -194,12 +194,12 @@ H5HF__space_find(H5HF_hdr_t *hdr, hsize_t request, H5HF_free_section_t **node) /* Check if the free space for the heap has been initialized */ if (!hdr->fspace) if (H5HF__space_start(hdr, FALSE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space"); /* Search for free space in the heap */ if (hdr->fspace) if ((node_found = H5FS_sect_find(hdr->f, hdr->fspace, request, (H5FS_section_info_t **)node)) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap"); /* Set return value */ ret_value = node_found; @@ -239,7 +239,7 @@ H5HF__space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_uda 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") + "can't decrement reference count on section's indirect block"); /* Reset parent information */ sect->u.single.parent = NULL; @@ -277,7 +277,8 @@ H5HF__space_revert_root(const H5HF_hdr_t *hdr) if (hdr->fspace) /* Iterate over all sections, resetting the parent pointers in 'single' sections */ if (H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF__space_revert_root_cb, NULL) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to reset parent pointers") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, + "can't iterate over sections to reset parent pointers"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -318,7 +319,7 @@ H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata) /* Increment ref. count on new root indirect block */ if (H5HF__iblock_incr(root_iblock) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, - "can't increment reference count on section's indirect block") + "can't increment reference count on section's indirect block"); /* Set parent info ("live" section must _NOT_ have a parent right now) */ if (sect->sect_info.state == H5FS_SECT_SERIALIZED) @@ -362,7 +363,7 @@ H5HF__space_create_root(const H5HF_hdr_t *hdr, H5HF_indirect_t *root_iblock) /* Iterate over all sections, setting the parent pointers in 'single' sections to the new indirect * block */ if (H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF__space_create_root_cb, root_iblock) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to set parent pointers") + HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to set parent pointers"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -394,12 +395,12 @@ H5HF__space_size(H5HF_hdr_t *hdr, hsize_t *fs_size) /* Check if the free space for the heap has been initialized */ if (!hdr->fspace) if (H5HF__space_start(hdr, FALSE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize heap free space"); /* Get free space metadata size */ if (hdr->fspace) { if (H5FS_size(hdr->fspace, fs_size) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info") + HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info"); } /* end if */ else *fs_size = 0; @@ -434,7 +435,7 @@ H5HF__space_remove(H5HF_hdr_t *hdr, H5HF_free_section_t *node) /* Remove from the free space for the heap */ if (H5FS_sect_remove(hdr->f, hdr->fspace, (H5FS_section_info_t *)node) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove section from heap free space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -469,17 +470,17 @@ H5HF__space_close(H5HF_hdr_t *hdr) /* Retrieve the number of sections for this heap */ if (H5FS_sect_stats(hdr->fspace, NULL, &nsects) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOUNT, FAIL, "can't query free space section count") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOUNT, FAIL, "can't query free space section count"); /* Close the free space for the heap */ if (H5FS_close(hdr->f, hdr->fspace) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info"); hdr->fspace = NULL; /* Check if we can delete the free space manager for this heap */ if (!nsects) { if (H5FS_delete(hdr->f, hdr->fs_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete free space info"); hdr->fs_addr = HADDR_UNDEF; } /* end if */ } /* end if */ @@ -512,7 +513,7 @@ H5HF__space_delete(H5HF_hdr_t *hdr) /* Delete the free space manager */ if (H5FS_delete(hdr->f, hdr->fs_addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "can't delete to free space manager") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "can't delete to free space manager"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -545,7 +546,7 @@ H5HF__space_sect_change_class(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, uint16 /* 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) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't modify class of free space section") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't modify class of free space section"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HFstat.c b/src/H5HFstat.c index 53dbe03..411ad7a 100644 --- a/src/H5HFstat.c +++ b/src/H5HFstat.c @@ -132,24 +132,24 @@ H5HF_size(const H5HF_t *fh, hsize_t *heap_size) if (H5HF__man_iblock_size(hdr->f, hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL, 0, heap_size) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, - "unable to get fractal heap storage info for indirect block") + "unable to get fractal heap storage info for indirect block"); /* Check for B-tree storage of huge objects in fractal heap */ if (H5_addr_defined(hdr->huge_bt2_addr)) { /* Open the huge object index v2 B-tree */ if (NULL == (bt2 = H5B2_open(hdr->f, hdr->huge_bt2_addr, hdr->f))) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for tracking 'huge' objects") + "unable to open v2 B-tree for tracking 'huge' objects"); /* Get the B-tree storage */ if (H5B2_size(bt2, heap_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info"); } /* end if */ /* Get storage for free-space tracking info */ if (H5_addr_defined(hdr->fs_addr)) { if (H5HF__space_size(hdr, &meta_size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve FS meta storage info"); *heap_size += meta_size; } /* end if */ diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c index 7453489..e303b33 100644 --- a/src/H5HFtiny.c +++ b/src/H5HFtiny.c @@ -160,7 +160,7 @@ H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -245,7 +245,7 @@ H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void /* Call the user's 'op' callback */ if (op(id, enc_obj_size, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "application's callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -276,7 +276,7 @@ H5HF__tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj) /* Call the internal 'op' routine */ if (H5HF__tiny_op_real(hdr, id, H5HF__op_read, obj) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -307,7 +307,7 @@ H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_d /* Call the internal 'op' routine routine */ if (H5HF__tiny_op_real(hdr, id, op, op_data) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -346,7 +346,7 @@ H5HF__tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id) /* Mark heap header as modified */ if (H5HF__hdr_dirty(hdr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HG.c b/src/H5HG.c index b18ecea..5e573fa 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -133,20 +133,20 @@ H5HG__create(H5F_t *f, size_t size) /* Create it */ H5_CHECK_OVERFLOW(size, size_t, hsize_t); if (HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_GHEAP, (hsize_t)size))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap"); if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed"); heap->addr = addr; heap->size = size; heap->shared = H5F_SHARED(f); if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed"); 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))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed"); /* Initialize the header */ H5MM_memcpy(heap->chunk, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC); @@ -178,11 +178,11 @@ H5HG__create(H5F_t *f, size_t size) /* Add this heap to the beginning of the CWFS list */ if (H5F_cwfs_add(f, heap) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, - "unable to add global heap collection to file's CWFS") + "unable to add global heap collection to file's CWFS"); /* Add the heap to the cache */ if (H5AC_insert_entry(f, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection"); ret_value = addr; @@ -232,7 +232,7 @@ H5HG__protect(H5F_t *f, haddr_t addr, unsigned flags) /* Lock the heap into memory */ if (NULL == (heap = (H5HG_heap_t *)H5AC_protect(f, H5AC_GHEAP, addr, f, flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap"); /* Set the heap's address */ heap->addr = addr; @@ -300,7 +300,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr) /* 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, 0, "memory allocation failed"); /* Clear newly allocated space */ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0])); @@ -396,11 +396,11 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need) /* Protect the heap */ if (NULL == (heap = H5HG__protect(f, addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap"); /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed"); memset(new_chunk + heap->size, 0, need); /* Adjust the size of the heap */ @@ -432,7 +432,7 @@ H5HG_extend(H5F_t *f, haddr_t addr, size_t need) /* Resize the heap in the cache */ if (H5AC_resize_entry(heap, heap->size) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize global heap in cache") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize global heap in cache"); /* Mark the heap as dirty */ heap_flags |= H5AC__DIRTIED_FLAG; @@ -481,7 +481,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) assert(hobj); if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Find a large enough collection on the CWFS list */ need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size); @@ -489,7 +489,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) /* Look for a heap in the file's CWFS that has enough space for the object */ addr = HADDR_UNDEF; if (H5F_cwfs_find_free_heap(f, need, &addr) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "error trying to locate heap") + HGOTO_ERROR(H5E_HEAP, H5E_NOTFOUND, FAIL, "error trying to locate heap"); /* * If we didn't find any collection with enough free space then allocate a @@ -499,16 +499,16 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) addr = H5HG__create(f, need + H5HG_SIZEOF_HDR(f)); if (!H5_addr_defined(addr)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to allocate a global heap collection"); } /* end if */ assert(H5_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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap"); /* Split the free space to make room for the new object */ if (0 == (idx = H5HG__alloc(f, heap, size, &heap_flags))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate global heap object") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate global heap object"); /* Copy data into the heap */ if (size > 0) @@ -557,7 +557,7 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size) /* 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, NULL, "unable to protect global heap"); assert(hobj->idx < heap->nused); assert(heap->obj[hobj->idx].begin); @@ -566,7 +566,7 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size) /* Allocate a buffer for the object read in, if the user didn't give one */ if (!object && NULL == (object = H5MM_malloc(size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(object, p, size); /* @@ -575,7 +575,7 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object /*out*/, size_t *buf_size) */ if (heap->obj[0].begin) { if (H5F_cwfs_advance_heap(f, heap, FALSE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, NULL, "can't adjust file's CWFS") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, NULL, "can't adjust file's CWFS"); } /* end if */ /* If the caller would like to know the heap object's size, set that */ @@ -623,19 +623,19 @@ H5HG_link(H5F_t *f, const H5HG_t *hobj, int adjust) assert(f); assert(hobj); if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Load the heap */ if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap"); if (adjust != 0) { 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") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "new link count would be out of range"); if ((heap->obj[hobj->idx].nrefs + adjust) > H5HG_MAXLINK) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "new link count would be out of range") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "new link count would be out of range"); heap->obj[hobj->idx].nrefs += adjust; heap_flags |= H5AC__DIRTIED_FLAG; } /* end if */ @@ -675,7 +675,7 @@ H5HG_get_obj_size(H5F_t *f, H5HG_t *hobj, size_t *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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap"); assert(hobj->idx < heap->nused); assert(heap->obj[hobj->idx].begin); @@ -715,11 +715,11 @@ H5HG_remove(H5F_t *f, H5HG_t *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") + HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Load the heap */ if (NULL == (heap = H5HG__protect(f, hobj->addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect global heap"); assert(hobj->idx < heap->nused); @@ -772,7 +772,7 @@ H5HG_remove(H5F_t *f, H5HG_t *hobj) * heap isn't on the CWFS list then add it to the end. */ if (H5F_cwfs_advance_heap(f, heap, TRUE) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't adjust file's CWFS") + HGOTO_ERROR(H5E_HEAP, H5E_CANTMODIFY, FAIL, "can't adjust file's CWFS"); } /* end else */ done: @@ -803,7 +803,7 @@ H5HG__free(H5HG_heap_t *heap) /* Remove the heap from the CWFS list */ if (H5F_cwfs_remove_heap(heap->shared, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove heap from file's CWFS") + HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove heap from file's CWFS"); if (heap->chunk) heap->chunk = H5FL_BLK_FREE(gheap_chunk, heap->chunk); diff --git a/src/H5HGcache.c b/src/H5HGcache.c index 0fa6c1b..ecce815 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -117,14 +117,14 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, size_t len, const 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 (memcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (H5_IS_BUFFER_OVERFLOW(image, 1, p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); if (H5HG_VERSION != *image++) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in global heap") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in global heap"); /* Reserved */ if (H5_IS_BUFFER_OVERFLOW(image, 3, p_end)) @@ -192,7 +192,7 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void * /* Deserialize the heap's header */ heap.size = 0; if (H5HG__hdr_deserialize(&heap, (const uint8_t *)image, image_len, (const H5F_t *)udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode global heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode global heap prefix"); /* Set the actual global heap size */ *actual_len = heap.size; @@ -233,10 +233,10 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Allocate a new global heap */ if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); heap->shared = H5F_SHARED(f); if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the image buffer into the newly allocated chunk */ H5MM_memcpy(heap->chunk, _image, len); @@ -252,7 +252,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool if (H5_IS_BUFFER_OVERFLOW(heap->chunk, H5HG_SIZEOF_HDR(f), p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (H5HG__hdr_deserialize(heap, (const uint8_t *)heap->chunk, len, f) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode global heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode global heap header"); /* Decode each object */ @@ -266,7 +266,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool * about the order of the objects, and unused slots must be set to zero. */ if (NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); heap->nalloc = nalloc; while (p < (heap->chunk + heap->size)) { @@ -305,11 +305,11 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Determine the new number of objects to index */ new_alloc = MAX(heap->nalloc * 2, (idx + 1)); if (idx >= new_alloc) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate heap index") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate heap index"); /* Reallocate array of objects */ if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear newly allocated space */ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0])); @@ -318,7 +318,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool heap->nalloc = new_alloc; heap->obj = new_obj; if (heap->nalloc <= heap->nused) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate # allocated slots") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate # allocated slots"); } /* Number of references */ @@ -383,7 +383,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Add the new heap to the CWFS list for the file */ if (H5F_cwfs_add(f, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS"); ret_value = heap; @@ -473,7 +473,7 @@ H5HG__cache_heap_free_icr(void *_thing) /* Destroy global heap collection */ if (H5HG__free(heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HLcache.c b/src/H5HLcache.c index 115062f..653590d 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -159,14 +159,14 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, size_t len, H5HL_cache 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 (memcmp(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad local heap signature") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad local heap signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (H5_IS_BUFFER_OVERFLOW(image, 1, p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); if (H5HL_VERSION != *image++) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in local heap") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in local heap"); /* Reserved */ if (H5_IS_BUFFER_OVERFLOW(image, 3, p_end)) @@ -187,7 +187,7 @@ H5HL__hdr_deserialize(H5HL_t *heap, const uint8_t *image, size_t len, H5HL_cache HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); H5_DECODE_LENGTH_LEN(image, heap->free_block, udata->sizeof_size); if (heap->free_block != H5HL_FREE_NULL && heap->free_block >= heap->dblk_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad heap free list") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad heap free list"); /* Heap data address */ if (H5_IS_BUFFER_OVERFLOW(image, udata->sizeof_addr, p_end)) @@ -227,11 +227,11 @@ H5HL__fl_deserialize(H5HL_t *heap) /* Sanity check */ if (free_block >= heap->dblk_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list"); /* Allocate & initialize free list node */ if (NULL == (fl = H5FL_MALLOC(H5HL_free_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed"); fl->offset = (size_t)free_block; fl->prev = tail; fl->next = NULL; @@ -240,12 +240,12 @@ H5HL__fl_deserialize(H5HL_t *heap) image = heap->dblk_image + free_block; H5_DECODE_LENGTH_LEN(image, free_block, heap->sizeof_size); if (0 == free_block) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "free block size is zero?") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "free block size is zero?"); /* Decode length of this free block */ H5_DECODE_LENGTH_LEN(image, fl->size, heap->sizeof_size); if ((fl->offset + fl->size) > heap->dblk_size) - HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list") + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "bad heap free list"); /* Append node onto list */ if (tail) @@ -359,7 +359,7 @@ H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, voi /* Deserialize the heap's header */ if (H5HL__hdr_deserialize(&heap, (const uint8_t *)image, image_len, udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode local heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode local heap header"); /* Set the final size for the cache image */ *actual_len = heap.prfx_size; @@ -415,7 +415,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo /* Deserialize the heap's header */ if (H5HL__hdr_deserialize(heap, (const uint8_t *)image, len, udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode local heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode local heap header"); /* Allocate the heap prefix */ if (NULL == (prfx = H5HL__prfx_new(heap))) @@ -430,7 +430,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo /* Allocate space for the heap data image */ if (NULL == (heap->dblk_image = H5FL_BLK_MALLOC(lheap_chunk, heap->dblk_size))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Set image to the start of the data block. This is necessary * because there may be a gap between the used portion of the @@ -444,7 +444,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, hbo /* Build free list */ if (H5HL__fl_deserialize(heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't initialize free list"); } else /* Note that the heap should _NOT_ be a single @@ -628,7 +628,7 @@ H5HL__cache_prefix_free_icr(void *_thing) /* Destroy local heap prefix */ if (H5HL__prfx_dest(prfx) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap prefix"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -829,7 +829,7 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing) /* Pin the heap's prefix */ if (FAIL == H5AC_pin_protected_entry(dblk->heap->prfx)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin local heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin local heap prefix"); break; case H5AC_NOTIFY_ACTION_AFTER_FLUSH: @@ -849,11 +849,11 @@ H5HL__cache_datablock_notify(H5C_notify_action_t action, void *_thing) /* Unpin the local heap prefix */ if (FAIL == H5AC_unpin_entry(dblk->heap->prfx)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap prefix"); break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); break; } @@ -885,7 +885,7 @@ H5HL__cache_datablock_free_icr(void *_thing) /* Destroy the data block */ if (H5HL__dblk_dest(dblk) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index 675b940..852884a 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -58,7 +58,7 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) 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") + HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load/protect local heap"); fprintf(stream, "%*sLocal Heap...\n", indent, ""); fprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size); @@ -70,7 +70,7 @@ H5HL_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) * the heap. */ if (NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed"); fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, ""); for (free_block = 0, freelist = h->freelist; freelist; freelist = freelist->next, free_block++) { diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c index 8009f51..5701365 100644 --- a/src/H5HLdblk.c +++ b/src/H5HLdblk.c @@ -88,11 +88,11 @@ H5HL__dblk_new(H5HL_t *heap) /* Allocate new local heap data block */ if (NULL == (dblk = H5FL_CALLOC(H5HL_dblk_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for local heap data block") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for local heap data block"); /* Increment ref. count on heap data structure */ if (FAIL == H5HL__inc_rc(heap)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count"); /* Link the heap & the data block */ dblk->heap = heap; @@ -136,7 +136,7 @@ H5HL__dblk_dest(H5HL_dblk_t *dblk) /* Decrement ref. count on heap data structure */ if (FAIL == H5HL__dec_rc(dblk->heap)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count"); /* Unlink heap from data block */ dblk->heap = NULL; diff --git a/src/H5HLint.c b/src/H5HLint.c index 8bf5e8b..9369875 100644 --- a/src/H5HLint.c +++ b/src/H5HLint.c @@ -89,7 +89,7 @@ H5HL__new(size_t sizeof_size, size_t sizeof_addr, size_t prfx_size) /* Allocate new local heap structure */ if (NULL == (heap = H5FL_CALLOC(H5HL_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Initialize non-zero fields */ heap->sizeof_size = sizeof_size; diff --git a/src/H5HLprfx.c b/src/H5HLprfx.c index 4eb0d15..6011e8e 100644 --- a/src/H5HLprfx.c +++ b/src/H5HLprfx.c @@ -87,11 +87,11 @@ H5HL__prfx_new(H5HL_t *heap) /* Allocate new local heap prefix */ if (NULL == (prfx = H5FL_CALLOC(H5HL_prfx_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for local heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed for local heap prefix"); /* Increment ref. count on heap data structure */ if (FAIL == H5HL__inc_rc(heap)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment heap ref. count"); /* Link the heap & the prefix */ prfx->heap = heap; @@ -135,7 +135,7 @@ H5HL__prfx_dest(H5HL_prfx_t *prfx) /* Decrement ref. count on heap data structure */ if (FAIL == H5HL__dec_rc(prfx->heap)) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement heap ref. count"); /* Unlink heap from prefix */ prfx->heap = NULL; diff --git a/src/H5I.c b/src/H5I.c index 526927d..f0d1be6 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -122,12 +122,12 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I /* Verify that we found a type to give out */ if (done == FALSE) - HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded") + HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded"); } /* Allocate new ID class */ if (NULL == (cls = H5MM_calloc(sizeof(H5I_class_t)))) - HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed") + HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, H5I_BADID, "ID class allocation failed"); /* Initialize class fields */ cls->type = new_type; @@ -137,7 +137,7 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I /* Register the new ID class */ if (H5I_register_type(cls) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, H5I_BADID, "can't initialize ID class") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, H5I_BADID, "can't initialize ID class"); /* Set return value */ ret_value = new_type; @@ -171,9 +171,9 @@ H5Itype_exists(H5I_type_t type) /* Validate parameter */ if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type"); if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); if (NULL == H5I_type_info_array_g[type]) ret_value = FALSE; @@ -203,22 +203,22 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members) H5TRACE2("e", "It*h", type, num_members); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type"); /* Validate parameters. This needs to be done here, instead of letting * the private interface handle it, because the public interface throws * an error when the supplied type does not exist. */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); if (NULL == H5I_type_info_array_g[type]) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "supplied type does not exist") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "supplied type does not exist"); if (num_members) { int64_t members; if ((members = H5I_nmembers(type)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTCOUNT, FAIL, "can't compute number of members") + HGOTO_ERROR(H5E_ID, H5E_CANTCOUNT, FAIL, "can't compute number of members"); H5_CHECKED_ASSIGN(*num_members, hsize_t, members, int64_t); } @@ -247,7 +247,7 @@ H5Iclear_type(H5I_type_t type, hbool_t force) H5TRACE2("e", "Itb", type, force); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type"); ret_value = H5I_clear_type(type, force, TRUE); @@ -277,7 +277,7 @@ H5Idestroy_type(H5I_type_t type) H5TRACE1("e", "It", type); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "cannot call public function on library type"); ret_value = H5I__destroy_type(type); @@ -304,11 +304,11 @@ H5Iregister(H5I_type_t type, const void *object) H5TRACE2("i", "It*x", type, object); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "cannot call public function on library type"); /* Register the object */ if ((ret_value = H5I__register(type, object, TRUE, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object"); done: FUNC_LEAVE_API(ret_value) @@ -335,13 +335,13 @@ H5Iregister_future(H5I_type_t type, const void *object, H5I_future_realize_func_ /* Check arguments */ if (NULL == realize_cb) - HGOTO_ERROR(H5E_ID, H5E_BADVALUE, H5I_INVALID_HID, "NULL pointer for realize_cb not allowed") + HGOTO_ERROR(H5E_ID, H5E_BADVALUE, H5I_INVALID_HID, "NULL pointer for realize_cb not allowed"); if (NULL == discard_cb) - HGOTO_ERROR(H5E_ID, H5E_BADVALUE, H5I_INVALID_HID, "NULL pointer for realize_cb not allowed") + HGOTO_ERROR(H5E_ID, H5E_BADVALUE, H5I_INVALID_HID, "NULL pointer for realize_cb not allowed"); /* Register the future object */ if ((ret_value = H5I__register(type, object, TRUE, realize_cb, discard_cb)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object"); done: FUNC_LEAVE_API(ret_value) @@ -370,9 +370,9 @@ H5Iobject_verify(hid_t id, H5I_type_t type) /* Validate parameters */ if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type"); if (type < 1 || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "identifier has invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "identifier has invalid type"); ret_value = H5I_object_verify(id, type); @@ -435,7 +435,7 @@ H5Iremove_verify(hid_t id, H5I_type_t type) H5TRACE2("*x", "iIt", id, type); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type"); /* Remove the id */ ret_value = H5I__remove_verify(id, type); @@ -466,11 +466,11 @@ H5Idec_ref(hid_t id) /* Check arguments */ if (id < 0) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID"); /* Do actual decrement operation */ if ((ret_value = H5I_dec_app_ref(id)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); done: FUNC_LEAVE_API(ret_value) @@ -496,11 +496,11 @@ H5Iinc_ref(hid_t id) /* Check arguments */ if (id < 0) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID"); /* Do actual increment operation */ if ((ret_value = H5I_inc_ref(id, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID ref count"); done: FUNC_LEAVE_API(ret_value) @@ -526,11 +526,11 @@ H5Iget_ref(hid_t id) /* Check arguments */ if (id < 0) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID"); /* Do actual retrieve operation */ if ((ret_value = H5I_get_ref(id, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID ref count"); done: FUNC_LEAVE_API(ret_value) @@ -556,13 +556,13 @@ H5Iinc_type_ref(H5I_type_t type) /* Check arguments */ if (type <= 0 || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type"); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type"); /* Do actual increment operation */ if ((ret_value = H5I__inc_type_ref(type)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID type ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTINC, (-1), "can't increment ID type ref count"); done: FUNC_LEAVE_API(ret_value) @@ -601,7 +601,7 @@ H5Idec_type_ref(H5I_type_t type) H5TRACE1("e", "It", type); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type"); ret_value = H5I_dec_type_ref(type); @@ -629,13 +629,13 @@ H5Iget_type_ref(H5I_type_t type) /* Check arguments */ if (type <= 0 || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "invalid ID type"); if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "cannot call public function on library type"); /* Do actual retrieve operation */ if ((ret_value = H5I__get_type_ref(type)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID type ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't get ID type ref count"); done: FUNC_LEAVE_API(ret_value) @@ -735,7 +735,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key) /* Check arguments */ if (H5I_IS_LIB_TYPE(type)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "cannot call public function on library type"); /* Set up udata struct */ udata.app_cb = func; @@ -827,7 +827,7 @@ H5Iiterate(H5I_type_t type, H5I_iterate_func_t op, void *op_data) * here, as we can't do anything with it without revising the API. */ if ((ret_value = H5I_iterate(type, H5I__iterate_pub_cb, &int_udata, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "can't iterate over ids") + HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "can't iterate over ids"); done: FUNC_LEAVE_API(ret_value) @@ -864,14 +864,14 @@ H5Iget_file_id(hid_t obj_id) /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ID, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ID, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get the file ID */ if ((ret_value = H5F_get_file_id(vol_obj, type, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, H5I_INVALID_HID, "can't retrieve file ID"); } else - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "not an ID of a file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "not an ID of a file object"); done: FUNC_LEAVE_API(ret_value) @@ -912,7 +912,7 @@ H5Iget_name(hid_t id, char *name /*out*/, size_t size) /* Get the object pointer */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier") + HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -926,7 +926,7 @@ H5Iget_name(hid_t id, char *name /*out*/, size_t size) /* Retrieve object's name */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object name") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object name"); /* Set return value */ ret_value = (ssize_t)obj_name_len; diff --git a/src/H5Iint.c b/src/H5Iint.c index abc351d..462dc71 100644 --- a/src/H5Iint.c +++ b/src/H5Iint.c @@ -174,7 +174,7 @@ H5I_register_type(const H5I_class_t *cls) if (NULL == H5I_type_info_array_g[cls->type]) { /* Allocate the type information for new type */ if (NULL == (type_info = (H5I_type_info_t *)H5MM_calloc(sizeof(H5I_type_info_t)))) - HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, FAIL, "ID type allocation failed") + HGOTO_ERROR(H5E_ID, H5E_CANTALLOC, FAIL, "ID type allocation failed"); H5I_type_info_array_g[cls->type] = type_info; } else { @@ -225,7 +225,7 @@ H5I_nmembers(H5I_type_t type) /* Validate parameter */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); if (NULL == (type_info = H5I_type_info_array_g[type]) || type_info->init_count <= 0) HGOTO_DONE(0); @@ -298,11 +298,11 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) /* Validate parameters */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); udata.type_info = H5I_type_info_array_g[type]; if (udata.type_info == NULL || udata.type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type"); /* Finish constructing udata */ udata.force = force; @@ -321,7 +321,7 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) { if (!item->marked) if (H5I__mark_node((void *)item, NULL, (void *)&udata) < 0) - HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed while clearing the ID type") + HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed while clearing the ID type"); } /* Unset marking flag */ @@ -452,11 +452,11 @@ H5I__destroy_type(H5I_type_t type) /* Validate parameter */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); type_info = H5I_type_info_array_g[type]; if (type_info == NULL || type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type"); /* Close/clear/destroy all IDs for this type */ H5E_BEGIN_TRY @@ -512,12 +512,12 @@ H5I__register(H5I_type_t type, const void *object, hbool_t app_ref, H5I_future_r /* Check arguments */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number"); type_info = H5I_type_info_array_g[type]; if ((NULL == type_info) || (type_info->init_count <= 0)) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, H5I_INVALID_HID, "invalid type"); if (NULL == (info = H5FL_CALLOC(H5I_id_info_t))) - HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed") + HGOTO_ERROR(H5E_ID, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed"); /* Create the struct & its ID */ new_id = H5I_MAKE(type, type_info->nextid); @@ -571,7 +571,7 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) /* Retrieve ID for object */ if (H5I_INVALID_HID == (ret_value = H5I__register(type, object, app_ref, NULL, NULL))) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -609,25 +609,25 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, hbool_t app_ref, h /* Make sure ID is not already in use */ if (NULL != (info = H5I__find_id(existing_id))) - HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "ID already in use") + HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "ID already in use"); /* Make sure type number is valid */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); /* Get type pointer from list of types */ type_info = H5I_type_info_array_g[type]; if (NULL == type_info || type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type"); /* Make sure requested ID belongs to object's type */ if (H5I_TYPE(existing_id) != type) - HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "invalid type for provided ID") + HGOTO_ERROR(H5E_ID, H5E_BADRANGE, FAIL, "invalid type for provided ID"); /* Allocate new structure to house this ID */ if (NULL == (info = H5FL_CALLOC(H5I_id_info_t))) - HGOTO_ERROR(H5E_ID, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_ID, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Create the struct & insert requested ID */ info->id = existing_id; @@ -674,7 +674,7 @@ H5I_subst(hid_t id, const void *new_object) /* General lookup of the ID */ if (NULL == (info = H5I__find_id(id))) - HGOTO_ERROR(H5E_ID, H5E_NOTFOUND, NULL, "can't get ID ref count") + HGOTO_ERROR(H5E_ID, H5E_NOTFOUND, NULL, "can't get ID ref count"); /* Get the old object pointer to return */ H5_GCC_CLANG_DIAG_OFF("cast-qual") @@ -892,7 +892,7 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id) info->marked = TRUE; } else - HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node from hash table") + HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node from hash table"); /* Check if this ID was the last one accessed */ if (type_info->last_id_info == info) @@ -936,14 +936,14 @@ H5I_remove(hid_t id) /* Check arguments */ type = H5I_TYPE(id); if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid type number"); type_info = H5I_type_info_array_g[type]; if (type_info == NULL || type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, NULL, "invalid type"); /* Remove the node from the type */ if (NULL == (ret_value = H5I__remove_common(type_info, id))) - HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node") + HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, NULL, "can't remove ID node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -978,7 +978,7 @@ H5I__dec_ref(hid_t id, void **request) /* General lookup of the ID */ if (NULL == (info = H5I__find_id(id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID"); /* If this is the last reference to the object then invoke the type's * free method on the object. If the free method is undefined or @@ -1004,7 +1004,7 @@ H5I__dec_ref(hid_t id, void **request) if (!type_info->cls->free_func || (type_info->cls->free_func)((void *)info->object, request) >= 0) { /* Remove the node from the type */ if (NULL == H5I__remove_common(type_info, id)) - HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, (-1), "can't remove ID node") + HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, (-1), "can't remove ID node"); ret_value = 0; } /* end if */ else @@ -1042,7 +1042,7 @@ H5I_dec_ref(hid_t id) /* Synchronously decrement refcount on ID */ if ((ret_value = H5I__dec_ref(id, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1074,7 +1074,7 @@ H5I__dec_app_ref(hid_t id, void **request) /* Call regular decrement reference count routine */ if ((ret_value = H5I__dec_ref(id, request)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); /* Check if the ID still exists */ if (ret_value > 0) { @@ -1082,7 +1082,7 @@ H5I__dec_app_ref(hid_t id, void **request) /* General lookup of the ID */ if (NULL == (info = H5I__find_id(id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID"); /* Adjust app_ref */ --(info->app_count); @@ -1119,7 +1119,7 @@ H5I_dec_app_ref(hid_t id) /* Synchronously decrement refcount on ID */ if ((ret_value = H5I__dec_app_ref(id, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1151,7 +1151,7 @@ H5I_dec_app_ref_async(hid_t id, void **token) /* [Possibly] aynchronously decrement refcount on ID */ if ((ret_value = H5I__dec_app_ref(id, token)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't asynchronously decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't asynchronously decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1194,7 +1194,7 @@ H5I__dec_app_ref_always_close(hid_t id, void **request) */ H5I_remove(id); - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); } /* end if */ done: @@ -1224,7 +1224,7 @@ H5I_dec_app_ref_always_close(hid_t id) /* Synchronously decrement refcount on ID */ if ((ret_value = H5I__dec_app_ref_always_close(id, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1256,7 +1256,7 @@ H5I_dec_app_ref_always_close_async(hid_t id, void **token) /* [Possibly] aynchronously decrement refcount on ID */ if ((ret_value = H5I__dec_app_ref_always_close(id, token)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't asynchronously decrement ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTDEC, (-1), "can't asynchronously decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1285,7 +1285,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref) /* General lookup of the ID */ if (NULL == (info = H5I__find_id(id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID"); /* Adjust reference counts */ ++(info->count); @@ -1322,7 +1322,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref) /* General lookup of the ID */ if (NULL == (info = H5I__find_id(id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't locate ID"); /* Set return value */ ret_value = (int)(app_ref ? info->app_count : info->count); @@ -1355,7 +1355,7 @@ H5I__inc_type_ref(H5I_type_t type) /* Check arguments */ type_info = H5I_type_info_array_g[type]; if (NULL == type_info) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type"); /* Set return value */ ret_value = (int)(++(type_info->init_count)); @@ -1392,11 +1392,11 @@ H5I_dec_type_ref(H5I_type_t type) FUNC_ENTER_NOAPI((-1)) if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, (-1), "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, (-1), "invalid type number"); type_info = H5I_type_info_array_g[type]; if (type_info == NULL || type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type"); /* Decrement the number of users of the ID type. If this is the * last user of the type then release all IDs from the type and @@ -1441,7 +1441,7 @@ H5I__get_type_ref(H5I_type_t type) /* Check arguments */ type_info = H5I_type_info_array_g[type]; if (!type_info) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, (-1), "invalid type"); /* Set return value */ ret_value = (int)type_info->init_count; @@ -1534,7 +1534,7 @@ H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_re /* Check arguments */ if (type <= H5I_BADID || (int)type >= H5I_next_type_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number"); type_info = H5I_type_info_array_g[type]; /* Only iterate through ID list if it is initialized and there are IDs in type */ @@ -1555,7 +1555,7 @@ H5I_iterate(H5I_type_t type, H5I_search_func_t func, void *udata, hbool_t app_re if (!item->marked) { int ret = H5I__iterate_cb((void *)item, NULL, (void *)&iter_udata); if (H5_ITER_ERROR == ret) - HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed"); if (H5_ITER_STOP == ret) break; } @@ -1712,7 +1712,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id) type_info = H5I_type_info_array_g[type]; if (!type_info || type_info->init_count <= 0) - HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type") + HGOTO_ERROR(H5E_ID, H5E_BADGROUP, FAIL, "invalid type"); /* Only iterate through ID list if it is initialized and there are IDs in type */ if (type_info->init_count > 0 && type_info->id_count > 0) { @@ -1730,7 +1730,7 @@ H5I_find_id(const void *object, H5I_type_t type, hid_t *id) { int ret = H5I__find_id_cb((void *)item, NULL, (void *)&udata); if (H5_ITER_ERROR == ret) - HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_ID, H5E_BADITER, FAIL, "iteration failed"); if (H5_ITER_STOP == ret) break; } diff --git a/src/H5Itest.c b/src/H5Itest.c index cd1a3cc..68204a8 100644 --- a/src/H5Itest.c +++ b/src/H5Itest.c @@ -74,25 +74,25 @@ H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached) /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, (-1), "can't set API context") + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, (-1), "can't set API context"); api_ctx_pushed = TRUE; /* Get the object pointer */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier") + HGOTO_ERROR(H5E_ID, H5E_BADTYPE, (-1), "invalid identifier"); /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTSET, (-1), "can't set VOL wrapper info") + HGOTO_ERROR(H5E_ID, H5E_CANTSET, (-1), "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Get object location */ if (H5G_loc(id, &loc) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object location") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object location"); /* Call internal group routine to retrieve object's name */ if (H5G_get_name(&loc, name, size, &name_len, cached) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object name") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, (-1), "can't retrieve object name"); /* Set return value */ ret_value = (ssize_t)name_len; diff --git a/src/H5L.c b/src/H5L.c index 939aab4..c746ec6 100644 --- a/src/H5L.c +++ b/src/H5L.c @@ -102,13 +102,13 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Check arguments */ if (src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC"); if (!src_name || !*src_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified"); if (!dst_name || !*dst_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified"); if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list"); /* Check the link create property list */ if (H5P_DEFAULT == lcpl_id) @@ -120,7 +120,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set location parameter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; @@ -137,11 +137,11 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds if (H5L_SAME_LOC != src_loc_id) /* Get the location object */ if (NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(src_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (H5L_SAME_LOC != dst_loc_id) /* Get the location object */ if (NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(dst_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL connectors are the same */ if (vol_obj1 && vol_obj2) { @@ -149,10 +149,10 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Check if both objects are associated with the same VOL connector */ if (H5VL_cmp_connector_cls(&same_connector, vol_obj1->connector->cls, vol_obj2->connector->cls) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); if (same_connector) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "Objects are accessed through different VOL connectors and can't be linked") + "Objects are accessed through different VOL connectors and can't be linked"); } /* Construct a temporary source VOL object */ @@ -162,7 +162,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds } else { if (NULL == vol_obj2) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object"); tmp_vol_obj.connector = vol_obj2->connector; tmp_vol_obj.data = NULL; @@ -171,7 +171,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Move the link */ if (H5VL_link_move(&tmp_vol_obj, &loc_params1, vol_obj2, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") + HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link"); done: FUNC_LEAVE_API(ret_value) @@ -204,13 +204,13 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Check arguments */ if (src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not both be H5L_SAME_LOC"); if (!src_name || !*src_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified"); if (!dst_name || !*dst_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified"); if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list"); /* Check the link create property list */ if (H5P_DEFAULT == lcpl_id) @@ -222,7 +222,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id), TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set location parameter for source object */ loc_params1.type = H5VL_OBJECT_BY_NAME; @@ -239,11 +239,11 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds if (H5L_SAME_LOC != src_loc_id) /* Get the location object */ if (NULL == (vol_obj1 = (H5VL_object_t *)H5I_object(src_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (H5L_SAME_LOC != dst_loc_id) /* Get the location object */ if (NULL == (vol_obj2 = (H5VL_object_t *)H5I_object(dst_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL connectors are the same */ if (vol_obj1 && vol_obj2) { @@ -251,10 +251,10 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Check if both objects are associated with the same VOL connector */ if (H5VL_cmp_connector_cls(&same_connector, vol_obj1->connector->cls, vol_obj2->connector->cls) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); if (same_connector) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "Objects are accessed through different VOL connectors and can't be linked") + "Objects are accessed through different VOL connectors and can't be linked"); } /* end if */ /* Construct a temporary source VOL object */ @@ -264,7 +264,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds } /* end if */ else { if (NULL == vol_obj2) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object pointer") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object pointer"); tmp_vol_obj.connector = vol_obj2->connector; tmp_vol_obj.data = NULL; @@ -273,7 +273,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* Copy the link */ if (H5VL_link_copy(&tmp_vol_obj, &loc_params1, vol_obj2, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to copy link") + HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to copy link"); done: FUNC_LEAVE_API(ret_value) @@ -303,13 +303,13 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch /* Check arguments */ if (link_loc_id == H5L_SAME_LOC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link location id should not be H5L_SAME_LOC") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link location id should not be H5L_SAME_LOC"); if (!link_target) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be NULL"); if (!*link_target) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "link_target parameter cannot be an empty string"); if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list"); /* link_name is verified in H5VL_setup_name_args() */ /* Get the link creation property list */ @@ -321,11 +321,11 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up object access arguments */ if (H5VL_setup_name_args(link_loc_id, link_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_SOFT; @@ -334,7 +334,7 @@ H5L__create_soft_api_common(const char *link_target, hid_t link_loc_id, const ch /* Create the link */ if (H5VL_link_create(&vol_cb_args, *vol_obj_ptr, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create soft link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create soft link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -366,7 +366,7 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name /* Creates a soft link synchronously */ if (H5L__create_soft_api_common(link_target, link_loc_id, link_name, lcpl_id, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to synchronously create soft link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to synchronously create soft link"); done: FUNC_LEAVE_API(ret_value) @@ -401,7 +401,7 @@ H5Lcreate_soft_async(const char *app_file, const char *app_func, unsigned app_li /* Creates a soft link asynchronously */ if (H5L__create_soft_api_common(link_target, link_loc_id, link_name, lcpl_id, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to asynchronously create soft link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to asynchronously create soft link"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -409,7 +409,7 @@ H5Lcreate_soft_async(const char *app_file, const char *app_func, unsigned app_li if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIu*si*siii", app_file, app_func, app_line, link_target, link_loc_id, link_name, lcpl_id, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -442,17 +442,17 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l /* Check arguments */ if (cur_loc_id == H5L_SAME_LOC && link_loc_id == H5L_SAME_LOC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not be both H5L_SAME_LOC") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should not be both H5L_SAME_LOC"); if (!cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cur_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cur_name parameter cannot be NULL"); if (!*cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cur_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cur_name parameter cannot be an empty string"); if (!link_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be NULL"); if (!*link_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "new_name parameter cannot be an empty string"); if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list"); /* Check the link create property list */ if (H5P_DEFAULT == lcpl_id) @@ -463,7 +463,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, cur_loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up new location struct */ link_loc_params.type = H5VL_OBJECT_BY_NAME; @@ -474,11 +474,11 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l if (H5L_SAME_LOC != cur_loc_id) /* Get the current location object */ if (NULL == (curr_vol_obj = (H5VL_object_t *)H5VL_vol_object(cur_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (H5L_SAME_LOC != link_loc_id) /* Get the new location object */ if (NULL == (link_vol_obj = (H5VL_object_t *)H5VL_vol_object(link_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL connectors are the same */ if (curr_vol_obj && link_vol_obj) { @@ -487,10 +487,10 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l /* Check if both objects are associated with the same VOL connector */ if (H5VL_cmp_connector_cls(&same_connector, curr_vol_obj->connector->cls, link_vol_obj->connector->cls) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); if (same_connector) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "Objects are accessed through different VOL connectors and can't be linked") + "Objects are accessed through different VOL connectors and can't be linked"); } /* end if */ /* Construct a temporary VOL object */ @@ -498,7 +498,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l (*tmp_vol_obj_ptr_ptr)->connector = curr_vol_obj->connector; else { if (NULL == link_vol_obj) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object pointer") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "NULL VOL object pointer"); (*tmp_vol_obj_ptr_ptr)->connector = link_vol_obj->connector; } /* end else */ @@ -519,7 +519,7 @@ H5L__create_hard_api_common(hid_t cur_loc_id, const char *cur_name, hid_t link_l /* Create the link */ if (H5VL_link_create(&vol_cb_args, *tmp_vol_obj_ptr_ptr, &link_loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create hard link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create hard link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -550,7 +550,7 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const c /* Creates a hard link synchronously */ if (H5L__create_hard_api_common(cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to synchronously create hard link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to synchronously create hard link"); done: FUNC_LEAVE_API(ret_value) @@ -592,7 +592,7 @@ H5Lcreate_hard_async(const char *app_file, const char *app_func, unsigned app_li /* Creates a hard link asynchronously */ if (H5L__create_hard_api_common(cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id, token_ptr, &vol_obj_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to asynchronously create hard link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to asynchronously create hard link"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -600,7 +600,7 @@ H5Lcreate_hard_async(const char *app_file, const char *app_func, unsigned app_li if (H5ES_insert(es_id, vol_obj_ptr->connector, token, H5ARG_TRACE10(__func__, "*s*sIui*si*siii", app_file, app_func, app_line, cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -643,11 +643,11 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i /* Check arguments */ if (!file_name || !*file_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no file name specified"); if (!obj_name || !*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name specified"); if (!link_name || !*link_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified"); /* Get the link creation property list */ if (H5P_DEFAULT == lcpl_id) @@ -658,18 +658,18 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get normalized copy of the link target */ if (NULL == (norm_obj_name = H5G_normalize(obj_name))) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize object name") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize object name"); /* Combine the filename and link name into a single buffer to give to the UD link */ file_name_len = HDstrlen(file_name) + 1; norm_obj_name_len = HDstrlen(norm_obj_name) + 1; buf_size = 1 + file_name_len + norm_obj_name_len; if (NULL == (ext_link_buf = H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate udata buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate udata buffer"); /* Encode the external link information */ p = (uint8_t *)ext_link_buf; @@ -685,7 +685,7 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(link_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_UD; @@ -696,7 +696,7 @@ H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_i /* Create an external link */ if (H5VL_link_create(&vol_cb_args, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create external link"); done: H5MM_xfree(ext_link_buf); @@ -740,11 +740,11 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, con /* Check arguments */ if (!link_name || !*link_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no link name specified"); if (link_type < H5L_TYPE_UD_MIN || link_type > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class"); if (!udata && udata_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "udata cannot be NULL if udata_size is non-zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "udata cannot be NULL if udata_size is non-zero"); /* Get the link creation property list */ if (H5P_DEFAULT == lcpl_id) @@ -755,7 +755,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, con /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); loc_params.type = H5VL_OBJECT_BY_NAME; loc_params.loc_data.loc_by_name.name = link_name; @@ -764,7 +764,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, con /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(link_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_CREATE_UD; @@ -775,7 +775,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, con /* Create user-defined link */ if (H5VL_link_create(&vol_cb_args, vol_obj, &loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link"); done: FUNC_LEAVE_API(ret_value) @@ -808,14 +808,14 @@ H5L__delete_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **tok /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_DELETE; /* Delete link */ if (H5VL_link_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -845,7 +845,7 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id) /* Delete a link synchronously */ if (H5L__delete_api_common(loc_id, name, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to synchronously delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to synchronously delete link"); done: FUNC_LEAVE_API(ret_value) @@ -878,7 +878,7 @@ H5Ldelete_async(const char *app_file, const char *app_func, unsigned app_line, h /* Delete a link asynchronously */ if (H5L__delete_api_common(loc_id, name, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to asynchronously delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to asynchronously delete link"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -886,7 +886,7 @@ H5Ldelete_async(const char *app_file, const char *app_func, unsigned app_line, h if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -918,23 +918,23 @@ H5L__delete_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t i /* Check arguments */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Set up object access arguments */ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_DELETE; /* Delete the link */ if (H5VL_link_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -967,7 +967,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_i /* Delete a link synchronously */ if (H5L__delete_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to synchronously delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to synchronously delete link"); done: FUNC_LEAVE_API(ret_value) @@ -1003,7 +1003,7 @@ H5Ldelete_by_idx_async(const char *app_file, const char *app_func, unsigned app_ /* Delete a link asynchronously */ if (H5L__delete_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to asynchronously delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to asynchronously delete link"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1011,7 +1011,7 @@ H5Ldelete_by_idx_async(const char *app_file, const char *app_func, unsigned app_ if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1046,11 +1046,11 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1060,7 +1060,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t /* Get the VOL object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_VAL; @@ -1069,7 +1069,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t /* Get the link value */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name); done: FUNC_LEAVE_API(ret_value) @@ -1104,15 +1104,15 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Check arguments */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1125,7 +1125,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Get the VOL object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_VAL; @@ -1134,7 +1134,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Get the link value */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value"); done: FUNC_LEAVE_API(ret_value) @@ -1165,11 +1165,11 @@ H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t la /* Check arguments */ /* name is verified in H5VL_setup_name_args() */ if (NULL == exists) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for link existence") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer for link existence"); /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_EXISTS; @@ -1177,7 +1177,7 @@ H5L__exists_api_common(hid_t loc_id, const char *name, hbool_t *exists, hid_t la /* Check for the existence of the link */ if (H5VL_link_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1204,7 +1204,7 @@ H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id) /* Synchronously check if a link exists */ exists = FALSE; if (H5L__exists_api_common(loc_id, name, &exists, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to synchronously check link existence") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to synchronously check link existence"); /* Set return value */ ret_value = (htri_t)exists; @@ -1239,7 +1239,7 @@ H5Lexists_async(const char *app_file, const char *app_func, unsigned app_line, h /* Asynchronously check if a link exists */ if (H5L__exists_api_common(loc_id, name, exists, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to asynchronously check link existence") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to asynchronously check link existence"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1247,7 +1247,7 @@ H5Lexists_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format off */ H5ARG_TRACE8(__func__, "*s*sIui*s*bii", app_file, app_func, app_line, loc_id, name, exists, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1276,11 +1276,11 @@ H5Lget_info2(hid_t loc_id, const char *name, H5L_info2_t *linfo /*out*/, hid_t l /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1290,7 +1290,7 @@ H5Lget_info2(hid_t loc_id, const char *name, H5L_info2_t *linfo /*out*/, hid_t l /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_INFO; @@ -1298,7 +1298,7 @@ H5Lget_info2(hid_t loc_id, const char *name, H5L_info2_t *linfo /*out*/, hid_t l /* Get the link information */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); done: FUNC_LEAVE_API(ret_value) @@ -1329,15 +1329,15 @@ H5Lget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check arguments */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1350,7 +1350,7 @@ H5Lget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_INFO; @@ -1358,7 +1358,7 @@ H5Lget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the link information */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); done: FUNC_LEAVE_API(ret_value) @@ -1390,7 +1390,7 @@ H5Lregister(const H5L_class_t *cls) /* Check args */ if (cls == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class"); /* Check H5L_class_t version number; this is where a function to convert * from an outdated version should be called. @@ -1400,23 +1400,23 @@ H5Lregister(const H5L_class_t *cls) * (in src/H5Gtraverse.c), so it's allowed to to pass through here. - QAK, 2018/02/06 */ if (cls->version > H5L_LINK_CLASS_T_VERS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5L_class_t version number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5L_class_t version number"); #ifdef H5_NO_DEPRECATED_SYMBOLS if (cls->version < H5L_LINK_CLASS_T_VERS) HGOTO_ERROR( H5E_ARGS, H5E_BADVALUE, FAIL, "deprecated H5L_class_t version number (%d) and library built without deprecated symbol support", - cls->version) + cls->version); #endif /* H5_NO_DEPRECATED_SYMBOLS */ if (cls->id < H5L_TYPE_UD_MIN || cls->id > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link identification number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link identification number"); if (cls->trav_func == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no traversal function specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no traversal function specified"); /* Do it */ if (H5L_register(cls) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register link type") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register link type"); done: FUNC_LEAVE_API(ret_value) @@ -1444,11 +1444,11 @@ H5Lunregister(H5L_type_t id) /* Check args */ if (id < 0 || id > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type"); /* Do it */ if (H5L_unregister(id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to unregister link type") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to unregister link type"); done: FUNC_LEAVE_API(ret_value) @@ -1477,11 +1477,11 @@ H5Lis_registered(H5L_type_t id) /* Check args */ if (id < 0 || id > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type id number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link type id number"); /* Is the link class already registered? */ if (H5L_is_registered(id, &is_registered) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "could not determine registration status of UD link type") + HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "could not determine registration status of UD link type"); ret_value = is_registered ? TRUE : FALSE; @@ -1519,15 +1519,15 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5 /* Check arguments */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, (-1), "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, (-1), "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1540,7 +1540,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5 /* Get the VOL object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_NAME; @@ -1550,7 +1550,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5 /* Get the link information */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, (-1), "unable to get link name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, (-1), "unable to get link name"); /* Set the return value */ ret_value = (ssize_t)link_name_len; @@ -1585,17 +1585,17 @@ H5L__iterate_api_common(hid_t group_id, H5_index_t idx_type, H5_iter_order_t ord /* Check arguments */ id_type = H5I_get_type(group_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Set up object access arguments */ if (H5VL_setup_self_args(group_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_ITER; @@ -1609,7 +1609,7 @@ H5L__iterate_api_common(hid_t group_id, H5_index_t idx_type, H5_iter_order_t ord /* Iterate over the links */ if ((ret_value = H5VL_link_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1644,7 +1644,7 @@ H5Literate2(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t /* Iterate over links synchronously */ if ((ret_value = H5L__iterate_api_common(group_id, idx_type, order, idx_p, op, op_data, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "synchronous link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "synchronous link iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -1687,7 +1687,7 @@ H5Literate_async(const char *app_file, const char *app_func, unsigned app_line, /* Iterate over links asynchronously */ if ((ret_value = H5L__iterate_api_common(group_id, idx_type, order, idx_p, op, op_data, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "asynchronous link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "asynchronous link iteration failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1695,7 +1695,7 @@ H5Literate_async(const char *app_file, const char *app_func, unsigned app_line, if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIuiIiIo*hLI*xi", app_file, app_func, app_line, group_id, idx_type, order, idx_p, op, op_data, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1734,23 +1734,23 @@ H5Literate_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check arguments */ if (!group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL"); if (!*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1770,7 +1770,7 @@ H5Literate_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Iterate over the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -1816,13 +1816,13 @@ H5Lvisit2(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Check args */ id_type = H5I_get_type(group_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1830,7 +1830,7 @@ H5Lvisit2(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(group_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_ITER; @@ -1844,7 +1844,7 @@ H5Lvisit2(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Iterate over the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); done: FUNC_LEAVE_API(ret_value) @@ -1889,23 +1889,23 @@ H5Lvisit_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Check args */ if (!group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL"); if (!*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1925,7 +1925,7 @@ H5Lvisit_by_name2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Visit the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); done: FUNC_LEAVE_API(ret_value) @@ -1966,21 +1966,21 @@ H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size, unsigned *flags, /* Sanity check external link buffer */ if (ext_linkval == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an external link linkval buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not an external link linkval buffer"); lnk_version = (*ext_linkval >> 4) & 0x0F; lnk_flags = *ext_linkval & 0x0F; if (lnk_version > H5L_EXT_VERSION) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link"); if (lnk_flags & (unsigned)~H5L_EXT_FLAGS_ALL) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link"); if (link_size <= 2) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid external link buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid external link buffer"); /* Try to do some error checking. If the last character in the linkval * (the last character of obj_path) isn't NULL, then something's wrong. */ if (ext_linkval[link_size - 1] != '\0') - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer is not NULL-terminated") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer is not NULL-terminated"); /* We're now guaranteed that HDstrlen won't segfault, since the buffer has * at least one NULL in it. @@ -1991,7 +1991,7 @@ H5Lunpack_elink_val(const void *_ext_linkval, size_t link_size, unsigned *flags, * this external link value has no object name and is invalid. */ if ((len + 1) >= (link_size - 1)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer doesn't contain an object path") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "linkval buffer doesn't contain an object path"); /* If we got here then the buffer contains (at least) two strings packed * in the correct way. Assume it's correct and return pointers to the diff --git a/src/H5Ldeprec.c b/src/H5Ldeprec.c index b1c3107..1399eec 100644 --- a/src/H5Ldeprec.c +++ b/src/H5Ldeprec.c @@ -103,7 +103,7 @@ H5L__iterate2_shim(hid_t group_id, const char *name, const H5L_info2_t *linfo2, if (H5L_TYPE_HARD == linfo2->type) { if (H5VLnative_token_to_addr(group_id, linfo2->u.token, &linfo.u.address) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTUNSERIALIZE, H5_ITER_ERROR, - "can't deserialize object token into address") + "can't deserialize object token into address"); } else linfo.u.val_size = linfo2->u.val_size; @@ -154,24 +154,24 @@ H5Literate1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t /* Check arguments */ id_type = H5I_get_type(group_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(group_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Literate1 is only meant to be used with the native VOL connector") + "H5Literate1 is only meant to be used with the native VOL connector"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -193,7 +193,7 @@ H5Literate1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t /* Iterate over the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -235,30 +235,30 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check arguments */ if (!group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL"); if (!*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Literate_by_name1 is only meant to be used with the native VOL connector") + "H5Literate_by_name1 is only meant to be used with the native VOL connector"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -282,7 +282,7 @@ H5Literate_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Iterate over the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -315,11 +315,11 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -329,14 +329,14 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Lget_info1 is only meant to be used with the native VOL connector") + "H5Lget_info1 is only meant to be used with the native VOL connector"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_INFO; @@ -344,7 +344,7 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l /* Get the link information */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); /* Copy the new-style members into the old-style struct */ if (linfo) { @@ -356,12 +356,12 @@ H5Lget_info1(hid_t loc_id, const char *name, H5L_info1_t *linfo /*out*/, hid_t l void *vol_obj_data; if (NULL == (vol_obj_data = H5VL_object_data(vol_obj))) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get underlying VOL object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get underlying VOL object"); if (H5VL_native_token_to_addr(vol_obj_data, loc_params.obj_type, linfo2.u.token, &linfo->u.address) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); } /* end if */ else linfo->u.val_size = linfo2.u.val_size; @@ -400,15 +400,15 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check arguments */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -421,14 +421,14 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Lget_info_by_idx1 is only meant to be used with the native VOL connector") + "H5Lget_info_by_idx1 is only meant to be used with the native VOL connector"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_LINK_GET_INFO; @@ -436,7 +436,7 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the link information */ if (H5VL_link_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); /* Copy the new-style members into the old-style struct */ if (linfo) { @@ -448,12 +448,12 @@ H5Lget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H void *vol_obj_data; if (NULL == (vol_obj_data = H5VL_object_data(vol_obj))) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get underlying VOL object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get underlying VOL object"); if (H5VL_native_token_to_addr(vol_obj_data, loc_params.obj_type, linfo2.u.token, &linfo->u.address) < 0) HGOTO_ERROR(H5E_LINK, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); } /* end if */ else linfo->u.val_size = linfo2.u.val_size; @@ -507,13 +507,13 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Check args */ id_type = H5I_get_type(group_id); if (!(H5I_GROUP == id_type || H5I_FILE == id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -521,14 +521,14 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(group_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Lvisit1 is only meant to be used with the native VOL connector") + "H5Lvisit1 is only meant to be used with the native VOL connector"); /* Set up shim */ shim_data.real_op = op; @@ -546,7 +546,7 @@ H5Lvisit1(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterat /* Iterate over the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); done: FUNC_LEAVE_API(ret_value) @@ -595,30 +595,30 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Check args */ if (!group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be NULL"); if (!*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "group_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info"); /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, - "H5Lvisit_by_name1 is only meant to be used with the native VOL connector") + "H5Lvisit_by_name1 is only meant to be used with the native VOL connector"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -642,7 +642,7 @@ H5Lvisit_by_name1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ /* Visit the links */ if ((ret_value = H5VL_link_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 1c148a4..d7edbad 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -125,9 +125,9 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons /* Check external link version & flags */ if (((*p >> 4) & 0x0F) > H5L_EXT_VERSION) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad version number for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad version number for external link"); if ((*p & 0x0F) & ~H5L_EXT_FLAGS_ALL) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad flags for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, H5I_INVALID_HID, "bad flags for external link"); p++; /* Gather some information from the external link's user data */ @@ -137,19 +137,19 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID"); /* Get the fapl_id set for lapl_id if any */ if (H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get fapl for links") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get fapl for links"); /* Get the location for the group holding the external link */ if (H5G_loc(cur_group, &loc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get object location") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get object location"); /* get the access flags set for lapl_id if any */ if (H5P_get(plist, H5L_ACS_ELINK_FLAGS_NAME, &intent) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink file access flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink file access flags"); /* get the file access mode flags for the parent file, if they were not set * on lapl_id */ @@ -157,15 +157,15 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons intent = H5F_INTENT(loc.oloc->file); if ((fapl_id == H5P_DEFAULT) && ((fapl_id = H5F_get_access_plist(loc.oloc->file, FALSE)) < 0)) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get parent's file access property list") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "can't get parent's file access property list"); /* Get callback_info */ if (H5P_get(plist, H5L_ACS_ELINK_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink callback info"); /* Get file access property list */ if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID"); /* Make callback if it exists */ if (cb_info.func) { @@ -177,7 +177,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons /* Query length of parent group name */ if (H5G_get_name(&loc, NULL, (size_t)0, &group_name_len, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve length of group name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve length of group name"); /* Account for null terminator */ group_name_len++; @@ -186,50 +186,50 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons if (group_name_len > sizeof(local_group_name)) { if (NULL == (parent_group_name = (char *)H5MM_malloc(group_name_len))) HGOTO_ERROR(H5E_LINK, H5E_CANTALLOC, H5I_INVALID_HID, - "can't allocate buffer to hold group name, group_name_len = %zu", group_name_len) + "can't allocate buffer to hold group name, group_name_len = %zu", group_name_len); } /* end if */ else parent_group_name = local_group_name; /* Get parent group name */ if (H5G_get_name(&loc, parent_group_name, group_name_len, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve group name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve group name"); /* Make callback */ if ((cb_info.func)(parent_file_name, parent_group_name, file_name, obj_name, &intent, fapl_id, cb_info.user_data) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, H5I_INVALID_HID, "traversal operator failed") + HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, H5I_INVALID_HID, "traversal operator failed"); /* Check access flags */ if ((intent & H5F_ACC_TRUNC) || (intent & H5F_ACC_EXCL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid file open flags"); } /* end if */ /* Set file close degree for new file to "weak" */ if (H5P_set(fa_plist, H5F_ACS_CLOSE_DEGREE_NAME, &fc_degree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set file close degree"); /* Get the current elink prefix */ if (H5P_peek(plist, H5L_ACS_ELINK_PREFIX_NAME, &elink_prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get external link prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get external link prefix"); /* Search for the target file */ if (NULL == (ext_file = H5F_prefix_open_file(loc.oloc->file, H5F_PREFIX_ELINK, elink_prefix, file_name, intent, fapl_id))) HGOTO_ERROR(H5E_LINK, H5E_CANTOPENFILE, H5I_INVALID_HID, - "unable to open external file, external link file name = '%s'", file_name) + "unable to open external file, external link file name = '%s'", file_name); /* Retrieve the "group location" for the file's root group */ if (H5G_root_loc(ext_file, &root_loc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, H5I_INVALID_HID, "unable to create location for file") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, H5I_INVALID_HID, "unable to create location for file"); /* Open the object referenced in the external file */ if (NULL == (ext_obj = H5O_open_name(&root_loc, obj_name, &opened_type))) - HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") + HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object"); /* Get an ID for the external link's object */ if ((ext_obj_id = H5VL_wrap_register(opened_type, ext_obj, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register external link object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register external link object"); /* Set return value */ ret_value = ext_obj_id; @@ -278,9 +278,9 @@ H5L__extern_query(const char H5_ATTR_UNUSED *link_name, const void *_udata, size /* Check external link version & flags */ if (((*udata >> 4) & 0x0F) != H5L_EXT_VERSION) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad version number for external link"); if ((*udata & 0x0F) & ~H5L_EXT_FLAGS_ALL) - HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDECODE, FAIL, "bad flags for external link"); /* If the buffer is NULL, skip writing anything in it and just return * the size needed */ @@ -318,7 +318,7 @@ H5L_register_external(void) FUNC_ENTER_NOAPI(FAIL) if (H5L_register(H5L_EXTERN_LINK_CLASS) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Lint.c b/src/H5Lint.c index a6a3824..554dd14 100644 --- a/src/H5Lint.c +++ b/src/H5Lint.c @@ -207,7 +207,7 @@ H5L_init(void) /* Initialize user-defined link classes */ if (H5L_register_external() < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -288,7 +288,7 @@ H5L_find_class(H5L_type_t id) /* Get the index in the global table */ if ((idx = H5L__find_class_idx(id)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class"); /* Set return value */ ret_value = H5L_table_g + idx; @@ -331,7 +331,7 @@ H5L_register(const H5L_class_t *cls) size_t n = MAX(H5L_MIN_TABLE_SIZE, (2 * H5L_table_alloc_g)); H5L_class_t *table = (H5L_class_t *)H5MM_realloc(H5L_table_g, (n * sizeof(H5L_class_t))); if (!table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table"); H5L_table_g = table; H5L_table_alloc_g = n; } /* end if */ @@ -375,7 +375,7 @@ H5L_unregister(H5L_type_t id) /* Fail if filter not found */ if (i >= H5L_table_used_g) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered"); /* Remove filter from table */ /* Don't worry about shrinking table size (for now) */ @@ -451,7 +451,7 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid /* Create the link */ if (H5L__create_real(new_loc, new_name, obj_loc->path, obj_loc->oloc->file, &lnk, NULL, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -489,7 +489,7 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t /* Create the link */ if (H5L__create_real(new_loc, new_name, NULL, NULL, &lnk, ocrt_info, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -521,7 +521,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT /* Check if the name in this group resolved to a valid location */ /* (which is not what we want) */ if (obj_loc != NULL) - HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name already exists") + HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name already exists"); /* Check for crossing file boundaries with a new hard link */ if (udata->lnk->type == H5L_TYPE_HARD) { @@ -534,7 +534,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT if (NULL == (udata->ocrt_info->new_obj = H5O_obj_create(grp_loc->oloc->file, udata->ocrt_info->obj_type, udata->ocrt_info->crt_info, &new_loc))) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create object"); /* Set address for hard link */ udata->lnk->u.hard.addr = new_loc.oloc->addr; @@ -548,7 +548,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT else { /* Check that both objects are in same file */ if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file)) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "interfile hard links are not allowed") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "interfile hard links are not allowed"); } /* end else */ } /* end if */ @@ -561,7 +561,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT if (udata->lc_plist) { /* Get character encoding property */ if (H5CX_get_encoding(&udata->lnk->cset) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'character set' property") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'character set' property"); } /* end if */ else udata->lnk->cset = H5F_DEFAULT_CSET; /* Default character encoding for link */ @@ -575,12 +575,12 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, udata->ocrt_info ? udata->ocrt_info->obj_type : H5O_TYPE_UNKNOWN, udata->ocrt_info ? udata->ocrt_info->crt_info : NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object"); /* Set object's path if it has been passed in and is not set */ if (udata->path != NULL && udata->path->user_path_r == NULL) if (H5G_name_set(grp_loc->path, udata->path, name) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "cannot set name") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "cannot set name"); /* If link is a user-defined link, trigger its creation callback if it has one */ if (udata->lnk->type >= H5L_TYPE_UD_MIN) { @@ -588,7 +588,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT /* Get the link class for this type of link. */ if (NULL == (link_class = H5L_find_class(udata->lnk->type))) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to get class of UD link") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to get class of UD link"); if (link_class->create_func != NULL) { H5O_loc_t temp_oloc; @@ -599,7 +599,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT */ H5G_name_reset(&temp_path); if (H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location"); temp_loc.oloc = &temp_oloc; temp_loc.path = &temp_path; @@ -607,14 +607,14 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT /* Set up location for user-defined callback */ if (NULL == (grp = H5G_open(&temp_loc))) - HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group"); if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register ID for group") + HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register ID for group"); /* Make callback */ if ((link_class->create_func)(name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size, H5P_DEFAULT) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "link creation callback failed") + HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "link creation callback failed"); } /* end if */ } /* end if */ @@ -688,7 +688,7 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o /* Get normalized link name */ if ((norm_link_name = H5G_normalize(link_name)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name"); /* Check for flags present in creation property list */ if (lcpl_id != H5P_DEFAULT) { @@ -696,11 +696,11 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o /* Get link creation property list */ if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get intermediate group creation property */ if (H5CX_get_intermediate_group(&crt_intmd_group) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property"); if (crt_intmd_group > 0) target_flags |= H5G_CRT_INTMD_GROUP; @@ -726,7 +726,7 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o /* Traverse the destination path & create new link */ if (H5G_traverse(link_loc, link_name, target_flags, H5L__link_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert link"); done: /* Free the normalized path name */ @@ -768,7 +768,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link /* Get normalized copy of the current name */ if ((norm_cur_name = H5G_normalize(cur_name)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name"); /* Set up link data specific to hard links */ lnk.type = H5L_TYPE_HARD; @@ -778,7 +778,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link obj_loc.oloc = &oloc; H5G_loc_reset(&obj_loc); if (H5G_loc_find(cur_loc, norm_cur_name, &obj_loc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "source object not found") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "source object not found"); loc_valid = TRUE; /* Construct link information for eventual insertion */ @@ -790,7 +790,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link /* Create actual link to the object. Pass in NULL for the path, since this * function shouldn't change an object's user path. */ if (H5L__create_real(link_loc, link_name, NULL, link_file, &lnk, NULL, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object"); done: /* Free the object header location */ @@ -830,7 +830,7 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char /* Get normalized copy of the link target */ if ((norm_target = H5G_normalize(target_path)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name"); /* Set up link data specific to soft links */ lnk.type = H5L_TYPE_SOFT; @@ -838,7 +838,7 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char /* Create actual link to the object */ if (H5L__create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object"); done: /* Free the normalized target name */ @@ -878,7 +878,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_ /* Make sure that this link class is registered */ if (H5L__find_class_idx(type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library"); /* Fill in UD link-specific information in the link struct*/ if (ud_data_size > 0) { @@ -893,7 +893,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_ /* Create actual link to the object */ if (H5L__create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to register new name for object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to register new name for object"); done: /* Free the link's udata buffer if it's been allocated */ @@ -942,13 +942,13 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size) if (link_class != NULL && link_class->query_func != NULL) { if ((link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, buf, size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query callback returned failure") + HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query callback returned failure"); } /* end if */ else if (buf && size > 0) ((char *)buf)[0] = '\0'; } /* end if */ else - HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "object is not a symbolic or user-defined link") + HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "object is not a symbolic or user-defined link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -974,11 +974,11 @@ H5L__get_val_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, cons /* Check if the name in this group resolved to a valid link */ if (lnk == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name) + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name); /* Retrieve the value for the link */ if (H5L__get_val_real(lnk, udata->buf, udata->size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value"); done: /* Indicate that this callback didn't take ownership of the group * @@ -1022,7 +1022,7 @@ H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t s /* Traverse the group hierarchy to locate the object to get info about */ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_val_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1052,16 +1052,16 @@ H5L__get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_A /* Check if the name of the group resolved to a valid object */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Query link */ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found"); lnk_copied = TRUE; /* Retrieve the value for the link */ if (H5L__get_val_real(&fnd_lnk, udata->buf, udata->size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value"); done: /* Reset the link information, if we have a copy */ @@ -1107,7 +1107,8 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, /* Traverse the group hierarchy to locate the object to get info about */ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_val_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info for index: %llu", (unsigned long long)n) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info for index: %llu", + (unsigned long long)n); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1134,22 +1135,22 @@ H5L__delete_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *ln /* Check if the group resolved to a valid link */ if (grp_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Check if the name in this group resolved to a valid link */ if (name == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Check for non-existent (NULL) link. * Note that this can also occur when attempting to remove '.' */ if (lnk == NULL) HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, - "callback link pointer is NULL (specified link may be '.' or not exist)") + "callback link pointer is NULL (specified link may be '.' or not exist)"); /* Remove the link from the group */ if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, name) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to remove link from group") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to remove link from group"); done: /* Indicate that this callback didn't take ownership of the group * @@ -1182,12 +1183,12 @@ H5L__delete(const H5G_loc_t *loc, const char *name) /* Get normalized copy of the name */ if ((norm_name = H5G_normalize(name)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name") + HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name"); /* Set up user data for unlink operation */ if (H5G_traverse(loc, norm_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT, H5L__delete_cb, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTREMOVE, FAIL, "can't unlink object") + HGOTO_ERROR(H5E_LINK, H5E_CANTREMOVE, FAIL, "can't unlink object"); done: /* Free the normalized path name */ @@ -1218,12 +1219,12 @@ H5L__delete_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_AT /* Check if the name of the group resolved to a valid object */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Delete link */ if (H5G_obj_remove_by_idx(obj_loc->oloc, obj_loc->path->full_path_r, udata->idx_type, udata->order, udata->n) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found"); done: /* Indicate that this callback didn't take ownership of the group * @@ -1264,7 +1265,7 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, /* Traverse the group hierarchy to remove the link */ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT, H5L__delete_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "link doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "link doesn't exist"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1296,13 +1297,13 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t /* Make sure an object with this name doesn't already exist */ if (obj_loc != NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "an object with that name already exists") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "an object with that name already exists"); /* Check for crossing file boundaries with a new hard link */ if (udata->lnk->type == H5L_TYPE_HARD) /* Check that both objects are in same file */ if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file)) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed"); /* Give the object its new name */ assert(udata->lnk->name == NULL); @@ -1312,7 +1313,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t /* Insert the link into the group */ if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object"); /* If the link was a user-defined link, call its move callback if it has one */ if (udata->lnk->type >= H5L_TYPE_UD_MIN) { @@ -1320,7 +1321,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t /* Get the link class for this type of link. */ if (NULL == (link_class = H5L_find_class(udata->lnk->type))) - HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered") + HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered"); if ((!udata->copy && link_class->move_func) || (udata->copy && link_class->copy_func)) { H5O_loc_t temp_oloc; @@ -1331,7 +1332,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t */ H5G_name_reset(&temp_path); if (H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location"); temp_loc.oloc = &temp_oloc; temp_loc.path = &temp_path; @@ -1339,19 +1340,19 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t /* Set up location for user-defined callback */ if (NULL == (grp = H5G_open(&temp_loc))) - HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group"); if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register group ID") + HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register group ID"); if (udata->copy) { if ((link_class->copy_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD copy callback returned error") + HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD copy callback returned error"); } /* end if */ else { if ((link_class->move_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD move callback returned error") + HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD move callback returned error"); } /* end else */ } /* end if */ } /* end if */ @@ -1405,15 +1406,15 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk, /* Check if the name in this group resolved to a valid link */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Check for operations on '.' */ if (lnk == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy"); /* Set up user data for move_dest_cb */ if (NULL == (udata_out.lnk = (H5O_link_t *)H5O_msg_copy(H5O_LINK_ID, lnk, NULL))) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved"); /* In this special case, the link's name is going to be replaced at its * destination, so we should free it here. @@ -1432,12 +1433,12 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk, * (destination) traversal has the correct value */ if (H5CX_set_nlinks(udata->orig_nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse"); /* Insert the link into its new location */ if (H5G_traverse(udata->dst_loc, udata->dst_name, udata->dst_target_flags, H5L__move_dest_cb, &udata_out) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to follow symbolic link") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to follow symbolic link"); /* If this is a move and not a copy operation, change the object's name and remove the old link */ if (!udata->copy) { @@ -1450,7 +1451,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk, /* Create reference counted string for full dst path */ if ((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r, udata->dst_name)) == NULL) - HGOTO_ERROR(H5E_LINK, H5E_PATH, FAIL, "can't build destination path name") + HGOTO_ERROR(H5E_LINK, H5E_PATH, FAIL, "can't build destination path name"); } /* end if */ else dst_name_r = H5RS_wrap(udata->dst_name); @@ -1460,13 +1461,13 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk, if (H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r, udata->dst_loc->oloc->file, dst_name_r) < 0) { H5RS_decr(dst_name_r); - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to replace name") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to replace name"); } /* end if */ /* Remove the old link */ if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, orig_name) < 0) { H5RS_decr(dst_name_r); - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to remove old name") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to remove old name"); } /* end if */ H5RS_decr(dst_name_r); @@ -1531,11 +1532,11 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l unsigned crt_intmd_group; if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get intermediate group creation property */ if (H5CX_get_intermediate_group(&crt_intmd_group) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups"); /* Set target flags for source and destination */ if (crt_intmd_group > 0) @@ -1543,7 +1544,7 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l /* Get character encoding property */ if (H5CX_get_encoding(&char_encoding) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding"); } /* end if */ /* Set up user data */ @@ -1557,12 +1558,12 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l * that the countdown can be reset after the first path is traversed. */ if (H5CX_get_nlinks(&udata.orig_nlinks) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse"); /* Do the move */ if (H5G_traverse(src_loc, src_name, H5G_TARGET_MOUNT | H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__move_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to find link") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to find link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1637,7 +1638,7 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT cb_func = H5L__exists_inter_cb; } /* end else */ if (H5G_traverse(obj_loc, next, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists"); } /* end if */ else *udata->exists = TRUE; @@ -1705,7 +1706,7 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists) /* Traverse the group hierarchy to locate the link to check */ if (H5G_traverse(loc, name_trav, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists"); } done: @@ -1747,7 +1748,7 @@ H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists) /* Traverse the group hierarchy to locate the object to get info about */ udata.exists = exists; if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__exists_final_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "link doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "link doesn't exist"); } done: @@ -1774,11 +1775,11 @@ H5L__get_info_cb(H5G_loc_t *grp_loc /*in*/, const char H5_ATTR_UNUSED *name, con /* Check if the name in this group resolved to a valid link */ if (lnk == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist"); /* Get information from the link */ if (H5G_link_to_info(grp_loc->oloc, lnk, udata->linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info"); done: /* Indicate that this callback didn't take ownership of the group * @@ -1809,7 +1810,7 @@ H5L_get_info(const H5G_loc_t *loc, const char *name, H5L_info2_t *linfo /*out*/) /* Traverse the group hierarchy to locate the object to get info about */ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_info_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name doesn't exist"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1839,16 +1840,16 @@ H5L__get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name of the group resolved to a valid object */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Query link */ if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found"); lnk_copied = TRUE; /* Get information from the link */ if (H5G_link_to_info(obj_loc->oloc, &fnd_lnk, udata->linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info"); done: /* Reset the link information, if we have a copy */ @@ -1894,7 +1895,7 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type /* Traverse the group hierarchy to locate the object to get info about */ if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_info_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1922,12 +1923,12 @@ H5L__get_name_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ /* Check if the name of the group resolved to a valid object */ if (obj_loc == NULL) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist"); /* Query link */ if (H5G_obj_get_name_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, udata->name, udata->size, &udata->name_len) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found"); done: /* Indicate that this callback didn't take ownership of the group * @@ -1972,7 +1973,7 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id /* Traverse the group hierarchy to locate the link to get name of */ if (H5G_traverse(loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_name_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get name"); /* Set the return value */ *link_name_len = udata.name_len; @@ -2028,24 +2029,24 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t /* Check if the target object exists */ if (H5G_loc_exists(&lnk_grp_loc, src_lnk->name, &tar_exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to check if target object exists") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to check if target object exists"); if (tar_exists) { /* Make a temporary copy of the link, so that it will not change the * info in the cache when we change it to a hard link */ if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk)) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message"); /* Set up group location for target object. Let H5G_traverse expand * the link. */ tmp_src_loc.path = &tmp_src_path; tmp_src_loc.oloc = &tmp_src_oloc; if (H5G_loc_reset(&tmp_src_loc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to reset location") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to reset location"); /* Find the target object */ if (H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to find target object") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to find target object"); expanded_link_open = TRUE; /* Convert symbolic link to hard link */ @@ -2061,7 +2062,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t /* Copy src link information to dst link information */ if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk)) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message"); dst_lnk_init = TRUE; /* Check if object in source group is a hard link & copy it */ @@ -2084,7 +2085,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t /* Don't care about obj_type or udata because those are only important * for old style groups */ if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, TRUE, NULL, NULL) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Copy new destination object's information for eventual insertion */ dst_lnk->u.hard.addr = new_dst_oloc.addr; @@ -2142,7 +2143,7 @@ H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter /* Iterate over the links */ if ((ret_value = H5G_iterate(loc, group_name, idx_type, order, idx, &last_lnk, &lnk_op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed"); /* Set the index we stopped at */ if (idx_p) diff --git a/src/H5M.c b/src/H5M.c index 600785e..cb8f771 100644 --- a/src/H5M.c +++ b/src/H5M.c @@ -92,7 +92,7 @@ H5M_init(void) /* Initialize the ID group for the map IDs */ if (H5I_register_type(H5I_MAP_CLS) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, FAIL, "unable to initialize interface"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -217,26 +217,26 @@ H5M__create_api_common(hid_t loc_id, const char *name, hid_t key_type_id, hid_t /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Get link creation property list */ if (H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "lcpl_id is not a link creation property list"); /* Get map creation property list */ if (H5P_DEFAULT == mcpl_id) mcpl_id = H5P_MAP_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(mcpl_id, H5P_MAP_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "mcpl_id is not a map create property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "mcpl_id is not a map create property list ID"); /* Set up VOL callback arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, TRUE, &mapl_id, vol_obj_ptr, &map_args.create.loc_params) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); map_args.create.name = name; map_args.create.lcpl_id = lcpl_id; map_args.create.key_type_id = key_type_id; @@ -249,12 +249,12 @@ H5M__create_api_common(hid_t loc_id, const char *name, hid_t key_type_id, hid_t /* Create the map */ if (H5VL_optional(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, H5I_INVALID_HID, "unable to create map") + HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, H5I_INVALID_HID, "unable to create map"); map = map_args.create.map; /* Get an ID for the map */ if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map handle") + HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map handle"); done: /* Cleanup on failure */ @@ -299,7 +299,7 @@ H5Mcreate(hid_t loc_id, const char *name, hid_t key_type_id, hid_t val_type_id, /* Create the map synchronously */ if ((ret_value = H5M__create_api_common(loc_id, name, key_type_id, val_type_id, lcpl_id, mcpl_id, mapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create map synchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create map synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -337,7 +337,7 @@ H5Mcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* Create the map asynchronously */ if ((ret_value = H5M__create_api_common(loc_id, name, key_type_id, val_type_id, lcpl_id, mcpl_id, mapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create map asynchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create map asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -347,7 +347,7 @@ H5Mcreate_async(const char *app_file, const char *app_func, unsigned app_line, h /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_MAP, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on map ID"); - HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -394,15 +394,15 @@ H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id, hid_t mcpl_id if (H5P_DEFAULT == mcpl_id) mcpl_id = H5P_MAP_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(mcpl_id, H5P_MAP_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not map create property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not map create property list ID"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&mapl_id, H5P_CLS_MACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Set location parameters */ @@ -421,12 +421,12 @@ H5Mcreate_anon(hid_t loc_id, hid_t key_type_id, hid_t val_type_id, hid_t mcpl_id /* Create the map */ if (H5VL_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, H5I_INVALID_HID, "unable to create map") + HGOTO_ERROR(H5E_MAP, H5E_CANTINIT, H5I_INVALID_HID, "unable to create map"); map = map_args.create.map; /* Get an ID for the map */ if ((ret_value = H5VL_register(H5I_MAP, map, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map") + HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register map"); done: /* Cleanup on failure */ @@ -469,14 +469,14 @@ H5M__open_api_common(hid_t loc_id, const char *name, hid_t mapl_id, void **token /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up VOL callback arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_MACC, FALSE, &mapl_id, vol_obj_ptr, &map_args.open.loc_params) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_MAP, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); map_args.open.name = name; map_args.open.mapl_id = mapl_id; map_args.open.map = NULL; @@ -485,12 +485,12 @@ H5M__open_api_common(hid_t loc_id, const char *name, hid_t mapl_id, void **token /* Open the map */ if (H5VL_optional(*vol_obj_ptr, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open map") + HGOTO_ERROR(H5E_MAP, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open map"); map = map_args.open.map; /* Register an ID for the map */ if ((ret_value = H5VL_register(H5I_MAP, map, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register map ID") + HGOTO_ERROR(H5E_MAP, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register map ID"); done: /* Cleanup on failure */ @@ -531,7 +531,7 @@ H5Mopen(hid_t loc_id, const char *name, hid_t mapl_id) /* Open the map synchronously */ if ((ret_value = H5M__open_api_common(loc_id, name, mapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to open map synchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to open map synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -566,7 +566,7 @@ H5Mopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the map asynchronously */ if ((ret_value = H5M__open_api_common(loc_id, name, mapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to open map asynchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTCREATE, H5I_INVALID_HID, "unable to open map asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -576,7 +576,7 @@ H5Mopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_MAP, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on map ID"); - HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -604,13 +604,13 @@ H5Mclose(hid_t map_id) /* Check args */ if (H5I_MAP != H5I_get_type(map_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a map ID"); /* Decrement the counter on the map. It will be freed if the count * reaches zero. */ if (H5I_dec_app_ref_always_close(map_id) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTDEC, FAIL, "can't decrement count on map ID") + HGOTO_ERROR(H5E_MAP, H5E_CANTDEC, FAIL, "can't decrement count on map ID"); done: FUNC_LEAVE_API(ret_value) @@ -639,11 +639,11 @@ H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check args */ if (H5I_MAP != H5I_get_type(map_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a map ID"); /* Get map object's connector */ if (NULL == (vol_obj = H5VL_vol_object(map_id))) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "can't get VOL object for map") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "can't get VOL object for map"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { @@ -660,7 +660,7 @@ H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * reaches zero. */ if (H5I_dec_app_ref_always_close_async(map_id, token_ptr) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID") + HGOTO_ERROR(H5E_MAP, H5E_CANTDEC, FAIL, "can't decrement count on dataset ID"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -668,7 +668,7 @@ H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, map_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -703,7 +703,7 @@ H5Mget_key_type(hid_t map_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier"); /* Set up VOL callback arguments */ map_args.get.get_type = H5VL_MAP_GET_KEY_TYPE; @@ -713,7 +713,7 @@ H5Mget_key_type(hid_t map_id) /* Get the key datatype */ if (H5VL_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get key datatype") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get key datatype"); /* Set return value */ ret_value = map_args.get.args.get_key_type.type_id; @@ -748,7 +748,7 @@ H5Mget_val_type(hid_t map_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier"); /* Set up VOL callback arguments */ map_args.get.get_type = H5VL_MAP_GET_VAL_TYPE; @@ -758,7 +758,7 @@ H5Mget_val_type(hid_t map_id) /* Get the value datatype */ if (H5VL_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get value datatype") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get value datatype"); /* Set return value */ ret_value = map_args.get.args.get_val_type.type_id; @@ -793,7 +793,7 @@ H5Mget_create_plist(hid_t map_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier"); /* Set up VOL callback arguments */ map_args.get.get_type = H5VL_MAP_GET_MCPL; @@ -803,7 +803,7 @@ H5Mget_create_plist(hid_t map_id) /* Get the map creation property list */ if (H5VL_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get map creation properties") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get map creation properties"); /* Set return value */ ret_value = map_args.get.args.get_mcpl.mcpl_id; @@ -841,7 +841,7 @@ H5Mget_access_plist(hid_t map_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier"); /* Set up VOL callback arguments */ map_args.get.get_type = H5VL_MAP_GET_MAPL; @@ -851,7 +851,7 @@ H5Mget_access_plist(hid_t map_id) /* Get the map access property list */ if (H5VL_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get map access properties") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get map access properties"); /* Set return value */ ret_value = map_args.get.args.get_mapl.mapl_id; @@ -885,13 +885,13 @@ H5Mget_count(hid_t map_id, hsize_t *count /*out*/, hid_t dxpl_id) /* Check args */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid map identifier"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -904,7 +904,7 @@ H5Mget_count(hid_t map_id, hsize_t *count /*out*/, hid_t dxpl_id) /* Get the number of key-value pairs stored in the map */ if (H5VL_optional(vol_obj, &vol_cb_args, dxpl_id, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get KV pair count for map") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, H5I_INVALID_HID, "unable to get KV pair count for map"); /* Set value to return */ if (count) @@ -938,19 +938,19 @@ H5M__put_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t /* Check arguments */ if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); if (val_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value memory datatype ID"); /* Get map pointer */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -965,7 +965,7 @@ H5M__put_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t /* Set the key/value pair */ if (H5VL_optional(*vol_obj_ptr, &vol_cb_args, dxpl_id, token_ptr) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTSET, FAIL, "unable to put key/value pair") + HGOTO_ERROR(H5E_MAP, H5E_CANTSET, FAIL, "unable to put key/value pair"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -999,7 +999,7 @@ H5Mput(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_ /* Add key-value pair to the map synchronously */ if ((ret_value = H5M__put_api_common(map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTPUT, FAIL, "unable to put value to map synchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTPUT, FAIL, "unable to put value to map synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -1035,7 +1035,7 @@ H5Mput_async(const char *app_file, const char *app_func, unsigned app_line, hid_ /* Add key-value pair to the map asynchronously */ if ((ret_value = H5M__put_api_common(map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTPUT, FAIL, "unable to put value to map asynchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTPUT, FAIL, "unable to put value to map asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1043,7 +1043,7 @@ H5Mput_async(const char *app_file, const char *app_func, unsigned app_line, hid_ if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1073,19 +1073,19 @@ H5M__get_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t /* Check arguments */ if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); if (val_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value memory datatype ID"); /* Get map pointer */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1100,7 +1100,7 @@ H5M__get_api_common(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t /* Get the value for the key */ if (H5VL_optional(*vol_obj_ptr, &vol_cb_args, dxpl_id, token_ptr) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1137,7 +1137,7 @@ H5Mget(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_ /* Get key-value pair from the map synchronously */ if ((ret_value = H5M__get_api_common(map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map synchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -1173,7 +1173,7 @@ H5Mget_async(const char *app_file, const char *app_func, unsigned app_line, hid_ /* Get key-value pair from the map asynchronously */ if ((ret_value = H5M__get_api_common(map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map asynchronously") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, FAIL, "unable to get value from map asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1181,7 +1181,7 @@ H5Mget_async(const char *app_file, const char *app_func, unsigned app_line, hid_ if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1213,17 +1213,17 @@ H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key, hbool_t *exists, /* Check arguments */ if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); /* Get map pointer */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1237,7 +1237,7 @@ H5Mexists(hid_t map_id, hid_t key_mem_type_id, const void *key, hbool_t *exists, /* Check if key exists */ if (H5VL_optional(vol_obj, &vol_cb_args, dxpl_id, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTGET, ret_value, "unable to check if key exists") + HGOTO_ERROR(H5E_MAP, H5E_CANTGET, ret_value, "unable to check if key exists"); /* Set value to return */ if (exists) @@ -1291,19 +1291,19 @@ H5Miterate(hid_t map_id, hsize_t *idx, hid_t key_mem_type_id, H5M_iterate_t op, /* Check arguments */ if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Get map pointer */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1376,23 +1376,23 @@ H5Miterate_by_name(hid_t loc_id, const char *map_name, hsize_t *idx, hid_t key_m /* Check arguments */ if (!map_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "map_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "map_name parameter cannot be NULL"); if (!*map_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "map_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "map_name parameter cannot be an empty string"); if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified"); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1450,17 +1450,17 @@ H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t dxpl_id) /* Check arguments */ if (key_mem_type_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid key memory datatype ID"); /* Get map pointer */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(map_id, H5I_MAP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "map_id is not a map ID"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -1476,7 +1476,7 @@ H5Mdelete(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t dxpl_id) /* Delete the key/value pair */ if (H5VL_optional(vol_obj, &vol_cb_args, dxpl_id, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_MAP, H5E_CANTSET, FAIL, "unable to delete key/value pair") + HGOTO_ERROR(H5E_MAP, H5E_CANTSET, FAIL, "unable to delete key/value pair"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5MF.c b/src/H5MF.c index 91d22b4..2c9fb6d 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -223,7 +223,7 @@ H5MF_init_merge_flags(H5F_shared_t *f_sh) break; default: - HGOTO_ERROR(H5E_RESOURCE, H5E_BADVALUE, FAIL, "invalid mapping type") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADVALUE, FAIL, "invalid mapping type"); } /* end switch */ done: @@ -332,7 +332,7 @@ H5MF__open_fstype(H5F_t *f, H5F_mem_page_t type) /* Open an existing free space structure for the file */ if (NULL == (f->shared->fs_man[type] = H5FS_open(f, f->shared->fs_addr[type], NELMTS(classes), classes, f, alignment, threshold))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info"); /* Set the state for the free space manager to "open", if it is now */ if (f->shared->fs_man[type]) @@ -413,7 +413,7 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type) if (NULL == (f->shared->fs_man[type] = H5FS_create(f, NULL, &fs_create, NELMTS(classes), classes, f, alignment, threshold))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space info"); /* Set the state for the free space manager to "open", if it is now */ if (f->shared->fs_man[type]) @@ -461,12 +461,12 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type) if (H5_addr_defined(f->shared->fs_addr[type])) { /* Open existing free space manager */ if (H5MF__open_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, FAIL, "can't initialize file free space"); } /* end if */ else { /* Create new free space manager */ if (H5MF__create_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCREATE, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCREATE, FAIL, "can't initialize file free space"); } /* end else */ done: @@ -525,7 +525,7 @@ H5MF__delete_fstype(H5F_t *f, H5F_mem_page_t type) /* Delete free space manager for this type */ if (H5FS_delete(f, tmp_fs_addr) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't delete free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't delete free space manager"); /* Shift [back] to closed state */ assert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING); @@ -578,7 +578,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type) /* Close an existing free space structure for the file */ if (H5FS_close(f, f->shared->fs_man[type]) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't release free space info"); f->shared->fs_man[type] = NULL; f->shared->fs_state[type] = H5F_FS_STATE_CLOSED; @@ -633,7 +633,7 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio #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) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space"); done: /* Reset the ring in the API context */ @@ -676,7 +676,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h /* Try to get a section from the free space manager */ if ((ret_value = H5FS_sect_find(f, fspace, size, (H5FS_section_info_t **)&node)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "error locating free space in file"); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: section found = %d\n", __func__, ret_value); @@ -699,7 +699,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h /* Free section node */ if (H5MF__sect_free((H5FS_section_info_t *)node) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node"); } /* end if */ else { /* Adjust information for section */ @@ -713,7 +713,7 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h /* Re-add the section to the free-space manager */ if (H5MF__add_sect(f, alloc_type, fspace, node) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space"); } /* end else */ } /* end if */ @@ -778,20 +778,20 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) */ if (H5AC_unsettle_ring(f, fsm_ring) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_SYSTEM, HADDR_UNDEF, - "attempt to notify cache that ring is unsettled failed") + "attempt to notify cache that ring is unsettled failed"); /* Check if the free space manager for the file has been initialized */ if (!f->shared->fs_man[fs_type] && H5_addr_defined(f->shared->fs_addr[fs_type])) { /* 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, HADDR_UNDEF, "can't initialize file free space"); assert(f->shared->fs_man[fs_type]); } /* end if */ /* Search for large enough space in the free space manager */ if (f->shared->fs_man[fs_type]) if (H5MF__find_sect(f, alloc_type, size, f->shared->fs_man[fs_type], &ret_value) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "error locating a node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "error locating a node"); } /* end if */ /* If no space is found from the free-space manager, continue further action */ @@ -803,11 +803,11 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) 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") + "allocation failed from paged aggregation"); } /* end if */ else { /* For non-paged aggregation, continue further action */ if (HADDR_UNDEF == (ret_value = H5MF_aggr_vfd_alloc(f, alloc_type, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed from aggr/vfd"); } /* end else */ } /* end if */ assert(H5_addr_defined(ret_value)); @@ -877,14 +877,14 @@ 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa"); assert(!(eoa % f->shared->fs_page_size)); H5MF_EOA_MISALIGN(f, (eoa + size), f->shared->fs_page_size, frag_size); /* Allocate from VFD */ if (HADDR_UNDEF == (ret_value = H5F__alloc(f, alloc_type, size + frag_size, NULL, NULL))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space"); /* If there is a mis-aligned fragment at EOA */ if (frag_size) { @@ -893,17 +893,17 @@ 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") + "can't initialize file free space"); /* Create free space section for the fragment */ if (NULL == (node = H5MF__sect_new(H5MF_FSPACE_SECT_LARGE, ret_value + size, frag_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, - "can't initialize free space section") + "can't initialize free space section"); /* Add the fragment to the large free-space manager */ if (H5MF__add_sect(f, alloc_type, f->shared->fs_man[ptype], node) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, HADDR_UNDEF, - "can't re-add section to file free space") + "can't re-add section to file free space"); node = NULL; } /* end if */ @@ -919,22 +919,22 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) /* Allocate one file space page */ if (HADDR_UNDEF == (new_page = H5MF_alloc(f, alloc_type, f->shared->fs_page_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space"); /* Start up the free-space manager */ 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, "can't initialize file free space"); 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)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, HADDR_UNDEF, "can't initialize free space section"); /* Add the remaining space in the page to the manager */ if (H5MF__add_sect(f, alloc_type, f->shared->fs_man[ptype], node) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, HADDR_UNDEF, - "can't re-add section to file free space") + "can't re-add section to file free space"); node = NULL; @@ -942,7 +942,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) we don't read an empty page from disk */ if (f->shared->page_buf != NULL && H5PB_add_new_page(f->shared, alloc_type, new_page) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, HADDR_UNDEF, - "can't add new page to Page Buffer new page list") + "can't add new page to Page Buffer new page list"); ret_value = new_page; } break; @@ -951,7 +951,7 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) case H5F_MEM_PAGE_DEFAULT: default: HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, - "can't allocate file space: unrecognized type") + "can't allocate file space: unrecognized type"); break; } /* end switch */ @@ -1012,14 +1012,14 @@ H5MF_alloc_tmp(H5F_t *f, hsize_t size) /* Retrieve the 'eoa' for the file */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed"); /* Compute value to return */ ret_value = f->shared->tmp_addr - size; /* Check for overlap into the actual allocated space in the file */ if (H5_addr_le(ret_value, eoa)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "driver get_eoa request failed"); /* Adjust temporary address allocator in the file */ f->shared->tmp_addr = ret_value; @@ -1077,11 +1077,11 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) if (H5F_HAVE_FREE_SPACE_MANAGER(f)) if (H5AC_unsettle_ring(f, fsm_ring) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_SYSTEM, FAIL, - "attempt to notify cache that ring is unsettled failed") + "attempt to notify cache that ring is unsettled failed"); /* Check for attempting to free space that's a 'temporary' file address */ if (H5_addr_le(f->shared->tmp_addr, addr)) - HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, "attempting to free temporary file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, FAIL, "attempting to free temporary file space"); /* If it's metadata, check if the space to free intersects with the file's * metadata accumulator @@ -1090,7 +1090,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Check if the space to free intersects with the file's metadata accumulator */ if (H5F__accum_free(f->shared, alloc_type, addr, size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, - "can't check free space intersection w/metadata accumulator") + "can't check free space intersection w/metadata accumulator"); } /* end if */ /* Check if the free space manager for the file has been initialized */ @@ -1110,7 +1110,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #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) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check for absorbing block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check for absorbing block"); else if (status > 0) /* Indicate success */ HGOTO_DONE(SUCCEED); @@ -1145,13 +1145,13 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) * the file space manager */ if (H5MF__start_fstype(f, fs_type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); } /* end if */ /* Create the free-space section for the freed section */ ctype = H5MF_SECT_CLASS_TYPE(f, size); if (NULL == (node = H5MF__sect_new(ctype, addr, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section"); /* If size of the freed section is larger than threshold, add it to the free space manager */ if (size >= f->shared->fs_threshold) { @@ -1163,7 +1163,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Add to the free space for the file */ if (H5MF__add_sect(f, alloc_type, f->shared->fs_man[fs_type], node) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't add section to file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't add section to file free space"); node = NULL; #ifdef H5MF_ALLOC_DEBUG_MORE @@ -1183,7 +1183,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Try to merge the section that is smaller than threshold */ if ((merged = H5FS_sect_try_merge(f, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't merge section to file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't merge section to file free space"); else if (merged == TRUE) /* successfully merged */ /* Indicate that the node was used */ node = NULL; @@ -1274,7 +1274,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi /* To extend a large block: calculate in advance the mis-aligned fragment so EOA will end at * 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa"); assert(!(eoa % f->shared->fs_page_size)); H5MF_EOA_MISALIGN(f, (eoa + extra_requested), f->shared->fs_page_size, frag_size); @@ -1294,7 +1294,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi if (allow_extend) { /* Try extending the block at EOA */ 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file"); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: extended = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -1310,15 +1310,15 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi /* Start up the free-space manager */ if (!(f->shared->fs_man[fs_type])) if (H5MF__start_fstype(f, fs_type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); /* Create free space section for the fragment */ if (NULL == (node = H5MF__sect_new(H5MF_FSPACE_SECT_LARGE, end + extra_requested, frag_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section"); /* Add the fragment to the large-sized free-space manager */ if (H5MF__add_sect(f, alloc_type, f->shared->fs_man[fs_type], node) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't re-add section to file free space"); node = NULL; } /* end if */ @@ -1331,7 +1331,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi /* Check if the block is able to extend into aggregation block */ aggr = (map_type == H5FD_MEM_DRAW) ? &(f->shared->sdata_aggr) : &(f->shared->meta_aggr); if ((ret_value = H5MF__aggr_try_extend(f, aggr, map_type, end, extra_requested)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending aggregation block"); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: H5MF__aggr_try_extend = %d\n", __func__, ret_value); @@ -1351,14 +1351,14 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi if (!f->shared->fs_man[fs_type] && H5_addr_defined(f->shared->fs_addr[fs_type])) /* Open the free-space manager */ if (H5MF__open_fstype(f, fs_type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); /* Try to extend the block into a free-space section */ if (f->shared->fs_man[fs_type]) { if ((ret_value = H5FS_sect_try_extend(f, f->shared->fs_man[fs_type], addr, size, extra_requested, H5FS_ADD_RETURNED_SPACE, &udata)) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, - "error extending block in free space manager") + "error extending block in free space manager"); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: Try to H5FS_sect_try_extend = %d\n", __func__, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ @@ -1442,7 +1442,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Create free-space section for block */ if (NULL == (node = H5MF__sect_new(sect_cls->type, addr, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize free space section"); /* Construct user data for callbacks */ udata.f = f; @@ -1453,12 +1453,12 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) /* Check if the block can shrink the container */ if (sect_cls->can_shrink) { 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "can't check if section can shrink container"); if (ret_value > 0) { 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink container"); } /* end if */ } /* end if */ @@ -1503,11 +1503,13 @@ H5MF_close(H5F_t *f) if (H5F_PAGED_AGGR(f)) { if ((ret_value = H5MF__close_pagefs(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close free-space managers for 'page' file space") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, + "can't close free-space managers for 'page' file space"); } else { if ((ret_value = H5MF__close_aggrfs(f)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close free-space managers for 'aggr' file space") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, + "can't close free-space managers for 'aggr' file space"); } done: @@ -1555,7 +1557,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) /* If the free space manager for this type is open, close it */ if (f->shared->fs_man[type]) if (H5MF__close_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager"); #ifdef H5MF_ALLOC_DEBUG_MORE fprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %" PRIuHADDR "\n", @@ -1566,7 +1568,7 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) /* If there is free space manager info for this type, delete it */ if (H5_addr_defined(f->shared->fs_addr[type])) if (H5MF__delete_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't delete the free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't delete the free space manager"); done: #ifdef H5MF_ALLOC_DEBUG @@ -1643,7 +1645,7 @@ H5MF_try_close(H5F_t *f) } /* end if */ if (H5MF__close_delete_fstype(f, ptype) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager"); } /* end for */ } /* end if */ else { @@ -1665,7 +1667,7 @@ H5MF_try_close(H5F_t *f) } /* end if */ if (H5MF__close_delete_fstype(f, (H5F_mem_page_t)type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager"); } /* end for */ } /* end else */ @@ -1719,11 +1721,11 @@ H5MF__close_aggrfs(H5F_t *f) /* Free the space in aggregators */ /* (for space not at EOA, it may be put into free space managers) */ if (H5MF_free_aggrs(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators"); /* Trying shrinking the EOA for the file */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* Making free-space managers persistent for superblock version >= 2 */ if (f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2 && f->shared->fs_persist) { @@ -1761,7 +1763,7 @@ H5MF__close_aggrfs(H5F_t *f) /* Write the free space manager message -- message must already exist */ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, - "error in writing message to superblock extension") + "error in writing message to superblock extension"); /* Close the free space managers */ for (type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; type++) { @@ -1780,7 +1782,7 @@ H5MF__close_aggrfs(H5F_t *f) 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager"); f->shared->fs_man[type] = NULL; f->shared->fs_state[type] = H5F_FS_STATE_CLOSED; } /* end if */ @@ -1804,11 +1806,11 @@ H5MF__close_aggrfs(H5F_t *f) /* Trying shrinking the EOA for the file */ /* (in case any free space is now at the EOA) */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* get the eoa, and verify that it has the expected value */ if (HADDR_UNDEF == (final_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); /* f->shared->eoa_post_fsm_fsalloc is undefined if there has * been no file space allocation or deallocation since file @@ -1819,18 +1821,18 @@ H5MF__close_aggrfs(H5F_t *f) else { /* super_vers can be 0, 1, 2 */ for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) if (H5MF__close_delete_fstype(f, (H5F_mem_page_t)type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); } /* end else */ /* Free the space in aggregators (again) */ /* (in case any free space information re-started them) */ if (H5MF_free_aggrs(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators"); /* Trying shrinking the EOA for the file */ /* (in case any free space is now at the EOA) */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); done: /* Reset the ring in the API context */ @@ -1884,7 +1886,7 @@ H5MF__close_pagefs(H5F_t *f) /* Trying shrinking the EOA for the file */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* Set up file space info message */ fsinfo.strategy = f->shared->fs_strategy; @@ -1924,7 +1926,7 @@ H5MF__close_pagefs(H5F_t *f) /* Write the free space manager message -- message must already exist */ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, - "error in writing message to superblock extension") + "error in writing message to superblock extension"); /* Close the free space managers */ /* use H5MF__close_fstype() for this? */ @@ -1944,7 +1946,7 @@ H5MF__close_pagefs(H5F_t *f) 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close free space manager"); f->shared->fs_man[ptype] = NULL; f->shared->fs_state[ptype] = H5F_FS_STATE_CLOSED; } /* end if */ @@ -1959,11 +1961,11 @@ H5MF__close_pagefs(H5F_t *f) /* Trying shrinking the EOA for the file */ /* (in case any free space is now at the EOA) */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* get the eoa, and verify that it has the expected value */ if (HADDR_UNDEF == (final_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); /* f->shared->eoa_post_fsm_fsalloc is undefined if there has * been no file space allocation or deallocation since file @@ -1991,19 +1993,19 @@ H5MF__close_pagefs(H5F_t *f) */ for (ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; ptype++) if (H5MF__close_delete_fstype(f, ptype) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't close the free space manager"); /* Write file space info message to superblock extension object header */ /* Create the superblock extension object header in advance if needed */ if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, FALSE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, - "error in writing message to superblock extension") + "error in writing message to superblock extension"); } /* end else */ /* Trying shrinking the EOA for the file */ /* (in case any free space is now at the EOA) */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); done: /* Reset the ring in the API context */ @@ -2077,7 +2079,7 @@ H5MF__close_shrink_eoa(H5F_t *f) : ((ptype % H5FD_MEM_NTYPES) + 1)); if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[ptype], &udata)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); else if (status > 0) eoa_shrank = TRUE; } /* end if */ @@ -2101,7 +2103,7 @@ H5MF__close_shrink_eoa(H5F_t *f) udata.alloc_type = type; if ((status = H5FS_sect_try_shrink_eoa(f, f->shared->fs_man[type], &udata)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); else if (status > 0) eoa_shrank = TRUE; } /* end if */ @@ -2109,7 +2111,7 @@ H5MF__close_shrink_eoa(H5F_t *f) /* check the two aggregators */ if ((status = H5MF__aggrs_try_shrink_eoa(f)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); else if (status > 0) eoa_shrank = TRUE; } /* end else */ @@ -2179,16 +2181,16 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) for (tt = H5FD_MEM_SUPER; tt < H5FD_MEM_NTYPES; tt++) if (HADDR_UNDEF == (fs_eoa[tt] = H5F_get_eoa(f, tt))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); if (!H5F_PAGED_AGGR(f)) { /* Retrieve metadata aggregator info, if available */ if (H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats"); /* Retrieve 'small data' aggregator info, if available */ if (H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats"); } /* end if */ /* Iterate over all the free space types that have managers and get each free list's space */ @@ -2198,7 +2200,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) /* Check if the free space for the file has been initialized */ if (!f->shared->fs_man[type] && H5_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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); assert(f->shared->fs_man[type]); fs_started[type] = TRUE; } /* end if */ @@ -2221,9 +2223,9 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) /* Retrieve free space size from free space manager */ if (H5FS_sect_stats(f->shared->fs_man[type], &type_fs_size, NULL) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats"); if (H5FS_size(f->shared->fs_man[type], &type_meta_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space metadata stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space metadata stats"); /* Increment total free space for types */ tot_fs_size += type_fs_size; @@ -2246,7 +2248,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) if (fs_started[type]) if (H5MF__close_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space"); } /* end for */ /* Set the value(s) to return */ @@ -2349,7 +2351,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] && H5_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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager"); assert(f->shared->fs_man[ty]); fs_started = TRUE; } /* end if */ @@ -2358,7 +2360,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]) if (H5MF__get_free_sects(f, f->shared->fs_man[ty], §_udata, &nums) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't get section info for the free space manager") + "can't get section info for the free space manager"); /* Increment total # of sections */ total_sects += nums; @@ -2366,7 +2368,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t /* Close the free space manager of this type, if we started it here */ if (fs_started) if (H5MF__close_fstype(f, ty) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space"); if ((H5F_PAGED_AGGR(f)) && (type != H5FD_MEM_DEFAULT)) ty = (H5F_mem_page_t)(ty + H5FD_MEM_NTYPES - 2); } /* end for */ @@ -2435,14 +2437,14 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, /* Query how many sections of this type */ if (H5FS_sect_stats(fspace, NULL, &hnums) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats"); H5_CHECKED_ASSIGN(*nums, size_t, hnums, hsize_t); /* Check if we should retrieve the section info */ if (sect_udata->sects && *nums > 0) /* Iterate over all the free space sections of this type, adding them to the user's section info */ if (H5FS_sect_iterate(f, fspace, H5MF__sects_cb, sect_udata) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't iterate over sections") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't iterate over sections"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2611,7 +2613,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) */ /* Vailin -- is this correct? */ if (!H5F_PAGED_AGGR(f) && (H5MF_free_aggrs(f) < 0)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregators") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregators"); /* Set the ring type in the DXPL. In most cases, we will * need H5AC_RING_MDFSM first, so initially set the ring in @@ -2684,7 +2686,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5MF__open_fstype(f, fsm_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, - "can't initialize file free space manager") + "can't initialize file free space manager"); fsm_opened[fsm_type] = TRUE; } /* end if */ } /* end if */ @@ -2703,7 +2705,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) /* Query free space manager info for this type */ if (H5FS_stat_info(f, f->shared->fs_man[fsm_type], &fs_stat) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't get free-space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't get free-space info"); /* Check if the free space manager has space in the file */ if (H5_addr_defined(fs_stat.addr) || H5_addr_defined(fs_stat.sect_addr)) { @@ -2713,7 +2715,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) */ if (H5FS_free(f, f->shared->fs_man[fsm_type], TRUE) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't release free-space headers") + "can't release free-space headers"); f->shared->fs_addr[fsm_type] = HADDR_UNDEF; } /* end if */ } /* end if */ @@ -2739,11 +2741,11 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5_addr_defined(f->shared->sblock->ext_addr)) if (H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "error in removing message from superblock extension") + "error in removing message from superblock extension"); /* As the final element in 1), shrink the EOA for the file */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* 2) Ensure that space is allocated for the free space manager superblock * extension message. Must do this now, before reallocating file space @@ -2769,7 +2771,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5F__super_ext_write_msg(f, H5O_FSINFO_ID, &fsinfo, TRUE, H5O_MSG_FLAG_MARK_IF_UNKNOWN) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, - "error in writing fsinfo message to superblock extension") + "error in writing fsinfo message to superblock extension"); /* 3) Scan all free space managers not involved in allocating * space for free space managers. For each such free space @@ -2846,7 +2848,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) /* Query free space manager info for this type */ if (H5FS_stat_info(f, f->shared->fs_man[fsm_type], &fs_stat) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info"); /* If the free space manager contains section info, * allocate space for the header and sinfo (note that @@ -2861,20 +2863,20 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5FS_alloc_hdr(f, f->shared->fs_man[fsm_type], &f->shared->fs_addr[fsm_type]) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "can't allocated free-space header") + "can't allocated free-space header"); /* Allocate FSM section info */ assert(!H5_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") + "can't allocate free-space section info"); #ifndef NDEBUG /* Re-Query free space manager info for this type */ if (H5FS_stat_info(f, f->shared->fs_man[fsm_type], &fs_stat) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, - "can't get free-space info") + "can't get free-space info"); assert(H5_addr_defined(fs_stat.addr)); assert(H5_addr_defined(fs_stat.sect_addr)); @@ -2896,7 +2898,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (fsm_opened[fsm_type]) { if (H5MF__close_fstype(f, fsm_type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, - "can't close file free space manager") + "can't close file free space manager"); fsm_opened[fsm_type] = FALSE; } /* end if */ } /* end if */ @@ -3093,7 +3095,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (sm_hdr_fspace) { /* Query free space manager info for this type */ if (H5FS_stat_info(f, sm_hdr_fspace, &fs_stat) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info"); assert(!H5_addr_defined(fs_stat.addr)); assert(!H5_addr_defined(fs_stat.sect_addr)); @@ -3104,7 +3106,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if ((sm_sinfo_fspace) && (sm_hdr_fspace != sm_sinfo_fspace)) { /* Query free space manager info for this type */ if (H5FS_stat_info(f, sm_sinfo_fspace, &fs_stat) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info"); assert(!H5_addr_defined(fs_stat.addr)); assert(!H5_addr_defined(fs_stat.sect_addr)); @@ -3116,7 +3118,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (lg_hdr_fspace) { /* Query free space manager info for this type */ 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)") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (3)"); assert(!H5_addr_defined(fs_stat.addr)); assert(!H5_addr_defined(fs_stat.sect_addr)); @@ -3129,7 +3131,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if ((lg_sinfo_fspace) && (lg_hdr_fspace != lg_sinfo_fspace)) { /* Query free space manager info for this type */ 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)") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info (4)"); assert(!H5_addr_defined(fs_stat.addr)); assert(!H5_addr_defined(fs_stat.sect_addr)); @@ -3148,11 +3150,11 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) */ /* (for space not at EOF, it may be put into free space managers) */ if ((!H5F_PAGED_AGGR(f)) && (H5MF_free_aggrs(f) < 0)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregators") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregators"); /* Trying shrinking the EOA for the file */ if (H5MF__close_shrink_eoa(f) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't shrink eoa"); /* WARNING: This approach settling the self referential free space * managers and allocating space for them in the file will @@ -3185,26 +3187,27 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (sm_hdr_fspace) if (H5FS_vfd_alloc_hdr_and_section_info_if_needed( f, sm_hdr_fspace, &(f->shared->fs_addr[sm_fshdr_fs_type])) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't vfd allocate sm hdr FSM file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "can't vfd allocate sm hdr FSM file space"); if (sm_sinfo_fspace && (sm_sinfo_fspace != sm_hdr_fspace)) if (H5FS_vfd_alloc_hdr_and_section_info_if_needed( f, sm_sinfo_fspace, &(f->shared->fs_addr[sm_fssinfo_fs_type])) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "can't vfd allocate sm sinfo FSM file space") + "can't vfd allocate sm sinfo FSM file space"); if (H5F_PAGED_AGGR(f)) { if (lg_hdr_fspace) if (H5FS_vfd_alloc_hdr_and_section_info_if_needed( f, lg_hdr_fspace, &(f->shared->fs_addr[lg_fshdr_fs_type])) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "can't vfd allocate lg hdr FSM file space") + "can't vfd allocate lg hdr FSM file space"); if (lg_sinfo_fspace && (lg_sinfo_fspace != lg_hdr_fspace)) if (H5FS_vfd_alloc_hdr_and_section_info_if_needed( f, lg_sinfo_fspace, &(f->shared->fs_addr[lg_fssinfo_fs_type])) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "can't vfd allocate lg sinfo FSM file space") + "can't vfd allocate lg sinfo FSM file space"); } /* end if */ sm_hdr_fspace = f->shared->fs_man[sm_fshdr_fs_type]; @@ -3216,7 +3219,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) if (H5MF__continue_alloc_fsm(f->shared, sm_hdr_fspace, sm_sinfo_fspace, lg_hdr_fspace, lg_sinfo_fspace, &continue_alloc_fsm) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't vfd allocate lg sinfo FSM file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't vfd allocate lg sinfo FSM file space"); } while (continue_alloc_fsm); /* All free space managers should have file space allocated for them @@ -3232,7 +3235,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) * final EOA of the file. */ if (HADDR_UNDEF == (eoa_fsm_fsalloc = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size"); f->shared->eoa_fsm_fsalloc = eoa_fsm_fsalloc; /* Indicate that the FSM was settled successfully */ diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c index b18a02c..5464b8a 100644 --- a/src/H5MFaggr.c +++ b/src/H5MFaggr.c @@ -98,13 +98,13 @@ H5MF_aggr_vfd_alloc(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) /* Handle metadata differently from "raw" data */ if (HADDR_UNDEF == (ret_value = H5MF__aggr_alloc(f, &(f->shared->meta_aggr), &(f->shared->sdata_aggr), alloc_type, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate metadata") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate metadata"); } /* end if */ else { /* Allocate "raw" data: H5FD_MEM_DRAW and H5FD_MEM_GHEAP */ if (HADDR_UNDEF == (ret_value = H5MF__aggr_alloc(f, &(f->shared->sdata_aggr), &(f->shared->meta_aggr), H5FD_MEM_DRAW, size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate raw data") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate raw data"); } /* end else */ /* Sanity check for overlapping into file's temporary allocation space */ @@ -157,7 +157,7 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F /* Get the EOA for the file */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa"); /* * If the aggregation feature is enabled for this file and strategy is not H5F_FILE_SPACE_NONE, @@ -220,13 +220,13 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F /* Check for overlapping into file's temporary allocation space */ if (H5_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) - HGOTO_ERROR( - H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, - "'normal' file space allocation request will overlap into 'temporary' file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, + "'normal' file space allocation request will overlap into 'temporary' " + "file space"); if ((aggr->addr > 0) && (extended = H5F__try_extend(f, alloc_type, (aggr->addr + aggr->size), ext_size)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space"); else if (extended) { /* aggr->size is unchanged */ ret_value = aggr->addr + aggr_frag_size; @@ -244,13 +244,14 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) { if (H5MF__aggr_free(f, other_alloc_type, other_aggr) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, - "can't free aggregation block") + "can't free aggregation block"); } /* end if */ /* Allocate space from the VFD (i.e. at the end of the file) */ if (HADDR_UNDEF == (ret_value = H5F__alloc(f, alloc_type, size, &eoa_frag_addr, &eoa_frag_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, + "can't allocate file space"); } /* end else */ } /* end if */ else { @@ -266,13 +267,13 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F /* Check for overlapping into file's temporary allocation space */ if (H5_addr_gt((aggr->addr + aggr->size + ext_size), f->shared->tmp_addr)) - HGOTO_ERROR( - H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, - "'normal' file space allocation request will overlap into 'temporary' file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADRANGE, HADDR_UNDEF, + "'normal' file space allocation request will overlap into 'temporary' " + "file space"); if ((aggr->addr > 0) && (extended = H5F__try_extend(f, alloc_type, (aggr->addr + aggr->size), ext_size)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't extending space"); else if (extended) { aggr->addr += aggr_frag_size; aggr->size += (ext_size - aggr_frag_size); @@ -291,19 +292,20 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F ((other_aggr->tot_size - other_aggr->size) >= other_aggr->alloc_size)) { if (H5MF__aggr_free(f, other_alloc_type, other_aggr) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, - "can't free aggregation block") + "can't free aggregation block"); } /* end if */ /* Allocate space from the VFD (i.e. at the end of the file) */ if (HADDR_UNDEF == (new_space = H5F__alloc(f, alloc_type, aggr->alloc_size, &eoa_frag_addr, &eoa_frag_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, + "can't allocate file space"); /* Return the unused portion of the block to a free list */ if (aggr->size > 0) if (H5MF_xfree(f, alloc_type, aggr->addr, aggr->size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, - "can't free aggregation block") + "can't free aggregation block"); /* If the block is not to be aligned, fold the eoa fragment * into the newly allocated aggregator, as it could have @@ -336,13 +338,13 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F /* Freeing any possible fragment due to file allocation */ if (eoa_frag_size) if (H5MF_xfree(f, alloc_type, eoa_frag_addr, eoa_frag_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment"); /* Freeing any possible fragment due to alignment in the block after extension */ if (extended && aggr_frag_size) if (H5MF_xfree(f, alloc_type, aggr_frag_addr, aggr_frag_size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, - "can't free aggregation fragment") + "can't free aggregation fragment"); } /* end if */ else { /* Allocate space out of the block */ @@ -354,19 +356,19 @@ H5MF__aggr_alloc(H5F_t *f, H5F_blk_aggr_t *aggr, H5F_blk_aggr_t *other_aggr, H5F if (aggr_frag_size) if (H5MF_xfree(f, alloc_type, aggr_frag_addr, aggr_frag_size) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, - "can't free aggregation fragment") + "can't free aggregation fragment"); } /* end else */ } /* end if */ else { /* Allocate data from the file */ if (HADDR_UNDEF == (ret_value = H5F__alloc(f, type, size, &eoa_frag_addr, &eoa_frag_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate file space"); /* Check if fragment was generated */ if (eoa_frag_size) /* Put fragment on the free list */ if (H5MF_xfree(f, type, eoa_frag_addr, eoa_frag_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, HADDR_UNDEF, "can't free eoa fragment"); } /* end else */ /* Sanity check for overlapping into file's temporary allocation space */ @@ -429,7 +431,7 @@ done: /* Get the EOA for the file */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa"); /* If the aggregator is at the end of file: */ if (H5_addr_eq(eoa, aggr->addr + aggr->size)) { @@ -451,7 +453,7 @@ done: (extra_requested < aggr->alloc_size) ? aggr->alloc_size : extra_requested; if ((ret_value = H5F__try_extend(f, type, (aggr->addr + aggr->size), extra)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTEXTEND, FAIL, "error extending file"); else if (ret_value == TRUE) { /* Shift the aggregator block by the extra requested */ /* (allocates the space for the extra_requested) */ @@ -721,7 +723,7 @@ done: /* Return the unused portion of the metadata block to the file */ if (tmp_size > 0 && (H5F_INTENT(f) & H5F_ACC_RDWR)) if (H5MF_xfree(f, alloc_type, tmp_addr, tmp_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't release aggregator's free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't release aggregator's free space"); } /* end if */ done: @@ -758,11 +760,11 @@ done: /* Retrieve metadata aggregator info, if available */ if (H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats"); /* Retrieve 'small data' aggregator info, if available */ if (H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats"); /* Make certain we release the aggregator that's later in the file first */ /* (so the file shrinks properly) */ @@ -785,9 +787,9 @@ done: * to the free lists in the file. */ if (H5MF__aggr_reset(f, first_aggr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset metadata block") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset metadata block"); if (H5MF__aggr_reset(f, second_aggr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset 'small data' block") + HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't reset 'small data' block"); done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5MF_free_aggrs() */ @@ -817,7 +819,7 @@ done: /* Get the EOA for the file */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "Unable to get eoa"); /* Check if the aggregator is at EOA */ if (aggr->size > 0 && H5_addr_defined(aggr->addr)) @@ -858,7 +860,7 @@ done: /* Free the remaining space at EOA in the aggregator */ if (H5F__free(f, type, aggr->addr, aggr->size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free aggregation block"); /* Reset the aggregator */ aggr->tot_size = 0; @@ -893,16 +895,16 @@ done: 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query metadata aggregator stats"); if (ma_status > 0) if (H5MF__aggr_free(f, H5FD_MEM_DEFAULT, &(f->shared->meta_aggr)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); if ((sda_status = H5MF__aggr_can_shrink_eoa(f, H5FD_MEM_DRAW, &(f->shared->sdata_aggr))) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query small data aggregator stats"); if (sda_status > 0) if (H5MF__aggr_free(f, H5FD_MEM_DRAW, &(f->shared->sdata_aggr)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa"); ret_value = (ma_status || sda_status); diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 6cb5ca0..3c5060f 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -116,7 +116,7 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) /* Dump section-specific debugging information */ if (H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't dump section's debugging info") + HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't dump section's debugging info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -151,7 +151,7 @@ H5MF_sects_debug(H5F_t *f, haddr_t fs_addr, FILE *stream, int indent, int fwidth if (H5_addr_eq(f->shared->fs_addr[type], fs_addr)) { if (!f->shared->fs_man[type]) if (H5MF__open_fstype(f, type) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space"); if (f->shared->fs_man[type]) { H5MF_debug_iter_ud_t udata; /* User data for callbacks */ @@ -164,11 +164,11 @@ H5MF_sects_debug(H5F_t *f, haddr_t fs_addr, FILE *stream, int indent, int fwidth /* Iterate over all the free space sections */ if (H5FS_sect_iterate(f, f->shared->fs_man[type], H5MF__sects_debug_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space"); /* Close the free space information */ if (H5FS_close(f, f->shared->fs_man[type]) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info") + HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info"); } /* end if */ break; } /* end if */ @@ -209,7 +209,7 @@ H5MF__sects_dump(H5F_t *f, FILE *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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); #ifdef H5MF_ALLOC_DEBUG fprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", __func__, eoa); #endif /* H5MF_ALLOC_DEBUG */ @@ -236,7 +236,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) /* Iterate over all the free space sections */ if (H5FS_sect_iterate(f, f->shared->fs_man[ptype], H5MF__sects_debug_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space"); } /* end if */ else /* No sections of this type */ @@ -275,7 +275,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); fprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa); /* Print header for sections */ @@ -293,7 +293,7 @@ H5MF__sects_dump(H5F_t *f, FILE *stream) /* Iterate over all the free space sections */ if (H5FS_sect_iterate(f, f->shared->fs_man[atype], H5MF__sects_debug_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space") + HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space"); } /* end if */ else /* No sections of this type */ fprintf(stream, "%*s\n", indent + 6, ""); diff --git a/src/H5MFsection.c b/src/H5MFsection.c index b5255b1..ede7912 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -192,7 +192,7 @@ H5MF__sect_new(unsigned ctype, haddr_t sect_off, hsize_t sect_size) /* Create free space section node */ if (NULL == (sect = H5FL_MALLOC(H5MF_free_section_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for direct block free list section") + "memory allocation failed for direct block free list section"); /* Set the information passed in */ sect->sect_info.addr = sect_off; @@ -261,7 +261,7 @@ H5MF__sect_deserialize(const H5FS_section_class_t *cls, const uint8_t H5_ATTR_UN /* Create free space section for block */ if (NULL == (sect = H5MF__sect_new(cls->type, sect_addr, sect_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section"); /* Set return value */ ret_value = (H5FS_section_info_t *)sect; @@ -319,7 +319,7 @@ H5MF__sect_split(H5FS_section_info_t *sect, hsize_t frag_size) /* Allocate space for new section */ if (NULL == (ret_value = H5MF__sect_new(sect->type, sect->addr, frag_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't initialize free space section"); /* Set new section's info */ sect->addr += frag_size; @@ -401,7 +401,7 @@ H5MF__sect_simple_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect /* Get rid of second section */ if (H5MF__sect_free((H5FS_section_info_t *)sect2) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -435,7 +435,7 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Retrieve the end of the file's address space */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(udata->f, udata->alloc_type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* Compute address of end of section to check */ end = sect->sect_info.addr + sect->sect_info.size; @@ -464,7 +464,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* See if section can absorb the aggregator & vice versa */ if ((status = H5MF__aggr_can_absorb(udata->f, &(udata->f->shared->meta_aggr), sect, &(udata->shrink))) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "error merging section with aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, + "error merging section with aggregation block"); else if (status > 0) { /* Set the aggregator to operate on */ udata->aggr = &(udata->f->shared->meta_aggr); @@ -485,7 +486,8 @@ H5MF__sect_simple_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* See if section can absorb the aggregator & vice versa */ if ((status = H5MF__aggr_can_absorb(udata->f, &(udata->f->shared->sdata_aggr), sect, &(udata->shrink))) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, "error merging section with aggregation block") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, + "error merging section with aggregation block"); else if (status > 0) { /* Set the aggregator to operate on */ udata->aggr = &(udata->f->shared->sdata_aggr); @@ -539,7 +541,7 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) /* Release section's space at EOA */ if (H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr, (*sect)->sect_info.size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed"); } /* end if */ else { /* Sanity check */ @@ -548,14 +550,14 @@ H5MF__sect_simple_shrink(H5FS_section_info_t **_sect, void *_udata) /* Absorb the section into the aggregator or vice versa */ if (H5MF__aggr_absorb(udata->f, udata->aggr, *sect, udata->allow_sect_absorb) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTMERGE, FAIL, - "can't absorb section into aggregator or vice versa") + "can't absorb section into aggregator or vice versa"); } /* end else */ /* Check for freeing section */ if (udata->shrink != H5MF_SHRINK_SECT_ABSORB_AGGR) { /* Free section */ if (H5MF__sect_free((H5FS_section_info_t *)*sect) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node"); /* Mark section as freed, for free space manager */ *sect = NULL; @@ -610,7 +612,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) if (!rem && (*sect)->sect_info.size <= H5F_PGEND_META_THRES(udata->f) && (*flags & H5FS_ADD_RETURNED_SPACE)) { if (H5MF__sect_free((H5FS_section_info_t *)(*sect)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node"); *sect = NULL; *flags &= (unsigned)~H5FS_ADD_RETURNED_SPACE; *flags |= H5FS_PAGE_END_NO_ADD; @@ -711,7 +713,7 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 if ((*sect1)->sect_info.size == udata->f->shared->fs_page_size) { if (H5MF_xfree(udata->f, udata->alloc_type, (*sect1)->sect_info.addr, (*sect1)->sect_info.size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free merged section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free merged section"); /* Need to free possible metadata page in the PB cache */ /* This is in response to the data corruption bug from fheap.c with page buffering + page strategy */ @@ -719,16 +721,16 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 /* Note: Update of raw data page (large or small sized) is handled by the PB cache */ if (udata->f->shared->page_buf != NULL && udata->alloc_type != H5FD_MEM_DRAW) if (H5PB_remove_entry(udata->f->shared, (*sect1)->sect_info.addr) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free merged section") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free merged section"); if (H5MF__sect_free((H5FS_section_info_t *)(*sect1)) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node"); *sect1 = NULL; } /* end if */ /* Get rid of second section */ if (H5MF__sect_free((H5FS_section_info_t *)sect2) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -808,7 +810,7 @@ H5MF__sect_large_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 /* Get rid of second section */ if (H5MF__sect_free((H5FS_section_info_t *)sect2) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free section node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -843,7 +845,7 @@ H5MF__sect_large_can_shrink(const H5FS_section_info_t *_sect, void *_udata) /* Retrieve the end of the file's address space */ if (HADDR_UNDEF == (eoa = H5FD_get_eoa(udata->f->shared->lf, udata->alloc_type))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* Compute address of end of section to check */ end = sect->sect_info.addr + sect->sect_info.size; @@ -901,14 +903,14 @@ H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *_udata) /* Retain partial page in the free-space manager so as to keep EOA at page boundary */ if (H5F__free(udata->f, udata->alloc_type, (*sect)->sect_info.addr + frag_size, (*sect)->sect_info.size - frag_size) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "driver free request failed"); if (frag_size) /* Adjust section size for the partial page */ (*sect)->sect_info.size = frag_size; else { /* Free section */ if (H5MF__sect_free((H5FS_section_info_t *)*sect) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't free simple section node"); /* Mark section as freed, for free space manager */ *sect = NULL; diff --git a/src/H5MM.c b/src/H5MM.c index d45c1c3..609f946 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -170,7 +170,7 @@ H5MM_xstrdup(const char *s) if (s) if (NULL == (ret_value = HDstrdup(s))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed"); done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5MM_xstrdup() */ @@ -196,9 +196,9 @@ H5MM_strdup(const char *s) FUNC_ENTER_NOAPI(NULL) if (!s) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "NULL string not allowed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "NULL string not allowed"); if (NULL == (ret_value = HDstrdup(s))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -228,10 +228,10 @@ H5MM_strndup(const char *s, size_t n) FUNC_ENTER_NOAPI(NULL) if (!s) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "NULL string not allowed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "NULL string not allowed"); if (NULL == (ret_value = HDstrndup(s, n))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "string duplication failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5O.c b/src/H5O.c index 4c8933e..fc92a61 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -112,16 +112,16 @@ H5O__open_api_common(hid_t loc_id, const char *name, hid_t lapl_id, void **token /* name is checked in this H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open the object */ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object"); /* Get an atom for the object */ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -157,7 +157,7 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id) /* Open the object synchronously */ if ((ret_value = H5O__open_api_common(loc_id, name, lapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object"); done: FUNC_LEAVE_API(ret_value) @@ -191,7 +191,7 @@ H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the object asynchronously */ if ((ret_value = H5O__open_api_common(loc_id, name, lapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -201,7 +201,7 @@ H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID"); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } done: @@ -237,16 +237,16 @@ H5O__open_by_idx_api_common(hid_t loc_id, const char *group_name, H5_index_t idx /* Set up object access arguments */ if (H5VL_setup_idx_args(loc_id, group_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open the object */ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object"); /* Get an ID for the object */ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -284,7 +284,7 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_ite /* Open the object synchronously */ if ((ret_value = H5O__open_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to synchronously open object"); done: FUNC_LEAVE_API(ret_value) @@ -321,7 +321,7 @@ H5Oopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li /* Open the object asynchronously */ if ((ret_value = H5O__open_by_idx_api_common(loc_id, group_name, idx_type, order, n, lapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to asynchronously open object"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -331,7 +331,7 @@ H5Oopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID"); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } done: @@ -363,15 +363,15 @@ H5Oopen_by_token(hid_t loc_id, H5O_token_t token) /* Check args */ if (H5O_IS_TOKEN_UNDEF(token)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "can't open H5O_TOKEN_UNDEF") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "can't open H5O_TOKEN_UNDEF"); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); loc_params.type = H5VL_OBJECT_BY_TOKEN; loc_params.loc_data.loc_by_token.token = &token; @@ -380,11 +380,11 @@ H5Oopen_by_token(hid_t loc_id, H5O_token_t token) /* Open the object */ if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object"); /* Register the object's ID */ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_API(ret_value) @@ -419,39 +419,39 @@ H5O__copy_api_common(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, c /* Check arguments */ if (!src_name || !*src_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no source name specified"); if (!dst_name || !*dst_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified"); /* Get correct property lists */ if (H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list"); /* Get object copy property list */ if (H5P_DEFAULT == ocpypl_id) ocpypl_id = H5P_OBJECT_COPY_DEFAULT; else if (TRUE != H5P_isa_class(ocpypl_id, H5P_OBJECT_COPY)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list"); /* Set the LCPL for the API context */ H5CX_set_lcpl(lcpl_id); /* Setup and check args */ if (H5VL_setup_loc_args(src_loc_id, &vol_obj1, &loc_params1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* get the object */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object(dst_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); loc_params2.type = H5VL_OBJECT_BY_SELF; loc_params2.obj_type = H5I_get_type(dst_loc_id); /* Copy the object */ if (H5VL_object_copy(vol_obj1, &loc_params1, src_name, *vol_obj_ptr, &loc_params2, dst_name, ocpypl_id, lcpl_id, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -542,7 +542,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *ds /* To copy an object synchronously */ if (H5O__copy_api_common(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to synchronously copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to synchronously copy object"); done: FUNC_LEAVE_API(ret_value) @@ -578,7 +578,7 @@ H5Ocopy_async(const char *app_file, const char *app_func, unsigned app_line, hid /* To copy an object asynchronously */ if (H5O__copy_api_common(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to asynchronously copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to asynchronously copy object"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -586,7 +586,7 @@ H5Ocopy_async(const char *app_file, const char *app_func, unsigned app_line, hid if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIui*si*siii", app_file, app_func, app_line, src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -615,7 +615,7 @@ H5O__flush_api_common(hid_t obj_id, void **token_ptr, H5VL_object_t **_vol_obj_p /* Setup and check args */ if (H5VL_setup_loc_args(obj_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_FLUSH; @@ -624,7 +624,7 @@ H5O__flush_api_common(hid_t obj_id, void **token_ptr, H5VL_object_t **_vol_obj_p /* Flush the object */ if (H5VL_object_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -649,7 +649,7 @@ H5Oflush(hid_t obj_id) /* To flush an object synchronously */ if (H5O__flush_api_common(obj_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to synchronously flush object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to synchronously flush object"); done: FUNC_LEAVE_API(ret_value) @@ -681,7 +681,7 @@ H5Oflush_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Flush an object asynchronously */ if (H5O__flush_api_common(obj_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to asynchronously flush object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to asynchronously flush object"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -689,7 +689,7 @@ H5Oflush_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, obj_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -718,7 +718,7 @@ H5O__refresh_api_common(hid_t oid, void **token_ptr, H5VL_object_t **_vol_obj_pt /* Setup and check args */ if (H5VL_setup_loc_args(oid, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_REFRESH; @@ -727,7 +727,7 @@ H5O__refresh_api_common(hid_t oid, void **token_ptr, H5VL_object_t **_vol_obj_pt /* Refresh the object */ if (H5VL_object_specific(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -752,7 +752,7 @@ H5Orefresh(hid_t oid) /* To refresh an object synchronously */ if (H5O__refresh_api_common(oid, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to synchronously refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to synchronously refresh object"); done: FUNC_LEAVE_API(ret_value) @@ -784,7 +784,7 @@ H5Orefresh_async(const char *app_file, const char *app_func, unsigned app_line, /* Refresh an object asynchronously */ if (H5O__refresh_api_common(oid, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to asynchronously refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to asynchronously refresh object"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -792,7 +792,7 @@ H5Orefresh_async(const char *app_file, const char *app_func, unsigned app_line, if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, oid, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -832,16 +832,16 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid /* Check arguments */ if (new_loc_id == H5L_SAME_LOC) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "cannot use H5L_SAME_LOC when only one location is specified") + "cannot use H5L_SAME_LOC when only one location is specified"); if (!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); /* Avoid compiler warning on 32-bit machines */ #if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T if (HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long"); #endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */ if (lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list"); /* Get the link creation property list */ if (H5P_DEFAULT == lcpl_id) @@ -852,7 +852,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up new location struct */ new_loc_params.type = H5VL_OBJECT_BY_NAME; @@ -862,11 +862,11 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid /* Get the first location object */ if (NULL == (vol_obj1 = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (H5L_SAME_LOC != new_loc_id) /* get the location object */ if (NULL == (vol_obj2 = H5VL_vol_object(new_loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL connectors are the same */ if (vol_obj1 && vol_obj2) { @@ -874,10 +874,10 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid /* Check if both objects are associated with the same VOL connector */ if (H5VL_cmp_connector_cls(&same_connector, vol_obj1->connector->cls, vol_obj2->connector->cls) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_FILE, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); if (same_connector) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "Objects are accessed through different VOL connectors and can't be linked") + "Objects are accessed through different VOL connectors and can't be linked"); } /* end if */ /* Construct a temporary VOL object */ @@ -893,7 +893,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid /* Create a link to the object */ if (H5VL_link_create(&vol_cb_args, &tmp_vol_obj, &new_loc_params, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link"); done: FUNC_LEAVE_API(ret_value) @@ -932,11 +932,11 @@ H5Oincr_refcount(hid_t object_id) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(object_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(object_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_CHANGE_REF_COUNT; @@ -945,7 +945,7 @@ H5Oincr_refcount(hid_t object_id) /* Change the object's reference count */ if (H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed"); done: FUNC_LEAVE_API(ret_value) @@ -984,11 +984,11 @@ H5Odecr_refcount(hid_t object_id) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(object_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(object_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_CHANGE_REF_COUNT; @@ -997,7 +997,7 @@ H5Odecr_refcount(hid_t object_id) /* Change the object's reference count */ if (H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed"); done: FUNC_LEAVE_API(ret_value) @@ -1027,17 +1027,17 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id) /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set the location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1052,7 +1052,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id) /* Check if the object exists */ if (H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name); /* Set return value */ ret_value = (htri_t)obj_exists; @@ -1083,9 +1083,9 @@ H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo /*out*/, unsigned fields) /* Check args */ if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1093,7 +1093,7 @@ H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo /*out*/, unsigned fields) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_GET_INFO; @@ -1102,7 +1102,7 @@ H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo /*out*/, unsigned fields) /* Retrieve the object's information */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object"); done: FUNC_LEAVE_API(ret_value) @@ -1133,14 +1133,14 @@ H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oi /* Check args */ if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* "name" is checked in H5VL_setup_name_args() */ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_GET_INFO; @@ -1149,7 +1149,7 @@ H5O__get_info_by_name_api_common(hid_t loc_id, const char *name, H5O_info2_t *oi /* Retrieve the object's information */ if (H5VL_object_get(*vol_obj_ptr, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, token_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1175,7 +1175,7 @@ H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/, /* Retrieve object information synchronously */ if (H5O__get_info_by_name_api_common(loc_id, name, oinfo, fields, lapl_id, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't synchronously retrieve object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't synchronously retrieve object info"); done: FUNC_LEAVE_API(ret_value) @@ -1210,7 +1210,7 @@ H5Oget_info_by_name_async(const char *app_file, const char *app_func, unsigned a /* Retrieve group information asynchronously */ if (H5O__get_info_by_name_api_common(loc_id, name, oinfo, fields, lapl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't asynchronously retrieve object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't asynchronously retrieve object info"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1218,7 +1218,7 @@ H5Oget_info_by_name_async(const char *app_file, const char *app_func, unsigned a if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*sxIuii", app_file, app_func, app_line, loc_id, name, oinfo, fields, lapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1249,19 +1249,19 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check args */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1274,7 +1274,7 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_OBJECT_GET_INFO; @@ -1283,7 +1283,7 @@ H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Retrieve the object's information */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object"); done: FUNC_LEAVE_API(ret_value) @@ -1312,9 +1312,9 @@ H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo /*out*/, unsigned fiel /* Check args */ if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_NATIVE_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1322,7 +1322,7 @@ H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo /*out*/, unsigned fiel /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_native_info.fields = fields; @@ -1333,7 +1333,7 @@ H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo /*out*/, unsigned fiel /* Retrieve the object's information */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object"); done: FUNC_LEAVE_API(ret_value) @@ -1363,17 +1363,17 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_NATIVE_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Fill out location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1383,7 +1383,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_native_info.fields = fields; @@ -1394,7 +1394,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi /* Retrieve the object's information */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object: '%s'", name) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object: '%s'", name); done: FUNC_LEAVE_API(ret_value) @@ -1426,19 +1426,19 @@ H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_t /* Check args */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); if (fields & ~H5O_NATIVE_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_IDX; @@ -1451,7 +1451,7 @@ H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_t /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_native_info.fields = fields; @@ -1462,7 +1462,7 @@ H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_t /* Retrieve the object's information */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native file format info for object"); done: FUNC_LEAVE_API(ret_value) @@ -1496,11 +1496,11 @@ H5Oset_comment(hid_t obj_id, const char *comment) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(obj_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1514,7 +1514,7 @@ H5Oset_comment(hid_t obj_id, const char *comment) /* (Re)set the object's comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object"); done: FUNC_LEAVE_API(ret_value) @@ -1548,11 +1548,11 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_ /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1562,7 +1562,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_ /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.set_comment.comment = comment; @@ -1572,7 +1572,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_ /* (Re)set the object's comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name) + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name); done: FUNC_LEAVE_API(ret_value) @@ -1606,7 +1606,7 @@ H5Oget_comment(hid_t obj_id, char *comment /*out*/, size_t bufsize) /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set fields in the location struct */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1622,7 +1622,7 @@ H5Oget_comment(hid_t obj_id, char *comment /*out*/, size_t bufsize) /* Retrieve the object's comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object"); /* Set return value */ ret_value = (ssize_t)comment_len; @@ -1659,11 +1659,11 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, si /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "no name"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, (-1), "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, (-1), "can't set access property list info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1673,7 +1673,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, si /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_comment.buf = comment; @@ -1685,7 +1685,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, si /* Retrieve the object's comment */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object: '%s'", name) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object: '%s'", name); /* Set return value */ ret_value = (ssize_t)comment_len; @@ -1740,17 +1740,17 @@ H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2 /* Check args */ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -1767,7 +1767,7 @@ H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2 /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -1819,25 +1819,25 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Check args */ if (!obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL"); if (!*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1856,7 +1856,7 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -1886,7 +1886,7 @@ H5O__close_check_type(hid_t object_id) case H5I_DATASET: case H5I_MAP: if (H5I_object(object_id) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object"); break; case H5I_UNINIT: @@ -1937,10 +1937,10 @@ H5Oclose(hid_t object_id) /* Validate the object type before closing */ if (H5O__close_check_type(object_id) <= 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object"); if (H5I_dec_app_ref(object_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object"); done: FUNC_LEAVE_API(ret_value) @@ -1969,13 +1969,13 @@ H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Validate the object type before closing */ if (H5O__close_check_type(object_id) <= 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "not a valid object"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { /* Get file object's connector */ if (NULL == (vol_obj = H5VL_vol_object(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get VOL object for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get VOL object for object"); /* Increase connector's refcount, so it doesn't get closed if closing * this object ID closes the file */ @@ -1990,7 +1990,7 @@ H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hi * When it reaches zero the object will be closed. */ if (H5I_dec_app_ref_async(object_id, token_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "decrementing object ID failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "decrementing object ID failed"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1998,7 +1998,7 @@ H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, object_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -2254,13 +2254,13 @@ H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2, /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (NULL == cmp_value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid cmp_value pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid cmp_value pointer"); /* Compare the two tokens */ if (H5VL_token_cmp(vol_obj, token1, token2, cmp_value) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOMPARE, FAIL, "object token comparison failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOMPARE, FAIL, "object token comparison failed"); done: FUNC_LEAVE_API(ret_value) @@ -2288,19 +2288,19 @@ H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (NULL == token) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer"); if (NULL == token_str) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token string pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token string pointer"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type"); /* Serialize the token */ if (H5VL_token_to_str(vol_obj, vol_obj_type, token, token_str) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "object token serialization failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "object token serialization failed"); done: FUNC_LEAVE_API(ret_value) @@ -2328,19 +2328,19 @@ H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (NULL == token) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer"); if (NULL == token_str) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token string pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token string pointer"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object type"); /* Deserialize the token */ if (H5VL_token_from_str(vol_obj, vol_obj_type, token_str, token) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, "object token deserialization failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, "object token deserialization failed"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 7d4d6b7..23841a6 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -109,18 +109,18 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_AINFO_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (ainfo = H5FL_MALLOC(H5O_ainfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get the flags for the message */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); flags = *p++; if (flags & ~H5O_AINFO_ALL_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message"); ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? TRUE : FALSE; ainfo->index_corder = (flags & H5O_AINFO_INDEX_CORDER) ? TRUE : FALSE; @@ -237,7 +237,7 @@ H5O__ainfo_copy(const void *_mesg, void *_dest) /* check args */ assert(ainfo); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ainfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *ainfo; @@ -332,7 +332,7 @@ H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, void *_mesg) if (H5_addr_defined(ainfo->fheap_addr)) /* Delete the attribute */ if (H5A__dense_delete(f, ainfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense attribute storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense attribute storage"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -398,7 +398,7 @@ H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_ /* Allocate space for the destination message */ if (NULL == (ainfo_dst = H5FL_MALLOC(H5O_ainfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the top level of the information */ *ainfo_dst = *ainfo_src; @@ -454,7 +454,7 @@ H5O__ainfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l if (H5_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) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 3c57953..16bbab8 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -116,7 +116,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_ /* Check the object header chunk proxy's status in the metadata cache */ if (H5AC_get_entry_status(f, oh->chunk[chunkno].addr, &chk_proxy_status) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, - "unable to check metadata cache status for object header chunk proxy") + "unable to check metadata cache status for object header chunk proxy"); /* Make certain that object header is protected */ assert(chk_proxy_status & H5AC_ES__IS_PROTECTED); @@ -134,7 +134,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_ /* Eliminate the gap in the chunk */ if (H5O__eliminate_gap(oh, chk_dirtied, &oh->mesg[u], new_gap_loc, new_gap_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't eliminate gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't eliminate gap in chunk"); /* Set flag to indicate that the gap was handled */ merged_with_null = TRUE; @@ -163,7 +163,7 @@ H5O__add_gap(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t *oh, unsigned chunkno, hbool_ /* Check if we need to extend message table to hold the new null message */ if (oh->nmesgs >= oh->alloc_nmesgs) if (H5O__alloc_msgs(oh, (size_t)1) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages"); /* Increment new gap size */ oh->chunk[chunkno].gap += new_gap_size; @@ -329,7 +329,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, alloc_msg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Check if there's a need to split the null message */ if (alloc_msg->raw_size > new_size) { @@ -343,7 +343,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new /* Add the gap to the chunk */ if (H5O__add_gap(f, oh, alloc_msg->chunkno, &chk_dirtied, null_idx, alloc_msg->raw + alloc_msg->raw_size, gap_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk"); } /* end if */ else { size_t new_mesg_size = @@ -353,7 +353,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new /* Check if we need to extend message table to hold the new null message */ if (oh->nmesgs >= oh->alloc_nmesgs) { if (H5O__alloc_msgs(oh, (size_t)1) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages"); /* "Retarget" 'alloc_msg' pointer into newly re-allocated array of messages */ alloc_msg = &oh->mesg[null_idx]; @@ -380,7 +380,7 @@ H5O__alloc_null(H5F_t *f, H5O_t *oh, size_t null_idx, const H5O_msg_class_t *new ((oh->chunk[null_chunkno].image + oh->chunk[null_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[null_chunkno].gap)), oh->chunk[null_chunkno].gap) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk"); } /* end if */ /* Set the size of the new "real" message */ @@ -433,7 +433,7 @@ H5O__alloc_msgs(H5O_t *oh, size_t min_alloc) /* Attempt to allocate more memory */ if (NULL == (new_mesg = H5FL_SEQ_REALLOC(H5O_mesg_t, oh->mesg, na))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Update ohdr information */ oh->alloc_nmesgs = na; @@ -556,13 +556,13 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Determine whether the chunk can be extended */ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, oh->chunk[chunkno].addr, (hsize_t)(oh->chunk[chunkno].size), (hsize_t)(delta + extra_prfx_size)); if (was_extended < 0) /* error */ - HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't tell if we can extend chunk"); else if (was_extended == FALSE) /* can't extend -- we are done */ HGOTO_DONE(FALSE); @@ -573,7 +573,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); } /* end if */ /* If we can extend an existing null message, take care of that */ @@ -586,7 +586,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size /* Create a new null message */ if (oh->nmesgs >= oh->alloc_nmesgs) if (H5O__alloc_msgs(oh, (size_t)1) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages"); /* Set extension message */ extend_msg = oh->nmesgs++; @@ -611,7 +611,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size oh->chunk[chunkno].size += delta + extra_prfx_size; oh->chunk[chunkno].image = H5FL_BLK_REALLOC(chunk_image, old_image, oh->chunk[chunkno].size); if (NULL == oh->chunk[chunkno].image) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't reallocate extended object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't reallocate extended object header chunk"); oh->chunk[chunkno].gap = 0; /* Wipe new space for chunk */ @@ -640,7 +640,7 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size /* Protect chunk containing continuation message */ if (NULL == (chk_proxy2 = H5O__chunk_protect(f, oh, cont_chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Adjust size in continuation message */ assert(((H5O_cont_t *)(oh->mesg[u].native))->size == old_size); @@ -652,13 +652,13 @@ H5O__alloc_extend_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno, size_t size, size /* Release chunk containing continuation message */ if (H5O__chunk_unprotect(f, chk_proxy2, chk_dirtied2) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk"); } /* end if */ } /* end for */ /* Resize the chunk in the cache */ if (H5O__chunk_resize(oh, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk"); /* Set new message index */ *msg_idx = extend_msg; @@ -882,7 +882,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Allocate space in file to hold the new chunk */ new_chunk_addr = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)size); if (!H5_addr_defined(new_chunk_addr)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "unable to allocate space for new chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "unable to allocate space for new chunk"); /* Create the new chunk giving it a file address. */ if (oh->nchunks >= oh->alloc_nchunks) { @@ -890,7 +890,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ H5O_chunk_t *x; if (NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate larger chunk array, na = %zu", na) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate larger chunk array, na = %zu", na); oh->alloc_nchunks = na; oh->chunk = x; } /* end if */ @@ -901,7 +901,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ oh->chunk[chunkno].size = size; oh->chunk[chunkno].gap = 0; if (NULL == (oh->chunk[chunkno].image = p = H5FL_BLK_CALLOC(chunk_image, size))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate image for chunk, size = %zu", size) + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate image for chunk, size = %zu", size); oh->chunk[chunkno].chunk_proxy = NULL; /* If this is a later version of the object header format, put the magic @@ -918,7 +918,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ */ if (oh->nmesgs + 3 > oh->alloc_nmesgs) if (H5O__alloc_msgs(oh, (size_t)3) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages"); /* Check if we need to move multiple messages, in order to make room for the new message */ cont_size = H5O_ALIGN_OH(oh, (size_t)(H5F_SIZEOF_ADDR(f) + H5F_SIZEOF_SIZE(f))); @@ -932,7 +932,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Protect last chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, chunkno - 1))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Copy each message to the new location */ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) @@ -982,7 +982,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Release chunk, marking it dirty */ if (H5O__chunk_unprotect(f, chk_proxy, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk"); } /* end if */ else { /* Move message (that will be replaced with continuation message) @@ -992,7 +992,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, oh->mesg[found_msg->msgno].chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Create null message for space that message to copy currently occupies */ found_null = oh->nmesgs++; @@ -1052,7 +1052,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Release chunk, marking it dirty */ if (H5O__chunk_unprotect(f, chk_proxy, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk"); } /* end if */ } /* end if */ @@ -1068,18 +1068,18 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null, const H5O_ /* Insert the new chunk into the cache */ if (H5O__chunk_add(f, oh, chunkno, oh->mesg[found_null].chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't add new chunk to cache") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't add new chunk to cache"); /* Initialize the continuation information */ if (NULL == (cont = H5FL_MALLOC(H5O_cont_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); cont->addr = oh->chunk[chunkno].addr; cont->size = oh->chunk[chunkno].size; cont->chunkno = chunkno; /* Split the null message and point at continuation message */ if (H5O__alloc_null(f, oh, found_null, H5O_MSG_CONT, cont, cont_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message"); /* Set new message index value */ *new_idx = idx; @@ -1138,18 +1138,18 @@ H5O__alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t *new_idx) idx = oh->nmesgs; cont_size = H5O_ALIGN_OH(oh, (size_t)(H5F_SIZEOF_ADDR(f) + H5F_SIZEOF_SIZE(f))); if (H5O__alloc_find_best_null(oh, cont_size, &idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best null header message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best null header message"); /* If we couldn't find a null message, locate the best message to move to new chunk */ if (idx >= oh->nmesgs) { found_msg.msgno = -1; if (H5O__alloc_find_best_nonnull(f, oh, &size, &found_msg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best non-null header message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best non-null header message"); } /* end if */ /* Allocate and initialize new chunk in the file */ if (H5O__alloc_chunk(f, oh, size, idx, &found_msg, new_idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate new object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate new object header chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1254,15 +1254,15 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s /* Compute the size needed to store the message in the object header */ raw_size = (type->raw_size)(f, FALSE, mesg); if (0 == raw_size) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "can't compute object header message size") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "can't compute object header message size"); if (raw_size >= H5O_MESG_MAX_SIZE) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "object header message is too large") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "object header message is too large"); aligned_size = H5O_ALIGN_OH(oh, raw_size); /* Find the smallest null message that could hold the new object header message */ idx = oh->nmesgs; if (H5O__alloc_find_best_null(oh, aligned_size, &idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best null header message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error while locating best null header message"); /* if we didn't find one, then allocate more header space */ if (idx >= oh->nmesgs) { @@ -1278,7 +1278,7 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s htri_t tri_result; /* Status from attempting to extend chunk */ if ((tri_result = H5O__alloc_extend_chunk(f, oh, chunkno, raw_size, &idx)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't extend existing chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTEXTEND, FAIL, "can't extend existing chunk"); if (tri_result == TRUE) break; } /* end for */ @@ -1286,17 +1286,17 @@ H5O__alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, const void *mesg, s /* If we were not able to extend a chunk, create a new one */ if (idx >= oh->nmesgs) 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") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create a new object header data chunk"); } /* end if */ 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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message"); /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); /* Set message index value */ *mesg_idx = idx; @@ -1334,11 +1334,11 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link) /* Free any space referred to in the file from this message */ if (H5O__delete_mesg(f, oh, mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, - "unable to delete file space for object header message") + "unable to delete file space for object header message"); /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, mesg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk"); /* Free any native information */ H5O__msg_free_mesg(mesg); @@ -1363,7 +1363,7 @@ H5O__release_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg, hbool_t adj_link) ((oh->chunk[mesg->chunkno].image + oh->chunk[mesg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[mesg->chunkno].gap)), oh->chunk[mesg->chunkno].gap) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk"); } /* end if */ done: @@ -1443,11 +1443,11 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u) /* Convert continuation message into a null message. Do not delete * the target chunk yet, so we can still copy messages from it. */ if (H5O__release_mesg(f, oh, cont_msg, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message"); /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, cont_chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk"); /* Move message(s) forward into continuation message */ for (v = 0, curr_msg = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg++) @@ -1473,7 +1473,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u) /* Delete the target chunk */ if (H5O__chunk_delete(f, oh, deleted_chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache"); assert(move_start <= (move_end + gap_size)); @@ -1492,7 +1492,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u) if (gap_size > 0) { /* Convert remnant into gap in chunk */ if (H5O__add_gap(f, oh, cont_chunkno, &chk_dirtied, cont_u, move_start, gap_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk"); } /* end if */ /* Release any information/memory for continuation message */ @@ -1603,7 +1603,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Protect chunk */ if (NULL == (null_chk_proxy = H5O__chunk_protect(f, oh, curr_msg->chunkno))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, - "unable to load object header chunk") + "unable to load object header chunk"); /* Copy raw data for non-null message to new location */ memmove(curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), @@ -1624,7 +1624,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Release chunk, marking it dirty */ if (H5O__chunk_unprotect(f, null_chk_proxy, TRUE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); null_chk_proxy = NULL; /* Set the flag to indicate that the null message @@ -1652,7 +1652,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) if ((status = H5O__move_cont(f, oh, u)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, - "Error in moving messages into cont message") + "Error in moving messages into cont message"); else if (status > 0) { /* Message(s) got moved into "continuation" message */ packed_msg = TRUE; break; @@ -1672,9 +1672,11 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Protect chunks */ if (NULL == (null_chk_proxy = H5O__chunk_protect(f, oh, null_msg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, + "unable to load object header chunk"); if (NULL == (curr_chk_proxy = H5O__chunk_protect(f, oh, curr_msg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, + "unable to load object header chunk"); /* If the message being moved is a continuation * message and we are doing SWMR writes, we must @@ -1696,7 +1698,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) if (NULL == (cont_targ_chk_proxy = H5O__chunk_protect( f, oh, ((H5O_cont_t *)(curr_msg->native))->chunkno))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, - "unable to load object header chunk") + "unable to load object header chunk"); /* Check for flush dependency on previous continuation chunk */ /* (As opposed to chunk 0) */ @@ -1709,7 +1711,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) if (H5AC_destroy_flush_dependency(curr_chk_proxy, cont_targ_chk_proxy) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, - "unable to destroy flush dependency") + "unable to destroy flush dependency"); cont_targ_chk_proxy->fd_parent = NULL; } /* end if */ @@ -1725,7 +1727,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) * message chunk */ if (H5AC_create_flush_dependency(null_chk_mdc_obj, cont_targ_chk_proxy) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, - "unable to create flush dependency") + "unable to create flush dependency"); cont_targ_chk_proxy->fd_parent = null_chk_mdc_obj; } /* end if */ @@ -1733,7 +1735,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Unprotect continuation message target chunk */ if (H5O__chunk_unprotect(f, cont_targ_chk_proxy, FALSE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); cont_targ_chk_proxy = NULL; } /* end if */ @@ -1761,7 +1763,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Release current chunk, marking it dirty */ if (H5O__chunk_unprotect(f, curr_chk_proxy, curr_chk_dirtied) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); curr_chk_proxy = NULL; curr_chk_dirtied = FALSE; @@ -1774,13 +1776,13 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)), oh->chunk[old_chunkno].gap) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, - "can't eliminate gap in chunk") + "can't eliminate gap in chunk"); } /* end if */ /* Release null chunk, marking it dirty */ if (H5O__chunk_unprotect(f, null_chk_proxy, null_chk_dirtied) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); null_chk_proxy = NULL; null_chk_dirtied = FALSE; } /* end if */ @@ -1803,7 +1805,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Add the gap to the chunk */ if (H5O__add_gap(f, oh, null_msg->chunkno, &null_chk_dirtied, v, null_msg->raw + null_msg->raw_size, gap_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert gap in chunk"); /* Re-use message # for new null message taking place of non-null message */ new_null_msg = v; @@ -1821,7 +1823,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) if (oh->nmesgs >= oh->alloc_nmesgs) { if (H5O__alloc_msgs(oh, (size_t)1) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "can't allocate more space for messages") + "can't allocate more space for messages"); /* "Retarget" 'curr_msg' pointer into newly re-allocated array of messages */ @@ -1835,7 +1837,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) /* Release null message's chunk, marking it dirty */ if (H5O__chunk_unprotect(f, null_chk_proxy, null_chk_dirtied) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); null_chk_proxy = NULL; null_chk_dirtied = FALSE; @@ -1859,13 +1861,13 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh) (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)), oh->chunk[old_chunkno].gap) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, - "can't eliminate gap in chunk") + "can't eliminate gap in chunk"); } /* end if */ /* Release new null message's chunk, marking it dirty */ if (H5O__chunk_unprotect(f, curr_chk_proxy, curr_chk_dirtied) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); curr_chk_proxy = NULL; curr_chk_dirtied = FALSE; } /* end else */ @@ -1993,7 +1995,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh) /* Protect chunk */ if (NULL == (curr_chk_proxy = H5O__chunk_protect(f, oh, curr_msg->chunkno))) HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, - "unable to load object header chunk") + "unable to load object header chunk"); /* Adjust first message address and extend length to cover second message */ curr_msg->raw += adj_raw; @@ -2005,7 +2007,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh) /* Release new null message's chunk, marking it dirty */ if (H5O__chunk_unprotect(f, curr_chk_proxy, TRUE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, - "unable to unprotect object header chunk") + "unable to unprotect object header chunk"); /* Remove second message from list of messages */ if (v < (oh->nmesgs - 1)) @@ -2019,7 +2021,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh) /* The merge null message might span the entire chunk: scan for empty chunk to * remove */ if ((result = H5O__remove_empty_chunks(f, oh)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk"); else if (result > 0) /* Get out of loop */ break; @@ -2027,7 +2029,7 @@ H5O__merge_null(H5F_t *f, H5O_t *oh) /* If the merged message is too large, shrink the chunk */ if (curr_msg->raw_size >= H5O_MESG_MAX_SIZE) if (H5O__alloc_shrink_chunk(f, oh, curr_msg->chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "unable to shrink chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "unable to shrink chunk"); /* Get out of loop */ break; @@ -2136,7 +2138,7 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh) /* Convert continuation message into a null message */ if (H5O__release_mesg(f, oh, cont_msg, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to convert into null message"); /* * Remove chunk from object header's data structure @@ -2158,13 +2160,13 @@ H5O__remove_empty_chunks(H5F_t *f, H5O_t *oh) /* Check the chunk proxy's status in the metadata cache */ if (H5AC_get_entry_status(f, oh->chunk[u].addr, &chk_proxy_status) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, - "unable to check metadata cache status for chunk proxy") + "unable to check metadata cache status for chunk proxy"); /* If the entry is in the cache, update its chunk index */ if (chk_proxy_status & H5AC_ES__IN_CACHE) { if (H5O__chunk_update_idx(f, oh, u) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, - "unable to update index for chunk proxy") + "unable to update index for chunk proxy"); } /* end if */ } /* end for */ } /* end if */ @@ -2272,21 +2274,21 @@ H5O__condense_header(H5F_t *f, H5O_t *oh) /* Scan for messages that can be moved earlier in chunks */ result = H5O__move_msgs_forward(f, oh); if (result < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't move header messages forward") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't move header messages forward"); if (result > 0) rescan_header = TRUE; /* Scan for adjacent null messages & merge them */ result = H5O__merge_null(f, oh); if (result < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack null header messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack null header messages"); if (result > 0) rescan_header = TRUE; /* Scan for empty chunks to remove */ result = H5O__remove_empty_chunks(f, oh); if (result < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk"); if (result > 0) rescan_header = TRUE; } while (rescan_header); @@ -2335,7 +2337,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk"); /* Loop backwards to increase the chance of seeing more null messages at the * end of the chunk. Note that we rely on unsigned u wrapping around at the @@ -2443,7 +2445,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) chunk->image = H5FL_BLK_REALLOC(chunk_image, old_image, chunk->size); chunk->gap = 0; if (NULL == oh->chunk[chunkno].image) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Spin through existing messages, adjusting them */ for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) { @@ -2461,7 +2463,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) /* Protect chunk */ if (NULL == (cont_chk_proxy = H5O__chunk_protect(f, oh, curr_msg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk"); /* Adjust size of continuation message */ assert(((H5O_cont_t *)(curr_msg->native))->size == old_size); @@ -2472,7 +2474,7 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) /* Release chunk, marking it dirty */ if (H5O__chunk_unprotect(f, cont_chk_proxy, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk"); } /* end if */ } /* end for */ @@ -2480,11 +2482,11 @@ H5O__alloc_shrink_chunk(H5F_t *f, H5O_t *oh, unsigned chunkno) /* Resize the chunk in the cache */ if (H5O__chunk_resize(oh, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize object header chunk"); /* Free the unused space in the file */ if (H5MF_xfree(f, H5FD_MEM_OHDR, chunk->addr + new_size, (hsize_t)(old_size - new_size)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to shrink object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to shrink object header chunk"); done: /* Release chunk, marking it dirty */ diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 15eb147..901227e 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -136,16 +136,16 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u assert(p); if (NULL == (attr = H5FL_CALLOC(H5A_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t))) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure") + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure"); /* Version number */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); attr->shared->version = *p++; if (attr->shared->version < H5O_ATTR_VERSION_1 || attr->shared->version > H5O_ATTR_VERSION_LATEST) - HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message"); /* Get the flags byte if we have a later version of the attribute */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) @@ -155,7 +155,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u /* Check for unknown flag */ if (flags & (unsigned)~H5O_ATTR_FLAG_ALL) - HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "unknown flag for attribute message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "unknown flag for attribute message"); } else p++; /* Byte is unused when version < 2 */ @@ -190,11 +190,11 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u if (H5_IS_BUFFER_OVERFLOW(p, name_len, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (attr->shared->name = H5MM_strndup((const char *)p, name_len - 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Make an attempt to detect corrupted name or name length - HDFFV-10588 */ if (name_len != (HDstrnlen(attr->shared->name, name_len) + 1)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "attribute name has different length than stored length") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "attribute name has different length than stored length"); /* Determine pointer movement and check if it's valid */ if (attr->shared->version < H5O_ATTR_VERSION_2) @@ -211,7 +211,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u if (NULL == (attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)( f, open_oh, ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->dt_size, p))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype"); /* Determine pointer movement and check if it's valid */ if (attr->shared->version < H5O_ATTR_VERSION_2) @@ -226,7 +226,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u * What's actually shared, though, is only the extent. */ if (NULL == (attr->shared->ds = H5FL_CALLOC(H5S_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Decode attribute's dataspace extent */ if (H5_IS_BUFFER_OVERFLOW(p, attr->shared->ds_size, p_end)) @@ -234,7 +234,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u if ((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)( f, open_oh, ((flags & H5O_ATTR_FLAG_SPACE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, attr->shared->ds_size, p)) == NULL) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace"); /* Copy the extent information to the dataspace */ H5MM_memcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t)); @@ -244,7 +244,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u /* Default to entire dataspace being selected */ if (H5S_select_all(attr->shared->ds, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection"); /* Determine pointer movement and check if it's valid */ if (attr->shared->version < H5O_ATTR_VERSION_2) @@ -257,16 +257,16 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u /* Get the datatype & dataspace sizes */ if (0 == (dt_size = H5T_get_size(attr->shared->dt))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get datatype size") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get datatype size"); if ((sds_size = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get dataspace size") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "unable to get dataspace size"); ds_size = (hsize_t)sds_size; /* Compute the size of the data */ H5_CHECKED_ASSIGN(attr->shared->data_size, size_t, ds_size * (hsize_t)dt_size, hsize_t); /* Check if multiplication has overflown */ if ((attr->shared->data_size / dt_size) != ds_size) - HGOTO_ERROR(H5E_RESOURCE, H5E_OVERFLOW, NULL, "data size exceeds addressable range") + HGOTO_ERROR(H5E_RESOURCE, H5E_OVERFLOW, NULL, "data size exceeds addressable range"); /* Get the data */ if (attr->shared->data_size) { @@ -277,7 +277,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, u HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(attr->shared->data, p, attr->shared->data_size); } @@ -338,10 +338,10 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg) /* Check whether datatype and dataspace are shared */ if ((is_type_shared = H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if datatype is shared") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if datatype is shared"); if ((is_space_shared = H5O_msg_is_shared(H5O_SDSPACE_ID, attr->shared->ds)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if dataspace is shared") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't determine if dataspace is shared"); /* Encode Version */ *p++ = attr->shared->version; @@ -381,7 +381,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg) /* encode the attribute datatype */ if ((H5O_MSG_DTYPE->encode)(f, FALSE, p, attr->shared->dt) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype"); if (attr->shared->version < H5O_ATTR_VERSION_2) { memset(p + attr->shared->dt_size, 0, H5O_ALIGN_OLD(attr->shared->dt_size) - attr->shared->dt_size); @@ -392,7 +392,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg) /* encode the attribute dataspace */ if ((H5O_MSG_SDSPACE->encode)(f, FALSE, p, &(attr->shared->ds->extent)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace") + HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace"); if (attr->shared->version < H5O_ATTR_VERSION_2) { memset(p + attr->shared->ds_size, 0, H5O_ALIGN_OLD(attr->shared->ds_size) - attr->shared->ds_size); @@ -438,7 +438,7 @@ H5O__attr_copy(const void *_src, void *_dst) /* copy */ if (NULL == (ret_value = (H5A_t *)H5A__copy((H5A_t *)_dst, (const H5A_t *)_src))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "can't copy attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -542,7 +542,7 @@ H5O__attr_free(void *mesg) assert(mesg); if (H5A__close(attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -571,11 +571,11 @@ H5O__attr_delete(H5F_t *f, H5O_t *oh, void *_mesg) /* Decrement reference count on datatype in file */ if ((H5O_MSG_DTYPE->del)(f, oh, attr->shared->dt) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count"); /* Decrement reference count on dataspace in file */ if ((H5O_MSG_SDSPACE->del)(f, oh, attr->shared->ds) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -610,9 +610,9 @@ H5O__attr_link(H5F_t *f, H5O_t *oh, void *_mesg) */ /* Increment reference count on datatype & dataspace in file */ if ((H5O_MSG_DTYPE->link)(f, oh, attr->shared->dt) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust datatype link count"); if ((H5O_MSG_SDSPACE->link)(f, oh, attr->shared->ds) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust dataspace link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -646,7 +646,7 @@ H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, * the message version allowed by the destination file's high bound. */ if (attr_src->shared->version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "attribute message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "attribute message version out of bounds"); /* If we are not copying attributes into the destination file, indicate * that this message should be deleted. @@ -687,10 +687,10 @@ H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t H5_ATTR_UNUSED *mesg_ * by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better * place than here. */ if (H5T_set_loc(((H5A_t *)native_src)->shared->dt, H5F_VOL_OBJ(file_src), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location"); if (NULL == (ret_value = H5A__attr_copy_file((H5A_t *)native_src, file_dst, recompute_size, cpy_info))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -719,7 +719,7 @@ H5O__attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo if (H5A__attr_post_copy_file(src_oloc, (const H5A_t *)mesg_src, dst_oloc, (H5A_t *)mesg_dst, cpy_info) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't copy attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -856,13 +856,13 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt 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") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display datatype message info"); 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") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display dataspace message info"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 8ef4b22..9e38488 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -170,12 +170,12 @@ H5O__attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_U /* Insert attribute into dense storage */ if (H5A__dense_insert(udata->f, udata->ainfo, attr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to add to dense storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, "unable to add to dense storage"); /* Convert message into a null message in the header */ /* (don't delete attribute's space in the file though) */ if (H5O__release_mesg(udata->f, oh, mesg, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message"); /* Indicate that the object header was modified */ *oh_modified = H5O_MODIFY_CONDENSE; @@ -209,7 +209,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check if this object already has attribute information */ if (oh->version > H5O_VERSION_1) { @@ -218,7 +218,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Check for (& retrieve if available) attribute info */ if ((ainfo_exists = H5A__get_ainfo(loc->file, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); if (!ainfo_exists) { /* Initialize attribute information */ ainfo.track_corder = (hbool_t)((oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? TRUE : FALSE); @@ -246,7 +246,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Check for attribute being shareable */ if ((shareable = H5SM_can_share(loc->file, NULL, NULL, H5O_ATTR_ID, attr)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't determine attribute sharing status") + HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't determine attribute sharing status"); else if (shareable == FALSE) { /* Compute the size needed to encode the attribute */ raw_size = (H5O_MSG_ATTR->raw_size)(loc->file, FALSE, attr); @@ -259,7 +259,8 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Create dense storage for attributes */ if (H5A__dense_create(loc->file, &ainfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create dense storage for attributes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, + "unable to create dense storage for attributes"); /* Set up user data for callback */ udata.f = loc->file; @@ -270,7 +271,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) op.u.lib_op = H5O__attr_to_dense_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTCONVERT, FAIL, - "error converting attributes to dense storage") + "error converting attributes to dense storage"); } /* end if */ } /* end if */ @@ -281,7 +282,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) if (ainfo.track_corder) { /* Check for attribute creation order index on the object wrapping around */ if (ainfo.max_crt_idx == H5O_MAX_CRT_ORDER_IDX) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINC, FAIL, "attribute creation index can't be incremented") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINC, FAIL, "attribute creation index can't be incremented"); /* Set the creation order index on the attribute & incr. creation order index */ attr->shared->crt_idx = ainfo.max_crt_idx++; @@ -293,11 +294,11 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Add the attribute information message, if one is needed */ if (new_ainfo) { if (H5O__msg_append_real(loc->file, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute info message"); } /* end if */ /* Otherwise, update existing message */ else if (H5O__msg_write_real(loc->file, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message"); } /* end if */ else { /* Set "bogus" creation index for attribute */ @@ -311,12 +312,12 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) if (H5_addr_defined(ainfo.fheap_addr)) { /* Insert attribute into dense storage */ if (H5A__dense_insert(loc->file, &ainfo, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to add to dense storage"); } /* end if */ else /* Append new message to object header */ if (H5O__msg_append_real(loc->file, oh, H5O_MSG_ATTR, 0, 0, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute in header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new attribute in header"); /* Increment reference count for shared attribute object for the * object handle created by the caller function H5A__create. The count @@ -331,7 +332,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) /* Retrieve ref count for shared attribute */ if (H5SM_get_refcount(loc->file, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count"); /* If this is not the first copy of the attribute in the shared message * storage, decrement the reference count on any shared components @@ -358,15 +359,15 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr) */ if (attr_rc > 1) { if (H5O__attr_delete(loc->file, oh, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); } /* end if */ } /* end if */ else if (shared_mesg < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared"); /* Update the modification time, if any */ if (H5O_touch_oh(loc->file, oh, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: if (oh && H5O_unpin(oh) < 0) @@ -403,7 +404,7 @@ H5O__attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) { /* Make a copy of the attribute to return */ if (NULL == (udata->attr = H5A__copy(NULL, (H5A_t *)mesg->native))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy attribute"); /* Assign [somewhat arbitrary] creation order value, for older versions * of the format or if creation order is not tracked */ @@ -445,31 +446,31 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name) /* Protect the object header to iterate over */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, NULL, "unable to load object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "can't check for attribute info message"); } /* end if */ /* If found the attribute is already opened, make a copy of it to share the * object information. If not, open attribute as a new object */ if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, name)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute"); else if (found_open_attr == TRUE) { if (NULL == (opened_attr = H5A__copy(NULL, exist_attr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute"); } /* end else if */ else { /* Check for attributes in dense storage */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Open attribute with dense storage */ if (NULL == (opened_attr = H5A__dense_open(loc->file, &ainfo, name))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute"); } /* end if */ else { H5O_iter_opn_t udata; /* User data for callback */ @@ -483,11 +484,11 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name) op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_open_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "error updating attribute"); /* Check that we found the attribute */ if (!udata.attr) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name) + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "can't locate attribute: '%s'", name); /* Get attribute opened from object header */ assert(udata.attr); @@ -496,7 +497,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name) /* Mark datatype as being on disk now */ if (H5T_set_loc(opened_attr->shared->dt, H5F_VOL_OBJ(loc->file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location"); } /* end else */ /* Set return value */ @@ -537,7 +538,7 @@ H5O__attr_open_by_idx_cb(const H5A_t *attr, void *_ret_attr) /* Copy attribute information. Shared some attribute information. */ if (NULL == (*ret_attr = H5A__copy(NULL, attr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -573,28 +574,28 @@ H5O__attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order_t /* Iterate over attributes to locate correct one */ if (H5O_attr_iterate_real((hid_t)-1, loc, idx_type, order, n, NULL, &attr_op, &opened_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADITER, NULL, "can't locate attribute") + HGOTO_ERROR(H5E_ATTR, H5E_BADITER, NULL, "can't locate attribute"); /* Find out whether it has already been opened. If it has, close the object * and make a copy of the already opened object to share the object info. */ if (opened_attr) { if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, opened_attr->shared->name)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute"); /* If found that the attribute is already opened, make a copy of it * and close the object just opened. */ if (found_open_attr && exist_attr) { if (H5A__close(opened_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close attribute"); if (NULL == (opened_attr = H5A__copy(NULL, exist_attr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute"); } else { /* Mark datatype as being on disk now */ if (H5T_set_loc(opened_attr->shared->dt, H5F_VOL_OBJ(loc->file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location"); } /* end if */ } /* end if */ @@ -634,11 +635,11 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_ /* Get file serial number for the location of attribute */ if (H5F_get_fileno(loc->file, &loc_fnum) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number") + HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number"); /* Count all opened attributes */ if (H5F_get_obj_count(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, FALSE, &num_open_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't count opened attributes") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't count opened attributes"); /* Find out whether the attribute has been opened */ if (num_open_attr) { @@ -647,14 +648,14 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_ /* Allocate space for the attribute ID list */ if (NULL == (attr_id_list = (hid_t *)H5MM_malloc(num_open_attr * sizeof(hid_t)))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "unable to allocate memory for attribute ID list") + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "unable to allocate memory for attribute ID list"); /* Retrieve the IDs of all opened attributes */ if (H5F_get_obj_ids(loc->file, H5F_OBJ_ATTR | H5F_OBJ_LOCAL, num_open_attr, attr_id_list, FALSE, &check_num_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get IDs of opened attributes") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get IDs of opened attributes"); if (check_num_attr != num_open_attr) - HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "open attribute count mismatch") + HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "open attribute count mismatch"); /* Iterate over the attributes */ for (u = 0; u < num_open_attr; u++) { @@ -662,11 +663,11 @@ H5O__attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char *name_ /* Get pointer to attribute */ if (NULL == (*attr = (H5A_t *)H5VL_object_verify(attr_id_list[u], H5I_ATTR))) - HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, FAIL, "not an attribute") + HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, FAIL, "not an attribute"); /* Get file serial number for attribute */ if (H5F_get_fileno((*attr)->oloc.file, &attr_fnum) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number") + HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number"); /* Verify whether it's the right object. The attribute name, object * address to which the attribute is attached, and file serial @@ -712,22 +713,22 @@ H5O__attr_update_shared(H5F_t *f, H5O_t *oh, H5A_t *attr, H5O_shared_t *update_s /* Extract shared message info from current attribute (for later use) */ if (H5O_set_shared(&sh_mesg, &(attr->sh_loc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message"); /* Reset existing sharing information */ if (H5O_msg_reset_share(H5O_ATTR_ID, attr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing"); /* Store new version of message as a SOHM */ /* (should always work, since we're not changing the size of the attribute) */ if ((shared_mesg = H5SM_try_share(f, oh, 0, H5O_ATTR_ID, attr, NULL)) == 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "attribute changed sharing status") + HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "attribute changed sharing status"); else if (shared_mesg < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't share attribute") + HGOTO_ERROR(H5E_ATTR, H5E_BADMESG, FAIL, "can't share attribute"); /* Retrieve shared message storage ref count for new shared attribute */ if (H5SM_get_refcount(f, H5O_ATTR_ID, &attr->sh_loc, &attr_rc) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count"); /* If the newly shared attribute needs to share "ownership" of the shared * components (ie. its reference count is 1), increment the reference @@ -741,16 +742,16 @@ H5O__attr_update_shared(H5F_t *f, H5O_t *oh, H5A_t *attr, H5O_shared_t *update_s if (attr_rc == 1) /* Increment reference count on attribute components */ if (H5O__attr_link(f, oh, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count"); /* Remove the old attribute from the SOHM storage */ if (H5SM_delete(f, oh, &sh_mesg) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute in shared storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to delete shared attribute in shared storage"); /* Extract updated shared message info from modified attribute, if requested */ if (update_sh_mesg) if (H5O_set_shared(update_sh_mesg, &(attr->sh_loc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "can't get shared message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -786,7 +787,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS if (0 == HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->attr->shared->name)) { /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(udata->f, oh, mesg->chunkno))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk"); /* Because the attribute structure is shared now. The only situation that requires * copying the data is when the metadata cache evicts and reloads this attribute. @@ -809,14 +810,15 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNUS /* Release chunk */ if (H5O__chunk_unprotect(udata->f, chk_proxy, chk_dirtied) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, + "unable to unprotect object header chunk"); chk_proxy = NULL; /* Update the shared attribute in the SOHM storage */ if (mesg->flags & H5O_MSG_FLAG_SHARED) if (H5O__attr_update_shared(udata->f, oh, udata->attr, (H5O_shared_t *)mesg->native) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, - "unable to update attribute in shared storage") + "unable to update attribute in shared storage"); /* Indicate that the object header was modified */ *oh_modified = H5O_MODIFY; @@ -860,21 +862,21 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr) /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Modify the attribute data in dense storage */ if (H5A__dense_write(loc->file, &ainfo, attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute"); } /* end if */ else { H5O_iter_wrt_t udata; /* User data for callback */ @@ -889,16 +891,16 @@ H5O__attr_write(const H5O_loc_t *loc, H5A_t *attr) op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_write_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute"); /* Check that we found the attribute */ if (!udata.found) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate open attribute?") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate open attribute?"); } /* end else */ /* Update the modification time, if any */ if (H5O_touch_oh(loc->file, oh, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: if (oh && H5O_unpin(oh) < 0) @@ -981,7 +983,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(udata->f, oh, mesg->chunkno))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, H5_ITER_ERROR, "unable to load object header chunk"); /* Change the name for the attribute */ H5MM_xfree(((H5A_t *)mesg->native)->shared->name); @@ -989,7 +991,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR /* Recompute the version to encode the attribute with */ if (H5A__set_version(udata->f, ((H5A_t *)mesg->native)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5_ITER_ERROR, "unable to update attribute version") + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5_ITER_ERROR, "unable to update attribute version"); /* Mark the message as modified */ mesg->dirty = TRUE; @@ -997,7 +999,8 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR /* Release chunk */ if (H5O__chunk_unprotect(udata->f, chk_proxy, chk_dirtied) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, H5_ITER_ERROR, + "unable to unprotect object header chunk"); chk_proxy = NULL; /* Check for shared message */ @@ -1005,7 +1008,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR /* Update the shared attribute in the SOHM storage */ if (H5O__attr_update_shared(udata->f, oh, (H5A_t *)mesg->native, NULL) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, - "unable to update attribute in shared storage") + "unable to update attribute in shared storage"); } /* end if */ else { /* Sanity check */ @@ -1035,7 +1038,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR */ if (H5O__release_mesg(udata->f, oh, mesg, FALSE) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR, - "unable to release previous attribute") + "unable to release previous attribute"); *oh_modified = H5O_MODIFY_CONDENSE; @@ -1044,7 +1047,7 @@ H5O__attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR if (H5O__msg_append_real(udata->f, oh, H5O_MSG_ATTR, (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, H5_ITER_ERROR, - "unable to relocate renamed attribute in header") + "unable to relocate renamed attribute in header"); /* Sanity check */ assert(H5O_msg_is_shared(H5O_ATTR_ID, attr) == FALSE); @@ -1097,21 +1100,21 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Rename the attribute data in dense storage */ if (H5A__dense_rename(loc->file, &ainfo, old_name, new_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute"); } /* end if */ else { H5O_iter_ren_t udata; /* User data for callback */ @@ -1127,26 +1130,26 @@ H5O__attr_rename(const H5O_loc_t *loc, const char *old_name, const char *new_nam op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_rename_chk_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute"); /* If the new name was found, indicate an error */ if (udata.found) - HGOTO_ERROR(H5E_ATTR, H5E_EXISTS, FAIL, "attribute with new name already exists") + HGOTO_ERROR(H5E_ATTR, H5E_EXISTS, FAIL, "attribute with new name already exists"); /* Iterate over attributes again, to actually rename attribute with old name */ op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_rename_mod_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute"); /* Check that we found the attribute to rename */ if (!udata.found) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute with old name") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute with old name"); } /* end else */ /* Update the modification time, if any */ if (H5O_touch_oh(loc->file, oh, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: if (oh && H5O_unpin(oh) < 0) @@ -1183,25 +1186,25 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index_t idx_type, H /* Protect the object header to iterate over */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Check for skipping too many attributes */ if (skip > 0 && skip >= ainfo.nattrs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); /* Release the object header */ if (H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); oh = NULL; /* Iterate over attributes in dense storage */ @@ -1212,16 +1215,16 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index_t idx_type, H else { /* Build table of attributes for compact storage */ if (H5A__compact_build_table(loc->file, oh, idx_type, order, &atable) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table"); /* Release the object header */ if (H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); oh = NULL; /* Check for skipping too many attributes */ if (skip > 0 && skip >= atable.nattrs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); /* Iterate over attributes in table */ if ((ret_value = H5A__attr_iterate_table(&atable, skip, last_attr, loc_id, attr_op, op_data)) < 0) @@ -1261,7 +1264,7 @@ H5O__attr_iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsiz /* Look up location for location ID */ if (H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Iterate over attributes to locate correct one */ if ((ret_value = @@ -1310,7 +1313,7 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo) /* Build the table of attributes for this object */ if (H5A__dense_build_table(loc->file, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, &atable) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table"); /* Inspect attributes in table for ones that can't be converted back * into attribute message form (currently only attributes which @@ -1334,12 +1337,12 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo) /* Check if attribute is shared */ if ((shared_mesg = H5O_msg_is_shared(H5O_ATTR_ID, (atable.attrs[u]))) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error determining if message is shared"); else if (shared_mesg == 0) { /* Increment reference count on attribute components */ /* (so that they aren't deleted when the dense attribute storage is deleted) */ if (H5O__attr_link(loc->file, oh, (atable.attrs[u])) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count") + HGOTO_ERROR(H5E_ATTR, H5E_LINKCOUNT, FAIL, "unable to adjust attribute link count"); } /* end if */ else { /* Reset 'shared' status, so attribute will be shared again */ @@ -1351,22 +1354,22 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo) /* Find out whether the attribute has been opened */ if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, (atable.attrs[u])->shared->name)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "failed in finding opened attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "failed in finding opened attribute"); /* If found the attribute is already opened, use the opened message to insert. If not, still use the message in the attribute table. */ if (found_open_attr && exist_attr) { if (H5O__msg_append_real(loc->file, oh, H5O_MSG_ATTR, 0, 0, exist_attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message"); } /* end if */ else if (H5O__msg_append_real(loc->file, oh, H5O_MSG_ATTR, 0, 0, (atable.attrs[u])) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "can't create message"); } /* end for */ /* Remove the dense storage */ if (H5A__dense_delete(loc->file, ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete dense attribute storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete dense attribute storage"); } /* end if */ } /* end if */ @@ -1375,14 +1378,14 @@ H5O__attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo) * accessed via fractal heap/v2 B-tree (HDFFV-9277) */ if (H5O__msg_write_real(loc->file, oh, H5O_MSG_AINFO, H5O_MSG_FLAG_DONTSHARE, 0, ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info message"); /* Check if we have deleted all the attributes and the attribute info * message should be deleted itself. */ if (ainfo->nattrs == 0) { if (H5O__msg_remove_real(loc->file, oh, H5O_MSG_AINFO, H5O_ALL, NULL, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute info"); } /* end if */ done: @@ -1421,7 +1424,7 @@ H5O__attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned H5_ATTR_UNU if (HDstrcmp(((H5A_t *)mesg->native)->shared->name, udata->name) == 0) { /* Convert message into a null message (i.e. delete it) */ if (H5O__release_mesg(udata->f, oh, mesg, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message"); /* Indicate that the object header was modified */ *oh_modified = H5O_MODIFY_CONDENSE; @@ -1462,21 +1465,21 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name) /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if ((ainfo_exists = H5A__get_ainfo(loc->file, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Delete attribute from dense storage */ if (H5A__dense_remove(loc->file, &ainfo, name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage"); } /* end if */ else { H5O_iter_rm_t udata; /* User data for callback */ @@ -1491,21 +1494,21 @@ H5O__attr_remove(const H5O_loc_t *loc, const char *name) op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_remove_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute"); /* Check that we found the attribute */ if (!udata.found) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute"); } /* end else */ /* Update the attribute information after removing an attribute */ if (ainfo_exists) if (H5O__attr_remove_update(loc, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info"); /* Update the modification time, if any */ if (H5O_touch_oh(loc->file, oh, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: if (oh && H5O_unpin(oh) < 0) @@ -1540,21 +1543,21 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if ((ainfo_exists = H5A__get_ainfo(loc->file, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Delete attribute from dense storage */ if (H5A__dense_remove_by_idx(loc->file, &ainfo, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage"); } /* end if */ else { H5O_iter_rm_t udata; /* User data for callback */ @@ -1562,11 +1565,11 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order /* Build table of attributes for compact storage */ if (H5A__compact_build_table(loc->file, oh, idx_type, order, &atable) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table"); /* Check for skipping too many attributes */ if (n >= atable.nattrs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified"); /* Set up user data for callback, to remove the attribute by name */ udata.f = loc->file; @@ -1577,21 +1580,21 @@ H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type, H5_iter_order op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_remove_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "error deleting attribute"); /* Check that we found the attribute */ if (!udata.found) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "can't locate attribute"); } /* end else */ /* Update the attribute information after removing an attribute */ if (ainfo_exists) if (H5O__attr_remove_update(loc, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update attribute info"); /* Update the modification time, if any */ if (H5O_touch_oh(loc->file, oh, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: if (oh && H5O_unpin(oh) < 0) @@ -1630,7 +1633,7 @@ H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs) /* Attempt to get the attribute information from the object header */ if ((ainfo_exists = H5A__get_ainfo(f, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); else if (ainfo_exists > 0) *nattrs = ainfo.nattrs; else @@ -1712,21 +1715,21 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists) /* Protect the object header to iterate over */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check for attributes stored densely */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Check if attribute exists in dense storage */ if (H5A__dense_exists(loc->file, &ainfo, name, attr_exists) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute") + HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute"); } /* end if */ else { H5O_iter_xst_t udata; /* User data for callback */ @@ -1740,7 +1743,7 @@ H5O__attr_exists(const H5O_loc_t *loc, const char *name, hbool_t *attr_exists) op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__attr_exists_cb; if (H5O__msg_iterate_real(loc->file, oh, H5O_MSG_ATTR, &op, &udata) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute") + HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute"); } /* end else */ done: @@ -1780,17 +1783,17 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info) /* Check for (& retrieve if available) attribute info */ if ((ainfo_exists = H5A__get_ainfo(f, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); else if (ainfo_exists > 0) { /* Check if name index available */ if (H5_addr_defined(ainfo.name_bt2_addr)) { /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(f, ainfo.name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Get name index B-tree size */ if (H5B2_size(bt2_name, &(bh_info->index_size)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info"); } /* end if */ /* Check if creation order index available */ @@ -1798,22 +1801,22 @@ H5O__attr_bh_info(H5F_t *f, H5O_t *oh, H5_ih_info_t *bh_info) /* Open the creation order index v2 B-tree */ 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") + "unable to open v2 B-tree for creation order index"); /* Get creation order index B-tree size */ if (H5B2_size(bt2_corder, &(bh_info->index_size)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info"); } /* end if */ /* Get storage size of fractal heap, if it's used */ if (H5_addr_defined(ainfo.fheap_addr)) { /* Open the fractal heap for attributes */ if (NULL == (fheap = H5HF_open(f, ainfo.fheap_addr))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Get heap storage size */ if (H5HF_size(fheap, &(bh_info->heap_size)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info"); } /* end if */ } /* end else */ } /* end if */ diff --git a/src/H5Obogus.c b/src/H5Obogus.c index 334ed89..364629b 100644 --- a/src/H5Obogus.c +++ b/src/H5Obogus.c @@ -112,7 +112,7 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, unsigned H5_AT /* Allocate the bogus message */ if (NULL == (mesg = (H5O_bogus_t *)H5MM_calloc(sizeof(H5O_bogus_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); @@ -120,7 +120,7 @@ H5O__bogus_decode(H5F_t *f, H5O_t H5_ATTR_NDEBUG_UNUSED *open_oh, unsigned H5_AT /* Validate the bogus info */ if (mesg->u != H5O_BOGUS_VALUE) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid bogus value :-)") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid bogus value :-)"); /* Set return value */ ret_value = mesg; diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index 39f6522..0bac54e 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -84,11 +84,11 @@ H5O__btreek_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_BTREEK_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (mesg = (H5O_btreek_t *)H5MM_calloc(sizeof(H5O_btreek_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for v1 B-tree 'K' message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for v1 B-tree 'K' message"); /* Retrieve non-default B-tree 'K' values */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) @@ -166,7 +166,7 @@ H5O__btreek_copy(const void *_mesg, void *_dest) if (!dest && NULL == (dest = (H5O_btreek_t *)H5MM_malloc(sizeof(H5O_btreek_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for shared message table message") + "memory allocation failed for shared message table message"); /* All this message requires is a shallow copy */ *dest = *mesg; diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 34dee05..4a56cb2 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -184,7 +184,7 @@ H5O__cache_get_final_load_size(const void *image, size_t image_len, void *_udata /* 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "can't deserialize object header prefix"); /* Sanity check */ assert(udata->oh); @@ -287,7 +287,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir if (NULL == udata->oh) { /* 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't deserialize object header prefix"); assert(udata->oh); } @@ -301,7 +301,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir if (oh->swmr_write) { /* Create virtual entry, for use as proxy */ if (NULL == (oh->proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, NULL, "can't create object header proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, NULL, "can't create object header proxy"); } else oh->proxy = NULL; @@ -309,7 +309,7 @@ H5O__cache_deserialize(const void *image, size_t len, void *_udata, hbool_t *dir /* Parse the first chunk */ if (H5O__chunk_deserialize(oh, udata->common.addr, udata->chunk0_size, (const uint8_t *)image, len, &(udata->common), dirty) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk"); /* Note that we've loaded the object header from the file */ udata->made_attempt = TRUE; @@ -443,7 +443,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing) break; default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0"); } } else { @@ -477,7 +477,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing) /* Serialize messages for this chunk */ if (H5O__chunk_serialize(f, oh, (unsigned)0) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk"); /* copy the chunk into the image -- this is potentially expensive. * Can we rework things so that the object header and the cache @@ -516,7 +516,7 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing) /* Register the object header as a parent of the virtual entry */ if (H5AC_proxy_entry_add_parent(oh->proxy, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add object header as parent of proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add object header as parent of proxy"); } break; @@ -549,12 +549,12 @@ H5O__cache_notify(H5AC_notify_action_t action, void *_thing) if (oh->swmr_write) { /* Unregister the object header as a parent of the virtual entry */ if (H5AC_proxy_entry_remove_parent(oh->proxy, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't remove object header as parent of proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't remove object header as parent of proxy"); } break; default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); } done: @@ -582,7 +582,7 @@ H5O__cache_free_icr(void *_thing) /* Destroy object header */ if (H5O__free(oh, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -679,7 +679,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t /* Allocate space for the object header data structure */ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Check if we are still decoding the object header */ /* (as opposed to bringing a piece of it back from the file) */ @@ -690,7 +690,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t /* Parse the chunk */ if (H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, (const uint8_t *)image, len, &(udata->common), dirty) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize object header chunk"); /* Set the chunk number for the chunk proxy */ H5_CHECKED_ASSIGN(chk_proxy->chunkno, unsigned, udata->oh->nchunks - 1, size_t); @@ -711,7 +711,7 @@ H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, hbool_t /* Increment reference count of object header */ if (H5O__inc_rc(udata->oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header"); chk_proxy->oh = udata->oh; /* Set return value */ @@ -779,7 +779,8 @@ H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing) /* Serialize messages for this chunk */ if (H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header continuation chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, + "unable to serialize object header continuation chunk"); /* copy the chunk into the image -- this is potentially expensive. * Can we rework things so that the chunk and the cache share a buffer? @@ -824,13 +825,13 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) * that points to this chunk (either oh or another chunk proxy object) */ if (H5AC_create_flush_dependency(chk_proxy->fd_parent, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); } /* Add flush dependency on object header */ { if (H5AC_create_flush_dependency(chk_proxy->oh, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "unable to create flush dependency") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "unable to create flush dependency"); } /* Add flush dependency on object header proxy, if proxy exists */ @@ -841,7 +842,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) /* 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) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, - "can't add object header chunk as parent of proxy") + "can't add object header chunk as parent of proxy"); } } break; @@ -877,23 +878,23 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) (((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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); chk_proxy->fd_parent = NULL; } /* Unregister the object header as a parent of the virtual entry */ if (H5AC_destroy_flush_dependency(chk_proxy->oh, chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency"); /* Unregister the object header chunk as a parent of the virtual entry */ if (H5AC_proxy_entry_remove_parent(chk_proxy->oh->proxy, chk_proxy) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, - "can't remove object header chunk as parent of proxy") + "can't remove object header chunk as parent of proxy"); } break; default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache"); } done: @@ -922,7 +923,7 @@ H5O__cache_chk_free_icr(void *_thing) /* Destroy object header chunk proxy */ if (H5O__chunk_dest(chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -954,7 +955,7 @@ H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont) H5O_cont_t *x; if (NULL == (x = H5FL_SEQ_REALLOC(H5O_cont_t, cont_msg_info->msgs, na))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "memory allocation failed"); cont_msg_info->alloc_nmsgs = na; cont_msg_info->msgs = x; } @@ -992,7 +993,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata /* Allocate space for the new object header data structure */ if (NULL == (oh = H5FL_CALLOC(H5O_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* File-specific, non-stored information */ oh->sizeof_size = H5F_SIZEOF_SIZE(udata->common.f); @@ -1012,14 +1013,14 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); oh->version = *image++; if (H5O_VERSION_2 != oh->version) - HGOTO_ERROR(H5E_OHDR, H5E_VERSION, FAIL, "bad object header version number") + HGOTO_ERROR(H5E_OHDR, H5E_VERSION, FAIL, "bad object header version number"); /* Flags */ if (H5_IS_BUFFER_OVERFLOW(image, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); oh->flags = *image++; if (oh->flags & ~H5O_HDR_ALL_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown object header status flag(s)") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown object header status flag(s)"); /* Number of links to object (unless overridden by refcount message) */ oh->nlink = 1; @@ -1051,7 +1052,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata UINT16DECODE(image, oh->max_compact); UINT16DECODE(image, oh->min_dense); if (oh->max_compact < oh->min_dense) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header attribute phase change values") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header attribute phase change values"); } else { oh->max_compact = H5O_CRT_ATTR_MAX_COMPACT_DEF; @@ -1085,10 +1086,10 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata break; default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad size for chunk 0"); } if (udata->chunk0_size > 0 && udata->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header chunk size") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header chunk size"); } else { /* Version */ @@ -1096,7 +1097,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); oh->version = *image++; if (H5O_VERSION_1 != oh->version) - HGOTO_ERROR(H5E_OHDR, H5E_VERSION, FAIL, "bad object header version number") + HGOTO_ERROR(H5E_OHDR, H5E_VERSION, FAIL, "bad object header version number"); /* Flags */ oh->flags = H5O_CRT_OHDR_FLAGS_DEF; @@ -1129,7 +1130,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata UINT32DECODE(image, udata->chunk0_size); if ((udata->v1_pfx_nmesgs > 0 && udata->chunk0_size < H5O_SIZEOF_MSGHDR_OH(oh)) || (udata->v1_pfx_nmesgs == 0 && udata->chunk0_size > 0)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header chunk size") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header chunk size"); /* Reserved, in version 1 (for 8-byte alignment padding) */ if (H5_IS_BUFFER_OVERFLOW(image, 4, p_end)) @@ -1139,7 +1140,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata /* Verify object header prefix length */ if ((size_t)(image - _image) != (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header prefix length") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "bad object header prefix length"); /* If udata->oh is to be freed (see H5O__cache_verify_chksum), * save the pointer to udata->oh and free it later after setting @@ -1152,7 +1153,7 @@ H5O__prefix_deserialize(const uint8_t *_image, size_t len, H5O_cache_ud_t *udata /* Save the object header for later use in 'deserialize' callback */ udata->oh = oh; if (H5O__free(saved_oh, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't destroy object header"); udata->free_oh = FALSE; } else @@ -1207,7 +1208,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t H5O_chunk_t *x; if (NULL == (x = H5FL_SEQ_REALLOC(H5O_chunk_t, oh->chunk, na))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed"); oh->alloc_nchunks = na; oh->chunk = x; } @@ -1222,12 +1223,12 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t else oh->chunk[chunkno].size = chunk_size; if (NULL == (oh->chunk[chunkno].image = H5FL_BLK_MALLOC(chunk_image, oh->chunk[chunkno].size))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed"); oh->chunk[chunkno].chunk_proxy = NULL; /* Copy disk image into chunk's image */ if (len < oh->chunk[chunkno].size) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "attempted to copy too many disk image bytes into buffer") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "attempted to copy too many disk image bytes into buffer"); H5MM_memcpy(oh->chunk[chunkno].image, image, oh->chunk[chunkno].size); /* Point into chunk image to decode */ @@ -1249,7 +1250,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t 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 (memcmp(chunk_image, H5O_CHK_MAGIC, H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "wrong object header chunk signature"); chunk_image += H5_SIZEOF_MAGIC; } @@ -1282,20 +1283,20 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); UINT16DECODE(chunk_image, mesg_size); if (mesg_size != H5O_ALIGN_OH(oh, mesg_size)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "message not aligned") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "message not aligned"); /* Message flags */ if (H5_IS_BUFFER_OVERFLOW(chunk_image, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); flags = *chunk_image++; if (flags & ~H5O_MSG_FLAG_BITS) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unknown flag for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unknown flag for message"); if ((flags & H5O_MSG_FLAG_SHARED) && (flags & H5O_MSG_FLAG_DONTSHARE)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message"); if ((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message"); if ((flags & H5O_MSG_FLAG_WAS_UNKNOWN) && !(flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "bad flag combination for message"); /* Delay checking the "shareable" flag until we've made sure id * references a valid message class that this version of the library * knows about */ @@ -1320,7 +1321,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t * extends past end of chunk. */ if (chunk_image + mesg_size > eom_ptr) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "corrupt object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "corrupt object header"); /* Increment count of null messages */ if (H5O_NULL_ID == id) @@ -1345,7 +1346,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Check if we need to extend message table to hold the new message */ if (oh->nmesgs >= oh->alloc_nmesgs) if (H5O__alloc_msgs(oh, (size_t)1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate more space for messages"); /* Get pointer to message to set up */ mesg = &oh->mesg[oh->nmesgs]; @@ -1376,7 +1377,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Allocate "unknown" message info */ if (NULL == (unknown = H5FL_MALLOC(H5O_unknown_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Save the original message type ID */ *unknown = id; @@ -1392,7 +1393,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE)) || (flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS)) HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, - "unknown message with 'fail if unknown' flag found") + "unknown message with 'fail if unknown' flag found"); /* Check for "mark if unknown" message flag, etc. */ else if ((flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) && !(flags & H5O_MSG_FLAG_WAS_UNKNOWN) && (udata->file_intent & H5F_ACC_RDWR)) { @@ -1421,7 +1422,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t if ((flags & H5O_MSG_FLAG_SHAREABLE) && H5O_msg_class_g[id] && !(H5O_msg_class_g[id]->share_flags & H5O_SHARE_IS_SHARABLE)) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, - "message of unshareable class flagged as shareable") + "message of unshareable class flagged as shareable"); /* Set message class for "known" messages */ mesg->type = H5O_msg_class_g[id]; @@ -1437,7 +1438,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Decode continuation message */ if (NULL == (cont = (H5O_cont_t *)(H5O_MSG_CONT->decode)(udata->f, NULL, 0, &ioflags, mesg->raw_size, mesg->raw))) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "bad continuation message found") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "bad continuation message found"); H5_CHECKED_ASSIGN(cont->chunkno, unsigned, udata->cont_msg_info->nmsgs + 1, size_t); /* the next continuation message/chunk */ @@ -1446,7 +1447,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Add to continuation messages left to interpret */ if (H5O__add_cont_msg(udata->cont_msg_info, cont) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add continuation message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add continuation message"); } /* Check if message is a ref. count message */ else if (H5O_REFCOUNT_ID == id) { @@ -1455,7 +1456,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Decode ref. count message */ if (oh->version <= H5O_VERSION_1) HGOTO_ERROR(H5E_OHDR, H5E_VERSION, FAIL, - "object header version does not support reference count message") + "object header version does not support reference count message"); refcount = (H5O_refcount_t *)(H5O_MSG_REFCOUNT->decode)(udata->f, NULL, 0, &ioflags, mesg->raw_size, mesg->raw); @@ -1465,7 +1466,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t /* Set object header values */ oh->has_refcount_msg = TRUE; if (!refcount) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount"); oh->nlink = *refcount; } /* Check if message is a link message */ @@ -1566,7 +1567,7 @@ H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno) if (curr_msg->dirty && curr_msg->chunkno == chunkno) { H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5O_msg_flush((H5F_t *)f, oh, curr_msg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message"); H5_GCC_CLANG_DIAG_ON("cast-qual") } diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index e3e2a63..c379384 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -100,12 +100,12 @@ H5O__mdci_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_MDCI_VERSION_0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (mesg = (H5O_mdci_t *)H5FL_MALLOC(H5O_mdci_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for metadata cache image message") + "memory allocation failed for metadata cache image message"); if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); @@ -177,7 +177,7 @@ H5O__mdci_copy(const void *_mesg, void *_dest) /* check args */ assert(mesg); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_mdci_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *mesg; @@ -272,15 +272,15 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg) if (f->shared->closing) { /* Get the eoa, and verify that it has the expected value */ 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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "unable to get file size"); assert(H5_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") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't free MDC image"); } else if (H5MF_xfree(f, H5FD_MEM_SUPER, mesg->addr, mesg->size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free file space for cache image block") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free file space for cache image block"); } /* end if */ done: diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 48a1b8e..f09e6eb 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -90,11 +90,11 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno) /* Allocate space for the object header data structure */ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Increment reference count on object header */ if (H5O__inc_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "can't increment reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "can't increment reference count on object header"); /* Set the values in the chunk proxy */ chk_proxy->f = f; @@ -104,13 +104,13 @@ H5O__chunk_add(H5F_t *f, H5O_t *oh, unsigned idx, unsigned cont_chunkno) /* Determine the parent of the chunk */ if (cont_chunkno != 0) { if (NULL == (cont_chk_proxy = H5O__chunk_protect(f, oh, cont_chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); chk_proxy->fd_parent = cont_chk_proxy; } /* end else */ /* Insert the chunk proxy into the cache */ if (H5AC_insert_entry(f, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk"); chk_proxy = NULL; @@ -155,11 +155,11 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx) /* Create new "fake" chunk proxy for first chunk */ /* (since the first chunk is already handled by the H5O_t object) */ if (NULL == (chk_proxy = H5FL_CALLOC(H5O_chunk_proxy_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Increment reference count on object header */ if (H5O__inc_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "can't increment reference count on object header"); /* Set chunk proxy fields */ chk_proxy->f = f; @@ -179,7 +179,7 @@ H5O__chunk_protect(H5F_t *f, H5O_t *oh, unsigned idx) /* Get the chunk proxy */ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk"); /* Sanity check */ assert(chk_proxy->oh == oh); @@ -224,12 +224,12 @@ H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied) if (dirtied) { /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(chk_proxy->oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); } /* end else/if */ /* Decrement reference count of object header */ if (H5O__dec_rc(chk_proxy->oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header"); /* Free fake chunk proxy */ chk_proxy = H5FL_FREE(H5O_chunk_proxy_t, chk_proxy); @@ -238,7 +238,7 @@ H5O__chunk_unprotect(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t dirtied) /* Release the chunk proxy from the cache, possibly marking it dirty */ if (H5AC_unprotect(f, H5AC_OHDR_CHK, chk_proxy->oh->chunk[chk_proxy->chunkno].addr, chk_proxy, (dirtied ? H5AC__DIRTIED_FLAG : H5AC__NO_FLAGS_SET)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk"); } /* end else */ done: @@ -269,12 +269,12 @@ H5O__chunk_resize(H5O_t *oh, H5O_chunk_proxy_t *chk_proxy) if (0 == chk_proxy->chunkno) { /* Resize object header in cache */ if (H5AC_resize_entry(oh, oh->chunk[0].size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache"); } /* end if */ else { /* Resize chunk in cache */ if (H5AC_resize_entry(chk_proxy, oh->chunk[chk_proxy->chunkno].size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRESIZE, FAIL, "unable to resize chunk in cache"); } /* end else */ done: @@ -315,14 +315,14 @@ H5O__chunk_update_idx(H5F_t *f, H5O_t *oh, unsigned idx) /* Get the chunk proxy */ if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(f, H5AC_OHDR_CHK, oh->chunk[idx].addr, &chk_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Update index for chunk proxy in cache */ chk_proxy->chunkno = idx; /* Release the chunk proxy from the cache, marking it deleted */ if (H5AC_unprotect(f, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__DIRTIED_FLAG) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -354,7 +354,7 @@ H5O__chunk_delete(H5F_t *f, H5O_t *oh, unsigned idx) /* Get the chunk proxy */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Only free file space if not doing SWMR writes */ if (!oh->swmr_write) @@ -389,7 +389,7 @@ H5O__chunk_dest(H5O_chunk_proxy_t *chk_proxy) /* Decrement reference count of object header */ if (H5O__dec_rc(chk_proxy->oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "can't decrement reference count on object header"); done: /* Release the chunk proxy object */ diff --git a/src/H5Ocont.c b/src/H5Ocont.c index 3f14a32..3af61a2 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -214,7 +214,7 @@ H5O__cont_delete(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Notify the cache that the chunk has been deleted */ /* (releases the space for the chunk) */ if (H5O__chunk_delete(f, open_oh, mesg->chunkno) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove chunk from cache"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 573abbd..ae60afb 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -141,9 +141,9 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const /* Check if destination name already exists */ dst_exists = FALSE; if (H5L_exists_tolerant(dst_loc, dst_name, &dst_exists) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists"); if (dst_exists) - HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists") + HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists"); /* Set up opened group location to fill in */ src_loc.oloc = &src_oloc; @@ -152,17 +152,17 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, const /* Find the source object to copy */ if (H5G_loc_find(loc, src_name, &src_loc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found"); loc_found = TRUE; /* Open source object's object header */ if (H5O_open(&src_oloc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object"); obj_open = TRUE; /* Do the actual copying of the object */ if (H5O__copy_obj(&src_loc, dst_loc, dst_name, ocpypl_id, lcpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); done: if (loc_found && H5G_loc_free(&src_loc) < 0) @@ -225,18 +225,18 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Get pointer to object class for this object */ if (NULL == (obj_class = H5O__obj_class(oloc_src))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); /* Set the pointer to the shared struct for the object if opened in the file */ cpy_info->shared_fo = H5FO_opened(oloc_src->file, oloc_src->addr); /* Get source object header */ if (NULL == (oh_src = H5O_protect(oloc_src, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Retrieve user data for particular type of object to copy */ if (obj_class->get_copy_file_udata && (NULL == (cpy_udata = (obj_class->get_copy_file_udata)()))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to retrieve copy user data") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to retrieve copy user data"); /* If we are merging committed datatypes, check for a match in the destination * file now */ @@ -257,13 +257,13 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Search for a matching committed datatype, building the list if * necessary */ if ((merge = H5O__copy_search_comm_dt(oloc_src->file, oh_src, oloc_dst, cpy_info)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't search for matching committed datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't search for matching committed datatype"); if (merge) { /* Found a match, add to skip list and exit */ /* Allocate space for the address mapping of the object copied */ if (NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Insert the address mapping for the found object into the copied * list */ @@ -278,7 +278,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Insert into skip list */ if (H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) { addr_map = H5FL_FREE(H5O_addr_map_t, addr_map); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); } /* end if */ HGOTO_DONE(SUCCEED); @@ -287,18 +287,18 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Flush any dirty messages in source object header to update the header chunks */ if (H5O__flush_msgs(oloc_src->file, oh_src) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object header messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object header messages"); /* Allocate the destination object header and fill in header fields */ if (NULL == (oh_dst = H5FL_CALLOC(H5O_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize header information */ oh_dst->version = oh_src->version; /* Version bounds check for destination object header */ if (oh_dst->version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(oloc_dst->file)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "destination object header version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "destination object header version out of bounds"); oh_dst->flags = oh_src->flags; oh_dst->link_msgs_seen = oh_src->link_msgs_seen; @@ -321,7 +321,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 if (oh_dst->swmr_write) { /* Create virtual entry, for use as proxy */ if (NULL == (oh_dst->proxy = H5AC_proxy_entry_create())) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy"); } /* end if */ else oh_dst->proxy = NULL; @@ -334,7 +334,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Allocate memory for the chunk array - always start with 1 chunk */ if (NULL == (oh_dst->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Update number of allocated chunks. There are still no chunks used. */ oh_dst->alloc_nchunks = 1; @@ -343,7 +343,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 * the source that shouldn't be copied to the destination. */ if (NULL == (deleted = (hbool_t *)H5MM_malloc(sizeof(hbool_t) * oh_src->nmesgs))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); memset(deleted, FALSE, sizeof(hbool_t) * oh_src->nmesgs); /* "pre copy" pass over messages, to gather information for actual message copy operation @@ -384,7 +384,8 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Perform "pre copy" operation on message */ if ((copy_type->pre_copy_file)(oloc_src->file, mesg_src->native, &(deleted[mesgno]), cpy_info, cpy_udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to perform 'pre copy' operation on message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, + "unable to perform 'pre copy' operation on message"); /* Check if the message should be deleted in the destination */ if (deleted[mesgno]) @@ -404,7 +405,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Allocate memory for destination message array */ if (oh_dst->alloc_nmesgs > 0) if (NULL == (oh_dst->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh_dst->alloc_nmesgs))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* "copy" pass over messages, to perform main message copying */ null_msgs = 0; @@ -463,7 +464,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 if (NULL == (mesg_dst->native = H5O__msg_copy_file(copy_type, oloc_src->file, mesg_src->native, oloc_dst->file, &recompute_size, &mesg_flags, cpy_info, cpy_udata))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object header message"); /* Check if the sharing state changed, and recompute the size if so */ @@ -549,7 +550,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Allocate space for chunk in destination file */ if (HADDR_UNDEF == (oh_dst->chunk[0].addr = H5MF_alloc(oloc_dst->file, H5FD_MEM_OHDR, (hsize_t)dst_oh_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header"); addr_new = oh_dst->chunk[0].addr; /* Create memory image for the new chunk */ @@ -562,7 +563,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 * (QAK - 2010/08/17) */ if (NULL == (oh_dst->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, (size_t)dst_oh_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Set dest. chunk information */ oh_dst->chunk[0].size = (size_t)dst_oh_size; @@ -626,7 +627,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Make sure we have enough space for new NULL message */ if (oh_dst->nmesgs + 1 > oh_dst->alloc_nmesgs) if (H5O__alloc_msgs(oh_dst, (size_t)1) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate more space for messages"); /* Create null message for [rest of] space in new chunk */ /* (account for chunk's magic # & checksum) */ @@ -652,11 +653,11 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 */ if (cpy_info->merge_comm_dt && obj_class->type == H5O_TYPE_NAMED_DATATYPE) if (H5O__copy_insert_comm_dt(oloc_src->file, oh_src, oloc_dst, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't insert committed datatype into destination list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't insert committed datatype into destination list"); /* Allocate space for the address mapping of the object copied */ if (NULL == (addr_map = H5FL_MALLOC(H5O_addr_map_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Insert the address mapping for the new object into the copied list */ /* (Do this here, because "post copy" possibly checks it) */ @@ -671,7 +672,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Insert into skip list */ if (H5SL_insert(cpy_info->map_list, addr_map, &(addr_map->src_obj_pos)) < 0) { addr_map = H5FL_FREE(H5O_addr_map_t, addr_map); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); } /* end if */ /* "post copy" loop over messages, to fix up any messages which require a complete @@ -718,7 +719,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 if ((copy_type->post_copy_file)(oloc_src, mesg_src->native, oloc_dst, mesg_dst->native, &mesg_flags, cpy_info) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, - "unable to perform 'post copy' operation on message") + "unable to perform 'post copy' operation on message"); /* Verify that the flags did not change */ assert(mesg_flags == (unsigned)mesg_dst->flags); @@ -736,7 +737,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5 /* Retag all copied metadata to apply the destination object's tag */ if (H5AC_retag_copied_metadata(oloc_dst->file, oloc_dst->addr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries") + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries"); /* Set metadata tag for destination object's object header */ H5_BEGIN_TAG(oloc_dst->addr) @@ -830,7 +831,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_ /* Copy object referred to */ if (H5O__copy_header_real(oloc_src, oloc_dst, cpy_info, obj_type, udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Check for incrementing the depth of copy */ if (inc_depth) @@ -869,7 +870,7 @@ H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5O_ /* Increment destination object's link count, if allowed */ if (inc_link) if (H5O_link(oloc_dst, 1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to increment object link count") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to increment object link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -948,19 +949,19 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t /* Get the copy property list */ if (NULL == (ocpy_plist = (H5P_genplist_t *)H5I_object(ocpypl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Retrieve the copy parameters */ if (H5P_get(ocpy_plist, H5O_CPY_OPTION_NAME, &cpy_option) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object copy flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object copy flag"); /* Retrieve the merge committed datatype list */ if (H5P_peek(ocpy_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed datatype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed datatype list"); /* Get callback info */ if (H5P_get(ocpy_plist, H5O_CPY_MCDT_SEARCH_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info"); /* Convert copy flags into copy struct */ if ((cpy_option & H5O_COPY_SHALLOW_HIERARCHY_FLAG) > 0) { @@ -995,11 +996,11 @@ H5O__copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, hid_t /* Create a skip list to keep track of which objects are copied */ if (NULL == (cpy_info.map_list = H5SL_create(H5SL_TYPE_OBJ, NULL))) - HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, FAIL, "cannot make skip list") + HGOTO_ERROR(H5E_SLIST, H5E_CANTCREATE, FAIL, "cannot make skip list"); /* copy the object from the source file to the destination file */ if (H5O__copy_header_real(oloc_src, oloc_dst, &cpy_info, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); done: if (cpy_info.map_list) @@ -1050,7 +1051,7 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_ /* Copy the object from the source file to the destination file */ if (H5O__copy_header(src_loc->oloc, &new_oloc, ocpypl_id, lcpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Patch dst_loc. Again, this can be removed once oloc's point to shared * file structs. */ @@ -1058,7 +1059,7 @@ H5O__copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, hid_ /* Insert the new object in the destination file's group */ if (H5L_link(dst_loc, dst_name, &new_loc, lcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link"); entry_inserted = TRUE; done: @@ -1166,17 +1167,17 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata) /* Get attribute datatype */ if (NULL == (dt = H5A_type(attr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get attribute datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get attribute datatype"); /* Check if the datatype is committed and search the skip list if so */ if (H5T_is_named(dt)) { /* Allocate key */ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy datatype into key */ if (NULL == (key->dt = (H5T_t *)H5O_msg_copy(H5O_DTYPE_ID, dt, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy datatype message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy datatype message"); /* Get datatype object fileno */ H5F_GET_FILENO(udata->obj_oloc.file, key->fileno); @@ -1184,12 +1185,12 @@ H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata) if (!H5SL_search(udata->dst_dt_list, key)) { /* Allocate destination address */ if (NULL == (addr = H5FL_MALLOC(haddr_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Add the destination datatype to the skip list */ *addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr; if (H5SL_insert(udata->dst_dt_list, addr, key) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); obj_inserted = TRUE; } /* end if */ } /* end if */ @@ -1243,18 +1244,18 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t /* Get pointer to object class for this object */ if ((obj_class = H5O__obj_class(obj_oloc)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); /* Check if the object is a datatype, a dataset using a committed * datatype, or contains an attribute using a committed datatype */ if (obj_class->type == H5O_TYPE_NAMED_DATATYPE) { /* Allocate key */ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Read the destination datatype */ if (NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message"); /* Get destination object fileno */ H5F_GET_FILENO(obj_oloc->file, key->fileno); @@ -1263,23 +1264,23 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t if (!H5SL_search(udata->dst_dt_list, key)) { /* Allocate destination address */ if (NULL == (addr = H5FL_MALLOC(haddr_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Add the destination datatype to the skip list */ *addr = obj_oloc->addr; if (H5SL_insert(udata->dst_dt_list, addr, key) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); obj_inserted = TRUE; } /* end if */ } /* end if */ else if (obj_class->type == H5O_TYPE_DATASET) { /* Allocate key */ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Read the destination datatype */ if (NULL == (key->dt = (H5T_t *)H5O_msg_read(obj_oloc, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message"); /* Check if the datatype is committed and search the skip list if so */ if (H5T_is_named(key->dt)) { @@ -1289,12 +1290,12 @@ H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc, H5O_copy_search_comm_dt_ud_t if (!H5SL_search(udata->dst_dt_list, key)) { /* Allocate destination address */ if (NULL == (addr = H5FL_MALLOC(haddr_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Add the destination datatype to the skip list */ *addr = ((H5O_shared_t *)(key->dt))->u.loc.oh_addr; if (H5SL_insert(udata->dst_dt_list, addr, key) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); obj_inserted = TRUE; } /* end if */ } /* end if */ @@ -1367,12 +1368,12 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name, const /* Find the object */ if (H5G_loc_find(udata->dst_root_loc, name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found"); obj_found = TRUE; /* Check object and add to skip list if appropriate */ if (H5O__copy_search_comm_dt_check(&obj_oloc, udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "can't check object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "can't check object"); } /* end if */ done: @@ -1418,11 +1419,11 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i /* Allocate key */ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Read the source datatype */ if (NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, oh_src, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message"); /* Get destination object fileno */ H5F_GET_FILENO(oloc_dst->file, key->fileno); @@ -1431,7 +1432,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i if (!cpy_info->dst_dt_list) { /* Create the skip list */ if (NULL == (cpy_info->dst_dt_list = H5SL_create(H5SL_TYPE_GENERIC, H5O__copy_comm_dt_cmp))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for committed datatypes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for committed datatypes"); /* Add suggested types to list, if they are present */ if (cpy_info->dst_dt_suggestion_list) { @@ -1442,9 +1443,9 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i /* Set up the root group in the destination file */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -1469,7 +1470,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i if (H5O__copy_search_comm_dt_check(&obj_oloc, &udata) < 0) { if (H5G_loc_free(&obj_loc) < 0) HERROR(H5E_OHDR, H5E_CANTRELEASE, "can't free location"); - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object"); } /* end if */ /* Free location */ @@ -1497,7 +1498,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i /* Make callback to see if we should search destination file */ if (cpy_info->mcdt_cb) if ((search_cb_ret = cpy_info->mcdt_cb(cpy_info->mcdt_ud)) == H5O_MCDT_SEARCH_ERROR) - HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "callback returned error") + HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "callback returned error"); if (search_cb_ret == H5O_MCDT_SEARCH_CONT) { /* Build the complete dst dt list */ @@ -1506,9 +1507,9 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i 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") + "unable to get object location for root group"); if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(oloc_dst->file)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); } /* end if */ else assert(dst_root_loc.path); @@ -1525,11 +1526,11 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst /*i * list */ if (H5G_visit(&dst_root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5O__copy_search_comm_dt_cb, &udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); cpy_info->dst_dt_list_complete = TRUE; } /* end if */ else if (search_cb_ret != H5O_MCDT_SEARCH_STOP) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown return value for callback") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown return value for callback"); } /* end if */ } /* end if */ @@ -1581,24 +1582,24 @@ H5O__copy_insert_comm_dt(H5F_t *file_src, H5O_t *oh_src, H5O_loc_t *oloc_dst, H5 /* Allocate key */ if (NULL == (key = H5FL_MALLOC(H5O_copy_search_comm_dt_key_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Read the datatype. Read from the source file because the destination * object could be changed in the post-copy. */ if (NULL == (key->dt = (H5T_t *)H5O_msg_read_oh(file_src, oh_src, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read DTYPE message"); /* Get destination object fileno */ H5F_GET_FILENO(oloc_dst->file, key->fileno); /* Allocate destination address */ if (NULL == (addr = H5FL_MALLOC(haddr_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Add the destination datatype to the skip list */ *addr = oloc_dst->addr; if (H5SL_insert(cpy_info->dst_dt_list, addr, key) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object into skip list"); done: if (ret_value < 0) { diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c index c9674d3..2479d71 100644 --- a/src/H5Ocopy_ref.c +++ b/src/H5Ocopy_ref.c @@ -105,7 +105,7 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro /* 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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Check if a new valid object is copied to the destination */ if (H5_addr_defined(dst_oloc->addr) && (ret_value > SUCCEED)) { @@ -132,7 +132,7 @@ H5O__copy_obj_by_ref(H5O_loc_t *src_oloc, H5O_loc_t *dst_oloc, H5G_loc_t *dst_ro * This could be changed in the future to slightly improve performance * --NAF */ if (H5L_link(dst_root_loc, tmp_obj_name, &new_loc, cpy_info->lcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert link"); H5G_loc_free(&new_loc); } /* if (H5_addr_defined(dst_oloc.addr)) */ @@ -176,25 +176,25 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t 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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode src object address") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode src object address"); if (H5VL_native_token_to_addr(src_oloc->file, H5I_FILE, tmp_token, &src_oloc->addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); if (!H5_addr_defined(src_oloc->addr) || src_oloc->addr == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer"); dst_oloc->addr = HADDR_UNDEF; /* Attempt to copy object from source to destination file */ if (H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Set the object reference info for the destination file */ if (H5VL_native_addr_to_token(dst_oloc->file, H5I_FILE, dst_oloc->addr, &tmp_token) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token"); if (H5R__encode_token_obj_compat((const H5O_token_t *)&tmp_token, token_size, dst_buf, &buf_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to encode dst object address") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to encode dst object address"); } /* end else */ } /* end for */ @@ -239,21 +239,21 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t else { /* Read from heap */ if (H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode dataset region information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode dataset region information"); /* Get object address */ p = (const uint8_t *)data; H5F_addr_decode(src_oloc->file, &p, &src_oloc->addr); if (!H5_addr_defined(src_oloc->addr) || src_oloc->addr == 0) { H5MM_free(data); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer"); } dst_oloc->addr = HADDR_UNDEF; /* Attempt to copy object from source to destination file */ if (H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0) { H5MM_free(data); - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); } /* end if */ /* Serialize object addr */ @@ -263,7 +263,7 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t /* Write to heap */ if (H5R__encode_heap(dst_oloc->file, dst_buf, &buf_size, data, (size_t)data_size) < 0) { H5MM_free(data); - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode dataset region information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode dataset region information"); } /* Free the buffer allocated in H5R__decode_heap() */ @@ -310,48 +310,48 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt /* Create datatype ID for src datatype. */ if ((tid_src == H5I_INVALID_HID) && (tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register source file datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register source file datatype"); /* create a memory copy of the reference datatype */ if (NULL == (dt_mem = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy"); if ((tid_mem = H5I_register(H5I_DATATYPE, dt_mem, FALSE)) < 0) { (void)H5T_close_real(dt_mem); - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register memory datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register memory datatype"); } /* end if */ /* create reference datatype at the destination file */ if (NULL == (dt_dst = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy"); if (H5T_set_loc(dt_dst, H5F_VOL_OBJ(dst_oloc->file), H5T_LOC_DISK) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); } /* end if */ if ((tid_dst = H5I_register(H5I_DATATYPE, dt_dst, FALSE)) < 0) { (void)H5T_close_real(dt_dst); - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register destination file datatype"); } /* end if */ /* Set up the conversion functions */ if (NULL == (tpath_src_mem = H5T_path_find(dt_src, dt_mem))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and mem datatypes"); if (NULL == (tpath_mem_dst = H5T_path_find(dt_mem, dt_dst))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between mem and dst datatypes"); /* Use extra conversion buffer (TODO we should avoid using an extra buffer once the H5Ocopy code has been * reworked) */ conv_buf_size = MAX(H5T_get_size(dt_src), H5T_get_size(dt_mem)) * ref_count; if (NULL == (conv_buf = H5FL_BLK_MALLOC(type_conv, conv_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer"); H5MM_memcpy(conv_buf, buf_src, nbytes_src); /* Convert from source file to memory */ if (H5T_convert(tpath_src_mem, tid_src, tid_mem, ref_count, (size_t)0, (size_t)0, conv_buf, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Retrieve loc ID */ if ((dst_loc_id = H5F_get_id(dst_oloc->file)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Making equivalent references in the destination file */ for (i = 0; i < ref_count; i++) { @@ -364,41 +364,41 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt /* Get src object address */ if (H5R__get_obj_token(ref, &tmp_token, &token_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object token"); if (H5VL_native_token_to_addr(src_oloc->file, H5I_FILE, tmp_token, &src_oloc->addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Attempt to copy object from source to destination file */ if (H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Set dst object address */ if (H5VL_native_addr_to_token(dst_oloc->file, H5I_FILE, dst_oloc->addr, &tmp_token) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token"); if (H5R__set_obj_token(ref, (const H5O_token_t *)&tmp_token, token_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token"); /* Do not set app_ref since references are released once the copy is done */ if (H5R__set_loc_id(ref, dst_loc_id, TRUE, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id"); } /* end if */ } /* end for */ /* Copy into another buffer, to reclaim memory later */ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, conv_buf_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for copy buffer"); H5MM_memcpy(reclaim_buf, conv_buf, conv_buf_size); if (NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Convert from memory to destination file */ if (H5T_convert(tpath_mem_dst, tid_mem, tid_dst, ref_count, (size_t)0, (size_t)0, conv_buf, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); H5MM_memcpy(buf_dst, conv_buf, nbytes_src); /* Reclaim space from reference data */ if (H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim reference data") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim reference data"); done: if (buf_space && (H5S_close(buf_space) < 0)) @@ -457,9 +457,9 @@ H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *b /* Set up the root group in the destination file */ if (NULL == (dst_root_loc.oloc = H5G_oloc(H5G_rootof(file_dst)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location for root group"); if (NULL == (dst_root_loc.path = H5G_nameof(H5G_rootof(file_dst)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path for root group"); /* Determine # of reference elements to copy */ ref_count = nbytes_src / H5T_get_size(dt_src); @@ -469,24 +469,24 @@ H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *b case H5R_OBJECT1: if (H5O__copy_expand_ref_object1(&src_oloc, buf_src, &dst_oloc, &dst_root_loc, buf_dst, ref_count, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand H5R_OBJECT1 reference") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand H5R_OBJECT1 reference"); break; case H5R_DATASET_REGION1: if (H5O__copy_expand_ref_region1(&src_oloc, buf_src, &dst_oloc, &dst_root_loc, buf_dst, ref_count, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand H5R_DATASET_REGION1 reference") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand H5R_DATASET_REGION1 reference"); break; case H5R_DATASET_REGION2: case H5R_ATTR: case H5R_OBJECT2: if (H5O__copy_expand_ref_object2(&src_oloc, tid_src, dt_src, buf_src, nbytes_src, &dst_oloc, &dst_root_loc, buf_dst, ref_count, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand reference") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unable to expand reference"); break; case H5R_BADTYPE: case H5R_MAXTYPE: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); break; } /* end switch */ diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 5e6f04c..d6c7097 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -246,7 +246,7 @@ H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int ind /* Call the debug method in the class */ if ((ret_value = (type->debug)(f, mesg, stream, indent, fwidth)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "unable to debug message") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "unable to debug message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -365,7 +365,7 @@ H5O__debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int /* debug each message */ if (NULL == (sequence = (unsigned *)H5MM_calloc(NELMTS(H5O_msg_class_g) * sizeof(unsigned)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); for (i = 0, mesg_total = 0; i < oh->nmesgs; i++) { const H5O_msg_class_t *debug_type; /* Type of message to use for callbacks */ unsigned chunkno; /* Chunk for message */ @@ -514,11 +514,11 @@ H5O_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) loc.holding_file = FALSE; if (NULL == (oh = H5O_protect(&loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* debug */ if (H5O__debug_real(f, oh, addr, stream, indent, fwidth) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "debug dump call failed") + HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "debug dump call failed"); done: if (oh && H5O_unprotect(&loc, oh, H5AC__NO_FLAGS_SET) < 0) diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c index ae45d16..71edd82 100644 --- a/src/H5Odeprec.c +++ b/src/H5Odeprec.c @@ -129,7 +129,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2, /* Reset the legacy info struct */ if (H5O__reset_info1(&oinfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct"); /* Check for retrieving data model information */ dm_fields = shim_data->fields & (H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS); @@ -143,7 +143,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2, /* Deserialize VOL object token into object address */ if (H5VLnative_token_to_addr(obj_id, oinfo2->token, &oinfo.addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); } if (shim_data->fields & H5O_INFO_TIME) { oinfo.atime = oinfo2->atime; @@ -172,7 +172,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2, /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier"); /* Set up VOL callback arguments */ obj_opt_args.get_native_info.fields = nat_fields; @@ -183,7 +183,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2, /* Retrieve the object's native information */ if (H5VL_object_optional(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native info for object"); /* Set the native fields */ if (shim_data->fields & H5O_INFO_HDR) @@ -225,7 +225,7 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf /* Reset the passed-in info struct */ if (H5O__reset_info1(oinfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct"); /* Check for retrieving data model information */ dm_fields = fields & (H5O_INFO_BASIC | H5O_INFO_TIME | H5O_INFO_NUM_ATTRS); @@ -240,14 +240,14 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf /* Retrieve the object's data model information */ if (H5VL_object_get(vol_obj, loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get data model info for object"); /* Set the data model fields */ if (fields & H5O_INFO_BASIC) { void *vol_obj_data; if (NULL == (vol_obj_data = H5VL_object_data(vol_obj))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get underlying VOL object"); oinfo->fileno = dm_info.fileno; oinfo->type = dm_info.type; @@ -257,7 +257,7 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf if (H5VL_native_token_to_addr(vol_obj_data, loc_params->obj_type, dm_info.token, &oinfo->addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); } /* end if */ if (fields & H5O_INFO_TIME) { oinfo->atime = dm_info.atime; @@ -285,7 +285,7 @@ H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, H5O_inf /* Retrieve the object's native information */ if (H5VL_object_optional(vol_obj, loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get native info for object"); /* Set the native fields */ if (fields & H5O_INFO_HDR) @@ -349,25 +349,25 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr) /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (is_native_vol_obj) { /* This is a native-specific routine that requires serialization of the token */ if (H5VLnative_addr_to_token(loc_id, addr, &obj_token) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, H5I_INVALID_HID, - "can't serialize address into object token") + "can't serialize address into object token"); } /* end if */ else HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Oopen_by_addr is only meant to be used with the native VOL connector") + "H5Oopen_by_addr is only meant to be used with the native VOL connector"); loc_params.type = H5VL_OBJECT_BY_TOKEN; loc_params.loc_data.loc_by_token.token = &obj_token; @@ -376,11 +376,11 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr) /* Open the object */ if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object"); /* Register the object's ID */ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_API(ret_value) @@ -408,7 +408,7 @@ H5Oget_info1(hid_t loc_id, H5O_info1_t *oinfo /*out*/) /* Check args */ if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -416,11 +416,11 @@ H5Oget_info1(hid_t loc_id, H5O_info1_t *oinfo /*out*/) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve the object's information */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, H5O_INFO_ALL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -448,15 +448,15 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/, /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Fill out location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -466,11 +466,11 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/, /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve the object's information */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, H5O_INFO_ALL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -500,17 +500,17 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check args */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); loc_params.type = H5VL_OBJECT_BY_IDX; loc_params.loc_data.loc_by_idx.name = group_name; @@ -522,11 +522,11 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve the object's information */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, H5O_INFO_ALL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -556,9 +556,9 @@ H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo /*out*/, unsigned fields) /* Check args */ if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Set location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -566,19 +566,19 @@ H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo /*out*/, unsigned fields) /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Oget_info2 is only meant to be used with the native VOL connector") + "H5Oget_info2 is only meant to be used with the native VOL connector"); /* Retrieve deprecated info struct */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -609,17 +609,17 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/, /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "oinfo parameter cannot be NULL"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Fill out location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -629,19 +629,19 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo /*out*/, /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Oget_info_by_name2 is only meant to be used with the native VOL connector") + "H5Oget_info_by_name2 is only meant to be used with the native VOL connector"); /* Retrieve deprecated info struct */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -674,19 +674,19 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Check args */ if (!group_name || !*group_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!oinfo) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); loc_params.type = H5VL_OBJECT_BY_IDX; loc_params.loc_data.loc_by_idx.name = group_name; @@ -698,19 +698,19 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Oget_info_by_idx2 is only meant to be used with the native VOL connector") + "H5Oget_info_by_idx2 is only meant to be used with the native VOL connector"); /* Retrieve deprecated info struct */ if (H5O__get_info_old(vol_obj, &loc_params, oinfo, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get deprecated info for object"); done: FUNC_LEAVE_API(ret_value) @@ -759,15 +759,15 @@ H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1 /* Check args */ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -789,7 +789,7 @@ H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1 /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); done: FUNC_LEAVE_API(ret_value) @@ -839,23 +839,23 @@ H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Check args */ if (!obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL"); if (!*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -879,7 +879,7 @@ H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); done: FUNC_LEAVE_API(ret_value) @@ -933,25 +933,25 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1 /* Check args */ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Ovisit2 is only meant to be used with the native VOL connector") + "H5Ovisit2 is only meant to be used with the native VOL connector"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -973,7 +973,7 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate1 /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed"); done: FUNC_LEAVE_API(ret_value) @@ -1027,33 +1027,33 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Check args */ if (!obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be NULL"); if (!*obj_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj_name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); if (!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified"); if (fields & ~H5O_INFO_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Check if the VOL object is a native VOL connector object */ if (H5VL_object_is_native(vol_obj, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5I_INVALID_HID, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); if (!is_native_vol_obj) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, H5I_INVALID_HID, - "H5Ovisit_by_name2 is only meant to be used with the native VOL connector") + "H5Ovisit_by_name2 is only meant to be used with the native VOL connector"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -1077,7 +1077,7 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it /* Visit the objects */ if ((ret_value = H5VL_object_specific(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c index 566e26b..36a1ba5 100644 --- a/src/H5Odrvinfo.c +++ b/src/H5Odrvinfo.c @@ -84,11 +84,11 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_DRVINFO_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (mesg = (H5O_drvinfo_t *)H5MM_calloc(sizeof(H5O_drvinfo_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info message"); /* Retrieve driver name */ if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end)) @@ -106,7 +106,7 @@ H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Allocate space for buffer */ if (NULL == (mesg->buf = (uint8_t *)H5MM_malloc(mesg->len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for driver info buffer"); /* Copy encoded driver info into buffer */ if (H5_IS_BUFFER_OVERFLOW(p, mesg->len, p_end)) @@ -183,7 +183,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest) if (!dest && NULL == (dest = (H5O_drvinfo_t *)H5MM_malloc(sizeof(H5O_drvinfo_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for shared message table message") + "memory allocation failed for shared message table message"); /* Shallow copy the fields */ *dest = *mesg; @@ -192,7 +192,7 @@ H5O__drvinfo_copy(const void *_mesg, void *_dest) if (NULL == (dest->buf = (uint8_t *)H5MM_malloc(mesg->len))) { if (dest != _dest) dest = (H5O_drvinfo_t *)H5MM_xfree(dest); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } /* end if */ H5MM_memcpy(dest->buf, mesg->buf, mesg->len); diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 24e382c..48622e2 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -70,7 +70,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in * because in that case we are either debugging or deleting the object header */ #define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \ if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, ERR, "incorrect " CLASS " datatype version") + HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, ERR, "incorrect " CLASS " datatype version"); #else /* H5_STRICT_FORMAT_CHECKS */ /* If the version is too low and we are allowed to change the message, upgrade * it and mark the object header as dirty */ @@ -78,7 +78,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) { \ (VERS) = (MIN_VERS); \ if (H5T__upgrade_version((DT), (VERS)) < 0) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version"); \ *(IOF) |= H5O_DECODEIO_DIRTY; \ } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ @@ -151,7 +151,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t UINT32DECODE(*pp, flags); version = (flags >> 4) & 0x0f; if (version < H5O_DTYPE_VERSION_1 || version > H5O_DTYPE_VERSION_LATEST) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "bad version number for datatype message") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "bad version number for datatype message"); dt->shared->version = version; dt->shared->type = (H5T_class_t)(flags & 0x0f); flags >>= 8; @@ -163,7 +163,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Check for invalid datatype size */ if (dt->shared->size == 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "invalid datatype size") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "invalid datatype size"); switch (dt->shared->type) { case H5T_INTEGER: @@ -188,7 +188,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (version >= H5O_DTYPE_VERSION_3) { /* Unsupported byte order*/ if ((flags & 0x40) && !(flags & 0x1)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bad byte order for datatype message") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "bad byte order for datatype message"); /* VAX order if both 1st and 6th bits are turned on*/ if (flags & 0x40) @@ -211,7 +211,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown floating-point normalization") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown floating-point normalization"); } dt->shared->u.atomic.u.f.sign = (flags >> 8) & 0xff; @@ -225,14 +225,14 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t dt->shared->u.atomic.u.f.epos = *(*pp)++; dt->shared->u.atomic.u.f.esize = *(*pp)++; if (dt->shared->u.atomic.u.f.esize == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "exponent size can't be zero") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "exponent size can't be zero"); if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, 1 + 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); dt->shared->u.atomic.u.f.mpos = *(*pp)++; dt->shared->u.atomic.u.f.msize = *(*pp)++; if (dt->shared->u.atomic.u.f.msize == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "mantissa size can't be zero") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "mantissa size can't be zero"); if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, 4, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); @@ -286,10 +286,10 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* The opaque tag flag field must be aligned */ z = flags & (H5T_OPAQUE_TAG_MAX - 1); if (0 != (z & 0x7)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "opaque flag field must be aligned") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "opaque flag field must be aligned"); if (NULL == (dt->shared->u.opaque.tag = (char *)H5MM_malloc(z + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, z, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); @@ -315,14 +315,14 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t */ nmembs = flags & 0xffff; if (nmembs == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid number of members: %u", nmembs) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid number of members: %u", nmembs); if (NULL == (dt->shared->u.compnd.memb = (H5T_cmemb_t *)H5MM_calloc(nmembs * sizeof(H5T_cmemb_t)))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed"); dt->shared->u.compnd.nalloc = nmembs; if (dt->shared->u.compnd.memb_size != 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "member size not initialized to zero") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "member size not initialized to zero"); for (dt->shared->u.compnd.nmembs = 0; dt->shared->u.compnd.nmembs < nmembs; dt->shared->u.compnd.nmembs++) { @@ -342,7 +342,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t actual_name_length = HDstrnlen((const char *)*pp, max); if (actual_name_length == max) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "field name not null terminated") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "field name not null terminated"); } else { /* The buffer end can't be determined when it's an unbounded buffer @@ -359,7 +359,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (NULL == (dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name = H5MM_xstrdup((const char *)*pp))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, - "can't duplicate compound member name string") + "can't duplicate compound member name string"); /* Version 3 of the datatype message eliminated the padding to multiple of 8 bytes */ if (version >= H5O_DTYPE_VERSION_3) { @@ -407,7 +407,8 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (ndims > 4) { dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name = H5MM_xfree(dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name); - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid number of dimensions for array") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, + "invalid number of dimensions for array"); } /* Skip reserved bytes */ @@ -440,7 +441,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (NULL == (temp_type = H5T__alloc())) { dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name = H5MM_xfree(dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* Decode the field's datatype information */ @@ -449,10 +450,10 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t H5MM_xfree(dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name); if (H5T_close_real(temp_type) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't release datatype info"); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode member type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode member type"); } if (temp_type->shared->size == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "type size can't be zero") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "type size can't be zero"); /* Upgrade the version if we can and it is necessary */ if (can_upgrade && temp_type->shared->version > version) { @@ -474,14 +475,14 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t HDONE_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't release datatype info"); HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, - "unable to create array datatype") + "unable to create array datatype"); } /* Close the base type for the array */ if (H5T_close_real(temp_type) < 0) { dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name = H5MM_xfree(dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].name); - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't release datatype info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't release datatype info"); } /* Make the array type the type that is set for the field */ @@ -535,7 +536,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].size) > dt->shared->u.compnd.memb[u].offset)) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, - "member overlaps with previous member") + "member overlaps with previous member"); } /* Update the maximum member position covered */ @@ -551,7 +552,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (version < upgrade_to) { version = upgrade_to; if (H5T__upgrade_version(dt, upgrade_to) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade compound encoding version") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade compound encoding version"); /* We won't mark the message dirty since there were no * errors in the file, simply type versions that we will no * longer encode. */ @@ -596,7 +597,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Mark location of this type as undefined for now. The caller * function should decide the location. */ if (H5T_set_loc(dt, NULL, H5T_LOC_BADLOC) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); break; case H5T_ENUM: { @@ -607,11 +608,11 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t */ nmembs = flags & 0xffff; if (NULL == (dt->shared->parent = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate parent datatype") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate parent datatype"); if (H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent, skip, p_end) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype"); if (dt->shared->parent->shared->size != dt->shared->size) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "ENUM datatype size does not match parent") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "ENUM datatype size does not match parent"); /* Check if the parent of this enum has a version greater than the * enum itself. */ @@ -621,7 +622,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t if (NULL == (dt->shared->u.enumer.name = (char **)H5MM_calloc(nmembs * sizeof(char *))) || NULL == (dt->shared->u.enumer.value = (uint8_t *)H5MM_calloc(nmembs * dt->shared->parent->shared->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed"); dt->shared->u.enumer.nalloc = nmembs; /* Names */ @@ -638,7 +639,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t actual_name_length = HDstrnlen((const char *)*pp, max); if (actual_name_length == max) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "enum name not null terminated") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "enum name not null terminated"); } else { /* The buffer end can't be determined when it's an unbounded buffer @@ -652,7 +653,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); if (NULL == (dt->shared->u.enumer.name[dt->shared->u.enumer.nmembs] = H5MM_xstrdup((const char *)*pp))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "can't duplicate enum name string") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "can't duplicate enum name string"); /* Version 3 of the datatype message eliminated the padding to multiple of 8 bytes */ if (version >= H5O_DTYPE_VERSION_3) { @@ -693,9 +694,9 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Decode base type of VL information */ if (NULL == (dt->shared->parent = H5T__alloc())) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent, skip, p_end) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type"); /* Check if the parent of this vlen has a version greater than the * vlen itself. */ @@ -706,7 +707,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Mark location this type as undefined for now. The caller function should * decide the location. */ if (H5T_set_loc(dt, NULL, H5T_LOC_BADLOC) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); break; case H5T_ARRAY: @@ -720,7 +721,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Double-check the number of dimensions */ if (dt->shared->u.array.ndims > H5S_MAX_RANK) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "too many dimensions for array datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "too many dimensions for array datatype"); /* Skip reserved bytes, if version has them */ if (version < H5O_DTYPE_VERSION_3) { @@ -747,9 +748,9 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t /* Decode base type of array */ if (NULL == (dt->shared->parent = H5T__alloc())) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent, skip, p_end) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode array parent type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode array parent type"); /* Check if the parent of this array has a version greater than the * array itself. */ @@ -768,7 +769,7 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t case H5T_NO_CLASS: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown datatype class found") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown datatype class found"); } done: @@ -833,7 +834,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_ORDER_NONE: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "byte order is not supported in file format yet") + "byte order is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.lsb_pad) { @@ -849,7 +850,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.msb_pad) { @@ -865,7 +866,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.u.i.sign) { @@ -880,7 +881,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NSGN: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "sign scheme is not supported in file format yet") + "sign scheme is not supported in file format yet"); } /* end switch */ UINT16ENCODE(*pp, dt->shared->u.atomic.offset); @@ -909,7 +910,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_ORDER_NONE: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "byte order is not supported in file format yet") + "byte order is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.lsb_pad) { @@ -925,7 +926,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.msb_pad) { @@ -941,7 +942,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.u.f.pad) { @@ -957,7 +958,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.u.f.norm) { @@ -975,7 +976,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NORM_ERROR: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "normalization scheme is not supported in file format yet") + "normalization scheme is not supported in file format yet"); } /* end switch */ flags = (unsigned)(flags | ((dt->shared->u.atomic.u.f.sign << 8) & 0xff00)); @@ -1007,7 +1008,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_ORDER_NONE: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "byte order is not supported in file format yet") + "byte order is not supported in file format yet"); } /* end switch */ UINT16ENCODE(*pp, dt->shared->u.atomic.prec); break; @@ -1044,7 +1045,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_ORDER_NONE: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "byte order is not supported in file format yet") + "byte order is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.lsb_pad) { @@ -1060,7 +1061,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ switch (dt->shared->u.atomic.msb_pad) { @@ -1076,7 +1077,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_NPAD: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "bit padding is not supported in file format yet") + "bit padding is not supported in file format yet"); } /* end switch */ UINT16ENCODE(*pp, dt->shared->u.atomic.offset); @@ -1170,7 +1171,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) /* Subtype */ if (H5O__dtype_encode_helper(pp, dt->shared->u.compnd.memb[i].type) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode member type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode member type"); } /* end for */ } break; @@ -1191,7 +1192,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) /* Parent type */ if (H5O__dtype_encode_helper(pp, dt->shared->parent) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode parent datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode parent datatype"); /* Names, each a multiple of eight bytes */ for (i = 0; i < dt->shared->u.enumer.nmembs; i++) { @@ -1228,7 +1229,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) /* Encode base type of VL information */ if (H5O__dtype_encode_helper(pp, dt->shared->parent) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type"); break; case H5T_ARRAY: /* Array datatypes */ @@ -1266,7 +1267,7 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt) /* Encode base type of array's information */ if (H5O__dtype_encode_helper(pp, dt->shared->parent) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type"); break; case H5T_NO_CLASS: @@ -1323,7 +1324,7 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Allocate datatype message */ if (NULL == (dt = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* If we are decoding a buffer from H5Tdecode(), we won't have the size * of the buffer and bounds checking will be impossible. In this case, @@ -1334,7 +1335,7 @@ H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Perform actual decode of message */ if (H5O__dtype_decode_helper(ioflags, &p, dt, skip, p_end) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type"); /* Set return value */ ret_value = dt; @@ -1381,7 +1382,7 @@ H5O__dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg) /* encode */ if (H5O__dtype_encode_helper(&p, dt) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1418,7 +1419,7 @@ H5O__dtype_copy(const void *_src, void *_dst) /* Copy */ if (NULL == (dst = H5T_copy(src, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't copy type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't copy type"); /* Was result already allocated? */ if (_dst) { @@ -1611,7 +1612,7 @@ H5O__dtype_free(void *mesg) /* Release the datatype */ if (H5T_close_real((H5T_t *)mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1648,7 +1649,7 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh) /* Copy the shared information */ if (H5O_set_shared(&(dt->sh_loc), sh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy shared message info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy shared message info"); /* If this is now a committed datatype, set its state properly. */ if (sh->type == H5O_SHARE_TYPE_COMMITTED) { @@ -1656,7 +1657,7 @@ H5O__dtype_set_share(void *_mesg /*in,out*/, const H5O_shared_t *sh) /* Set up the object location for the datatype also */ if (H5O_loc_reset(&(dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to reset location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to reset location"); dt->oloc.file = sh->file; dt->oloc.addr = sh->u.loc.oh_addr; } /* end if */ @@ -1693,13 +1694,13 @@ H5O__dtype_can_share(const void *_mesg) if ((tri_ret = H5T_is_immutable(mesg)) > 0) HGOTO_DONE(FALSE); else if (tri_ret < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is immutable") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is immutable"); /* Don't share committed datatypes */ if ((tri_ret = H5T_is_named(mesg)) > 0) HGOTO_DONE(FALSE); else if (tri_ret < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is shared") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "can't tell if datatype is shared"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1736,7 +1737,7 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_ /* 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 */ if (dt_src->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "datatype message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "datatype message version out of bounds"); /* If the user data is non-NULL, assume we are copying a dataset * and check if we need to make a copy of the datatype for later in @@ -1748,11 +1749,11 @@ H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t H5_ATTR_ if (udata) { /* Create a memory copy of the variable-length datatype */ if (NULL == (udata->src_dtype = H5T_copy(dt_src, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy"); /* Set the location of the source datatype to describe the disk form of the data */ if (H5T_set_loc(udata->src_dtype, H5F_VOL_OBJ(file_src), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); } /* end if */ done: @@ -1781,11 +1782,11 @@ H5O__dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg /* Perform a normal copy of the object header message */ if (NULL == (dst_mesg = (H5T_t *)H5O__dtype_copy(native_src, NULL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy"); /* The datatype will be in the new file; set its location. */ if (H5T_set_loc(dst_mesg, H5F_VOL_OBJ(file_dst), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set location"); ret_value = dst_mesg; @@ -1819,7 +1820,7 @@ H5O__dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc, const if (dt_dst->sh_loc.type == H5O_SHARE_TYPE_COMMITTED) { 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") + 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 */ diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 51794f2..5e8c4df 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -87,14 +87,14 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED assert(p); if (NULL == (mesg = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed"); /* Version (1 byte) */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); version = *p++; if (version != H5O_EFL_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for external file list message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for external file list message"); /* Reserved (3 bytes) */ if (H5_IS_BUFFER_OVERFLOW(p, 3, p_end)) @@ -106,36 +106,36 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, mesg->nalloc); if (mesg->nalloc <= 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad number of allocated slots when parsing efl msg") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad number of allocated slots when parsing efl msg"); if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, mesg->nused); if (mesg->nused > mesg->nalloc) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad number of in-use slots when parsing efl msg") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad number of in-use slots when parsing efl msg"); /* Heap address */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->heap_addr)); if (H5_addr_defined(mesg->heap_addr) == FALSE) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad local heap address when parsing efl msg") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad local heap address when parsing efl msg"); /* Decode the file list */ mesg->slot = (H5O_efl_entry_t *)H5MM_calloc(mesg->nalloc * sizeof(H5O_efl_entry_t)); if (NULL == mesg->slot) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (heap = H5HL_protect(f, mesg->heap_addr, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect local heap") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect local heap"); #ifdef H5O_DEBUG /* Verify that the name at offset 0 in the local heap is the empty string */ s = (const char *)H5HL_offset_into(heap, 0); if (s == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "could not obtain pointer into local heap") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "could not obtain pointer into local heap"); if (*s != '\0') - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "entry at offset 0 in local heap not an empty string") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "entry at offset 0 in local heap not an empty string"); #endif for (size_t u = 0; u < mesg->nused; u++) { @@ -145,12 +145,12 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED H5F_DECODE_LENGTH(f, p, mesg->slot[u].name_offset); if ((s = (const char *)H5HL_offset_into(heap, mesg->slot[u].name_offset)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get external file name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get external file name"); if (*s == '\0') - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "invalid external file name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "invalid external file name"); mesg->slot[u].name = H5MM_xstrdup(s); if (mesg->slot[u].name == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "string duplication failed") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "string duplication failed"); /* File offset */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f), p_end)) @@ -164,7 +164,7 @@ H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED } if (H5HL_unprotect(heap) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect local heap") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect local heap"); /* Set return value */ ret_value = mesg; @@ -270,7 +270,7 @@ H5O__efl_copy(const void *_mesg, void *_dest) /* Allocate destination message, if necessary */ if (!dest && NULL == (dest = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message"); /* copy */ *dest = *mesg; @@ -278,12 +278,12 @@ H5O__efl_copy(const void *_mesg, void *_dest) /* Deep copy allocated information */ if (dest->nalloc > 0) { if (NULL == (dest->slot = (H5O_efl_entry_t *)H5MM_calloc(dest->nalloc * sizeof(H5O_efl_entry_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slots"); slot_allocated = TRUE; for (u = 0; u < mesg->nused; u++) { dest->slot[u] = mesg->slot[u]; if (NULL == (dest->slot[u].name = H5MM_xstrdup(mesg->slot[u].name))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slot name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "can't allocate efl message slot name"); } /* end for */ } /* end if */ @@ -442,7 +442,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d /* Allocate space for the destination efl */ if (NULL == (efl_dst = (H5O_efl_t *)H5MM_calloc(sizeof(H5O_efl_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the "top level" information */ H5MM_memcpy(efl_dst, efl_src, sizeof(H5O_efl_t)); @@ -454,22 +454,22 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d /* Create name heap */ if (H5HL_create(file_dst, heap_size, &efl_dst->heap_addr /*out*/) < 0) - HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, NULL, "can't create heap") + HGOTO_ERROR(H5E_EFL, H5E_CANTINIT, NULL, "can't create heap"); /* Pin the heap down in memory */ if (NULL == (heap = H5HL_protect(file_dst, efl_dst->heap_addr, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to protect EFL file name heap") + HGOTO_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to protect EFL file name heap"); /* 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") + HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap"); assert(0 == name_offset); /* allocate array of external file entries */ if (efl_src->nalloc > 0) { size = efl_src->nalloc * sizeof(H5O_efl_entry_t); if ((efl_dst->slot = (H5O_efl_entry_t *)H5MM_calloc(size)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy content from the source. Need to update later */ H5MM_memcpy(efl_dst->slot, efl_src->slot, size); @@ -480,7 +480,7 @@ H5O__efl_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *mesg_src, H5F_t *file_d efl_dst->slot[idx].name = H5MM_xstrdup(efl_src->slot[idx].name); if (H5HL_insert(file_dst, heap, HDstrlen(efl_dst->slot[idx].name) + 1, efl_dst->slot[idx].name, &(efl_dst->slot[idx].name_offset)) < 0) - HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap") + HGOTO_ERROR(H5E_EFL, H5E_CANTINSERT, NULL, "can't insert file name into heap"); } /* Set return value */ diff --git a/src/H5Ofill.c b/src/H5Ofill.c index d2f14af..d431364 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -199,14 +199,14 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, assert(p); if (NULL == (fill = H5FL_CALLOC(H5O_fill_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message"); /* Version */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); fill->version = *p++; if (fill->version < H5O_FILL_VERSION_1 || fill->version > H5O_FILL_VERSION_LATEST) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for fill value message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for fill value message"); /* Decode each version */ if (fill->version < H5O_FILL_VERSION_3) { @@ -240,7 +240,7 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value"); H5MM_memcpy(fill->buf, p, (size_t)fill->size); } } @@ -260,7 +260,7 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Check for unknown flags */ if (flags & (unsigned)~H5O_FILL_FLAGS_ALL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown flag for fill value message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown flag for fill value message"); /* Space allocation time */ fill->alloc_time = @@ -273,7 +273,7 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, if (flags & H5O_FILL_FLAG_UNDEFINED_VALUE) { if (flags & H5O_FILL_FLAG_HAVE_VALUE) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "have value and undefined value flags both set") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "have value and undefined value flags both set"); /* Set value for "undefined" fill value */ fill->size = -1; @@ -291,7 +291,7 @@ H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value"); H5MM_memcpy(fill->buf, p, (size_t)fill->size); /* Set the "defined" flag */ @@ -339,7 +339,7 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag assert(p); if (NULL == (fill = H5FL_CALLOC(H5O_fill_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value message"); /* Set non-zero default fields */ fill->version = H5O_FILL_VERSION_2; @@ -361,17 +361,17 @@ H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flag /* Get the datatype message */ if ((exists = H5O_msg_exists_oh(open_oh, H5O_DTYPE_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read object header"); if (exists) { if (NULL == (dt = (H5T_t *)H5O_msg_read_oh(f, open_oh, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't read DTYPE message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't read DTYPE message"); /* Verify size */ if (fill->size != (ssize_t)H5T_GET_SIZE(dt)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "inconsistent fill value size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "inconsistent fill value size"); } if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value"); H5MM_memcpy(fill->buf, p, (size_t)fill->size); fill->fill_defined = TRUE; } @@ -540,7 +540,7 @@ H5O__fill_copy(const void *_src, void *_dst) assert(src); if (!dst && NULL == (dst = H5FL_MALLOC(H5O_fill_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill message"); /* Shallow copy basic fields */ *dst = *src; @@ -548,7 +548,7 @@ H5O__fill_copy(const void *_src, void *_dst) /* Copy data type of fill value */ if (src->type) { if (NULL == (dst->type = H5T_copy(src->type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "can't copy datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "can't copy datatype"); } /* end if */ else dst->type = NULL; @@ -557,7 +557,7 @@ H5O__fill_copy(const void *_src, void *_dst) if (src->buf) { H5_CHECK_OVERFLOW(src->size, ssize_t, size_t); if (NULL == (dst->buf = H5MM_malloc((size_t)src->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for fill value"); H5MM_memcpy(dst->buf, src->buf, (size_t)src->size); /* Check for needing to convert/copy fill value */ @@ -567,7 +567,7 @@ H5O__fill_copy(const void *_src, void *_dst) /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(src->type, dst->type))) HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, - "unable to convert between src and dst data types") + "unable to convert between src and dst data types"); /* If necessary, convert fill value datatypes (which copies VL components, etc.) */ if (!H5T_path_noop(tpath)) { @@ -578,11 +578,11 @@ H5O__fill_copy(const void *_src, void *_dst) /* Wrap copies of types to convert */ dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->type, H5T_COPY_TRANSIENT), FALSE); if (dst_id < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype"); src_id = H5I_register(H5I_DATATYPE, H5T_copy(src->type, H5T_COPY_ALL), FALSE); if (src_id < 0) { H5I_dec_ref(dst_id); - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy/register datatype"); } /* end if */ /* Allocate a background buffer */ @@ -590,7 +590,7 @@ H5O__fill_copy(const void *_src, void *_dst) if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, bkg_size))) { H5I_dec_ref(src_id); H5I_dec_ref(dst_id); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } /* end if */ /* Convert fill value */ @@ -600,7 +600,7 @@ H5O__fill_copy(const void *_src, void *_dst) H5I_dec_ref(dst_id); if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); - HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, NULL, "datatype conversion failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCONVERT, NULL, "datatype conversion failed"); } /* end if */ /* Release the background buffer */ @@ -726,20 +726,20 @@ H5O_fill_reset_dyn(H5O_fill_t *fill) /* Copy the fill value datatype and get an ID for it */ if (NULL == (fill_type = H5T_copy(fill->type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy fill value datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy fill value datatype"); if ((fill_type_id = H5I_register(H5I_DATATYPE, fill_type, FALSE)) < 0) { (void)H5T_close_real(fill_type); - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register fill value datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to register fill value datatype"); } /* end if */ /* Create a scalar dataspace for the fill value element */ if (NULL == (fill_space = H5S_create(H5S_SCALAR))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create scalar dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create scalar dataspace"); /* Reclaim any variable length components of the fill value */ if (H5T_reclaim(fill_type_id, fill_space, fill->buf) < 0) { H5S_close(fill_space); - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim variable-length fill value data") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "unable to reclaim variable-length fill value data"); } /* end if */ /* Release the scalar fill value dataspace */ @@ -839,7 +839,7 @@ H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hb /* 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 */ if (fill_src->version > H5O_fill_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "fill value message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "fill value message version out of bounds"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -984,7 +984,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed) * Can we convert between source and destination data types? */ if (NULL == (tpath = H5T_path_find(fill->type, dset_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes"); /* Don't bother doing anything if there will be no actual conversion */ if (!H5T_path_noop(tpath)) { @@ -992,7 +992,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed) if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill->type, H5T_COPY_ALL), FALSE)) < 0 || (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(dset_type, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy/register data type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy/register data type"); /* * Datatype conversions are always done in place, so we need a buffer @@ -1001,17 +1001,17 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed) fill_type_size = H5T_get_size(fill->type); if (NULL == (buf = H5MM_malloc(MAX(fill_type_size, H5T_get_size(dset_type))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); H5MM_memcpy(buf, fill->buf, fill_type_size); /* Use CALLOC here to clear the buffer in case later the library thinks there's * data in the background. */ if (H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(dset_type)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); /* Do the conversion */ if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Update the fill message */ H5T_vlen_reclaim_elmt(fill->buf, fill->type); @@ -1063,7 +1063,7 @@ H5O_fill_set_version(H5F_t *f, H5O_fill_t *fill) /* Version bounds check */ if (version > H5O_fill_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds"); /* Set the message version */ fill->version = version; diff --git a/src/H5Oflush.c b/src/H5Oflush.c index 844b240..6ff751f 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -72,23 +72,23 @@ H5O_flush(H5O_loc_t *oloc, hid_t obj_id) /* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache. * Leave this situation for the future solution */ if (H5F_HAS_FEATURE(oloc->file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel"); /* Get the object pointer */ if (NULL == (obj_ptr = H5VL_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Get the object class */ if (NULL == (obj_class = H5O__obj_class(oloc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object class"); /* Flush the object of this class */ if (obj_class->flush && obj_class->flush(obj_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object"); /* Flush the object metadata and invoke flush callback */ if (H5O_flush_common(oloc, obj_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object and object flush callback") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object and object flush callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -114,15 +114,15 @@ H5O_flush_common(H5O_loc_t *oloc, hid_t obj_id) /* Retrieve tag for object */ if (H5O__oh_tag(oloc, &tag) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object metadata") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object metadata"); /* Flush metadata based on tag value of the object */ if (H5F_flush_tagged_metadata(oloc->file, tag) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata"); /* Check to invoke callback */ if (H5F_object_flush_cb(oloc->file, obj_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to do object flush callback") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to do object flush callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -151,11 +151,11 @@ H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag) /* Get object header for object */ if (NULL == (oh = H5O_protect(oloc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object's object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object's object header"); /* Get object header's address (i.e. the tag value for this object) */ if (HADDR_UNDEF == (*tag = H5O_OH_GET_ADDR(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get address of object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get address of object header"); done: /* Unprotect object header on failure */ @@ -219,14 +219,14 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid) /* Save important datatype state */ if (H5I_get_type(oid) == H5I_DATATYPE) if (H5T_save_refresh_state(oid, &cached_H5O_shared) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to save datatype state") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to save datatype state"); /* Get the VOL object from the ID and cache a pointer to the connector. * The vol_obj will disappear when the underlying object is closed, so * we can't use that directly. */ if (NULL == (vol_obj = H5VL_vol_object(oid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); connector = vol_obj->connector; /* Bump the number of references on the VOL connector. @@ -236,11 +236,11 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid) /* Close object & evict its metadata */ if (H5O__refresh_metadata_close(oloc, &obj_loc, oid) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object"); /* Re-open the object, re-fetching its metadata */ if (H5O_refresh_metadata_reopen(oid, H5P_DEFAULT, &obj_loc, connector, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object"); /* Restore the number of references on the VOL connector */ connector->nrefs--; @@ -248,7 +248,7 @@ H5O_refresh_metadata(H5O_loc_t *oloc, hid_t oid) /* Restore important datatype state */ if (H5I_get_type(oid) == H5I_DATATYPE) if (H5T_restore_refresh_state(oid, &cached_H5O_shared) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to restore datatype state") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to restore datatype state"); } /* end if */ @@ -296,15 +296,15 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid) /* Handle close for multiple dataset opens */ if (H5I_get_type(oid) == H5I_DATASET) if (H5D_mult_refresh_close(oid) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to prepare refresh for dataset") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to prepare refresh for dataset"); /* Retrieve tag for object */ if (H5O__oh_tag(oloc, &tag) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to get object header address") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to get object header address"); /* Get cork status of the object with tag */ if (H5AC_cork(oloc->file, tag, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to retrieve an object's cork status") + HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to retrieve an object's cork status"); /* Hold a copy of the object's file pointer, since closing the object will * invalidate the file pointer in the oloc. @@ -312,20 +312,20 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid) file = oloc->file; /* Close the object */ if (H5I_dec_ref(oid) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to close object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to close object"); /* Flush metadata based on tag value of the object */ if (H5F_flush_tagged_metadata(file, tag) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata"); /* Evict the object's tagged metadata */ if (H5AC_evict_tagged_metadata(file, tag, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to evict metadata") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to evict metadata"); /* Re-cork object with tag */ if (corked) if (H5AC_cork(file, tag, H5AC__SET_CORK, &corked) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to cork the object") + HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to cork the object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -363,31 +363,31 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t case H5I_GROUP: /* Re-open the group */ if (NULL == (object = H5G_open(obj_loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open group") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open group"); break; case H5I_DATATYPE: /* Re-open the named datatype */ if (NULL == (object = H5T_open(obj_loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open named datatype") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open named datatype"); break; case H5I_DATASET: /* Set dataset access property list in API context if appropriate */ if (H5CX_set_apl(&apl_id, H5P_CLS_DACC, oid, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info"); /* Re-open the dataset */ if (NULL == (object = H5D_open(obj_loc, apl_id == H5P_DEFAULT ? H5P_DATASET_ACCESS_DEFAULT : apl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset"); if (!start_swmr) /* No need to handle multiple opens when H5Fstart_swmr_write() */ if (H5D_mult_refresh_reopen((H5D_t *)object) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to finish refresh for dataset") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to finish refresh for dataset"); break; case H5I_MAP: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -406,13 +406,13 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t case H5I_NTYPES: default: HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, - "not a valid file object ID (dataset, group, or datatype)") + "not a valid file object ID (dataset, group, or datatype)"); break; } /* end switch */ /* Re-register ID for the object */ if ((H5VL_register_using_existing_id(type, object, vol_connector, TRUE, oid)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to re-register object ID after refresh") + HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to re-register object ID after refresh"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 0936380..6829eb8 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -100,7 +100,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Allocate space for message */ if (NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF; @@ -133,7 +133,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU fsinfo->persist = TRUE; fsinfo->threshold = threshold; if (HADDR_UNDEF == (fsinfo->eoa_pre_fsm_fsalloc = H5F_get_eoa(f, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to get file size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to get file size"); for (type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; type++) { if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, @@ -158,7 +158,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5F_FILE_SPACE_NTYPES: case H5F_FILE_SPACE_DEFAULT: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file space strategy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file space strategy"); } fsinfo->version = H5O_FSINFO_VERSION_1; @@ -166,7 +166,7 @@ H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU } else { if (vers < H5O_FSINFO_VERSION_1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad version number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad version number"); fsinfo->version = vers; if (H5_IS_BUFFER_OVERFLOW(p, 1 + 1, p_end)) @@ -274,7 +274,7 @@ H5O__fsinfo_copy(const void *_mesg, void *_dest) /* check args */ assert(fsinfo); if (!dest && NULL == (dest = H5FL_CALLOC(H5O_fsinfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *fsinfo; @@ -440,7 +440,7 @@ H5O_fsinfo_set_version(H5F_libver_t low, H5F_libver_t high, H5O_fsinfo_t *fsinfo /* Version bounds check */ if (H5O_fsinfo_ver_bounds[high] == H5O_INVALID_VERSION || version > H5O_fsinfo_ver_bounds[high]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "File space info message's version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "File space info message's version out of bounds"); /* Set the message version */ fsinfo->version = version; @@ -471,7 +471,7 @@ H5O_fsinfo_check_version(H5F_libver_t high, H5O_fsinfo_t *fsinfo) /* Check the version */ if (H5O_fsinfo_ver_bounds[high] == H5O_INVALID_VERSION || fsinfo->version > H5O_fsinfo_ver_bounds[high]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "File space info message's version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "File space info message's version out of bounds"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index 3a61cdf..f8b1263 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -96,28 +96,28 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Version of message */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_GINFO_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (ginfo = H5FL_CALLOC(H5O_ginfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get the flags for the group */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); flags = *p++; if (flags & ~H5O_GINFO_ALL_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message"); ginfo->store_link_phase_change = (flags & H5O_GINFO_STORE_PHASE_CHANGE) ? TRUE : FALSE; ginfo->store_est_entry_info = (flags & H5O_GINFO_STORE_EST_ENTRY_INFO) ? TRUE : FALSE; /* Get the max. # of links to store compactly & the min. # of links to store densely */ if (ginfo->store_link_phase_change) { if (H5_IS_BUFFER_OVERFLOW(p, 2 * 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, ginfo->max_compact); UINT16DECODE(p, ginfo->min_dense); } @@ -129,7 +129,7 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Get the estimated # of entries & name lengths */ if (ginfo->store_est_entry_info) { if (H5_IS_BUFFER_OVERFLOW(p, 2 * 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, ginfo->est_num_entries); UINT16DECODE(p, ginfo->est_name_len); } @@ -217,7 +217,7 @@ H5O__ginfo_copy(const void *_mesg, void *_dest) /* check args */ assert(ginfo); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *ginfo; diff --git a/src/H5Oint.c b/src/H5Oint.c index 43044b4..a367ffc 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -233,7 +233,7 @@ H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_id /* Version bounds check */ if (version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "object header version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "object header version out of bounds"); /* Set the message version */ oh->version = version; @@ -275,12 +275,12 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc */ oh = H5O_create_ohdr(f, ocpl_id); if (NULL == oh) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header"); /* apply object header information to file */ if (H5O_apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file"); done: if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0)) @@ -314,30 +314,30 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id) /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file"); oh = H5FL_CALLOC(H5O_t); if (NULL == oh) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list"); /* Get any object header status flags set by properties */ if (H5P_DATASET_CREATE_DEFAULT == ocpl_id) { /* If the OCPL is the default DCPL, we can get the header flags from the * API context. Otherwise we have to call H5P_get */ if (H5CX_get_ohdr_flags(&oh_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags"); } else { if (H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags"); } if (H5O__set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header"); oh->flags = oh_flags; @@ -389,14 +389,14 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init if (0 < H5P_exist_plist(oc_plist, H5O_BAD_MESG_COUNT_NAME)) /* Get bad message count flag -- from property list */ if (H5P_get(oc_plist, H5O_BAD_MESG_COUNT_NAME, &oh->store_bad_mesg_count) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get bad message count flag"); #endif /* H5O_ENABLE_BAD_MESG_COUNT */ /* Create object header proxy if doing SWMR writes */ if (oh->swmr_write) { oh->proxy = H5AC_proxy_entry_create(); if (NULL == oh->proxy) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create object header proxy"); } else { oh->proxy = NULL; @@ -404,7 +404,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init oc_plist = (H5P_genplist_t *)H5I_object(ocpl_id); if (NULL == oc_plist) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list"); /* Initialize version-specific fields */ if (oh->version > H5O_VERSION_1) { @@ -420,9 +420,9 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* Get attribute storage phase change values -- from property list */ if (H5P_get(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes"); if (H5P_get(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes"); /* Check for non-default attribute storage phase change values */ if (H5O_CRT_ATTR_MAX_COMPACT_DEF != oh->max_compact || H5O_CRT_ATTR_MIN_DENSE_DEF != oh->min_dense) @@ -456,14 +456,14 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* Allocate disk space for header and first chunk */ oh_addr = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)oh_size); if (HADDR_UNDEF == oh_addr) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for object header"); /* Create the chunk list */ oh->nchunks = 1; oh->alloc_nchunks = 1; oh->chunk = H5FL_SEQ_MALLOC(H5O_chunk_t, (size_t)oh->alloc_nchunks); if (NULL == oh->chunk) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the first chunk */ oh->chunk[0].addr = oh_addr; @@ -474,7 +474,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init /* (including space for serializing the object header prefix */ oh->chunk[0].image = H5FL_BLK_CALLOC(chunk_image, oh_size); if (NULL == oh->chunk[0].image) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); oh->chunk[0].chunk_proxy = NULL; /* Put magic # for object header in first chunk */ @@ -486,7 +486,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init oh->alloc_nmesgs = H5O_NMESGS; oh->mesg = H5FL_SEQ_CALLOC(H5O_mesg_t, oh->alloc_nmesgs); if (NULL == oh->mesg) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize the initial "null" message; covers the entire first chunk */ oh->mesg[0].type = H5O_MSG_NULL; @@ -522,7 +522,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init loc_out->addr = oh_addr; if (H5O_open(loc_out) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -594,12 +594,12 @@ H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type) /* Find the object's location */ if (H5G_loc_find(loc, name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "object not found"); loc_found = TRUE; /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: if (NULL == ret_value) @@ -641,12 +641,12 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5 /* Find the object's location, according to the order in the index */ if (H5G_loc_find_by_idx(loc, name, idx_type, order, n, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "group not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "group not found"); loc_found = TRUE; /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: /* Release the object location if we failed after copying it */ @@ -690,7 +690,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type) /* Open the object */ if (NULL == (ret_value = H5O_open_by_loc(&obj_loc, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -718,12 +718,12 @@ H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object class"); /* Call the object class's 'open' routine */ 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -779,11 +779,11 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/) if (H5F_NOPEN_OBJS(loc->file) == H5F_NMOUNTS(loc->file)) /* Attempt to close down the file hierarchy */ if (H5F_try_close(loc->file, file_closed) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close"); /* Release location information */ if (H5O_loc_free(loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "problem attempting to free location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "problem attempting to free location"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -819,14 +819,14 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (adjust < 0) { /* Check for too large of an adjustment */ if ((unsigned)(-adjust) > oh->nlink) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, (-1), "link count would be negative") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, (-1), "link count would be negative"); /* Adjust the link count for the object header */ oh->nlink = (unsigned)((int)oh->nlink + adjust); /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty"); /* Check if the object should be deleted */ if (oh->nlink == 0) { @@ -834,7 +834,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5FO_opened(f, addr) != NULL) { /* Flag the object to be deleted when it's closed */ if (H5FO_mark(f, addr, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion"); } /* end if */ else { /* Mark the object header for deletion */ @@ -849,7 +849,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5FO_marked(f, addr)) { /* Remove "delete me" flag on the object */ if (H5FO_mark(f, addr, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "can't mark object for deletion"); } /* end if */ } /* end if */ @@ -858,7 +858,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, (-1), "unable to mark object header as dirty"); } /* end if */ /* Check for operations on refcount message */ @@ -868,7 +868,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) /* Check for removing refcount message */ if (oh->nlink <= 1) { if (H5O__msg_remove_real(f, oh, H5O_MSG_REFCOUNT, H5O_ALL, NULL, NULL, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "unable to delete refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, (-1), "unable to delete refcount message"); oh->has_refcount_msg = FALSE; } /* end if */ /* Update refcount message with new link count */ @@ -877,7 +877,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5O__msg_write_real(f, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, (-1), "unable to update refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, (-1), "unable to update refcount message"); } /* end else */ } /* end if */ else { @@ -887,7 +887,7 @@ H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) if (H5O__msg_append_real(f, oh, H5O_MSG_REFCOUNT, H5O_MSG_FLAG_DONTSHARE, 0, &refcount) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, (-1), "unable to create new refcount message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, (-1), "unable to create new refcount message"); oh->has_refcount_msg = TRUE; } /* end if */ } /* end else */ @@ -929,11 +929,11 @@ H5O_link(const H5O_loc_t *loc, int adjust) /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Call the "real" link routine */ if ((ret_value = H5O__link_oh(loc->file, adjust, oh, &deleted)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust object link count"); done: if (oh && H5O_unpin(oh) < 0) @@ -977,12 +977,12 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Check for valid address */ if (!H5_addr_defined(loc->addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "address undefined"); /* Check for write access on the file */ file_intent = H5F_INTENT(loc->file); if ((0 == (prot_flags & H5AC__READ_ONLY_FLAG)) && (0 == (file_intent & H5F_ACC_RDWR))) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no write intent on file"); /* Construct the user data for protect callback */ udata.made_attempt = FALSE; @@ -999,7 +999,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Lock the object header into the cache */ if (NULL == (oh = (H5O_t *)H5AC_protect(loc->file, H5AC_OHDR, loc->addr, &udata, prot_flags))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header"); /* Check if there are any continuation messages to process */ if (cont_msg_info.nmsgs > 0) { @@ -1039,7 +1039,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) if (NULL == (chk_proxy = (H5O_chunk_proxy_t *)H5AC_protect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, &chk_udata, prot_flags))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header chunk"); /* Sanity check */ assert(chk_proxy->oh == oh); @@ -1049,7 +1049,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Release the chunk from the cache */ if (H5AC_unprotect(loc->file, H5AC_OHDR_CHK, cont_msg_info.msgs[curr_msg].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header chunk"); /* Advance to next continuation message */ curr_msg++; @@ -1076,7 +1076,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Check for incorrect # of messages in v1 object header */ if (oh->version == H5O_VERSION_1 && (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages"); #endif /* H5_STRICT_FORMAT_CHECKS */ } /* end if */ @@ -1099,15 +1099,15 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(loc->file, oh, u))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header chunk"); /* Pin chunk proxy*/ if (H5AC_pin_protected_entry(chk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, NULL, "unable to pin object header chunk"); /* Unprotect chunk */ if (H5O__chunk_unprotect(loc->file, chk_proxy, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to unprotect object header chunk"); /* Preserve chunk proxy pointer for later */ oh->chunk[u].chunk_proxy = chk_proxy; @@ -1159,12 +1159,12 @@ H5O_pin(const H5O_loc_t *loc) /* Get header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header"); /* Increment the reference count on the object header */ /* (which will pin it, if appropriate) */ if (H5O__inc_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "unable to increment reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, NULL, "unable to increment reference count on object header"); /* Set the return value */ ret_value = oh; @@ -1201,7 +1201,7 @@ H5O_unpin(H5O_t *oh) /* Decrement the reference count on the object header */ /* (which will unpin it, if appropriate) */ if (H5O__dec_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1242,7 +1242,7 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags) if (NULL != oh->chunk[u].chunk_proxy) { /* Release chunk proxy */ if (H5AC_unpin_entry(oh->chunk[u].chunk_proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header chunk"); oh->chunk[u].chunk_proxy = NULL; } /* end if */ } /* end for */ @@ -1253,7 +1253,7 @@ H5O_unprotect(const H5O_loc_t *loc, H5O_t *oh, unsigned oh_flags) /* Unprotect the object header */ if (H5AC_unprotect(loc->file, H5AC_OHDR, oh->chunk[0].addr, oh, oh_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1308,7 +1308,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Allocate space for the modification time message */ if (H5O__msg_alloc(f, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now, &idx) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, - "unable to allocate space for modification time message") + "unable to allocate space for modification time message"); /* Set the message's flags if appropriate */ oh->mesg[idx].flags = (uint8_t)mesg_flags; @@ -1316,13 +1316,13 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, oh->mesg[idx].chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk"); /* Allocate 'native' space, if necessary */ if (NULL == oh->mesg[idx].native) { if (NULL == (oh->mesg[idx].native = H5FL_MALLOC(time_t))) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, - "memory allocation failed for modification time message") + "memory allocation failed for modification time message"); } /* end if */ /* Update the message */ @@ -1340,7 +1340,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); } /* end else */ } /* end if */ @@ -1378,11 +1378,11 @@ H5O_touch(const H5O_loc_t *loc, hbool_t force) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Create/Update the modification time message */ if (H5O_touch_oh(loc->file, oh, force) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modification time") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to update object modification time"); /* Mark object header as changed */ oh_flags |= H5AC__DIRTIED_FLAG; @@ -1428,7 +1428,7 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags) /* Allocate the native message in memory */ if (NULL == (bogus = H5MM_malloc(sizeof(H5O_bogus_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "memory allocation failed for 'bogus' message"); /* Update the native value */ bogus->u = H5O_BOGUS_VALUE; @@ -1438,11 +1438,11 @@ H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags) else if (bogus_id == H5O_BOGUS_INVALID_ID) type = H5O_MSG_BOGUS_INVALID; else - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "invalid ID for 'bogus' message") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "invalid ID for 'bogus' message"); /* Allocate space in the object header for bogus message */ if (H5O__msg_alloc(f, oh, type, &mesg_flags, bogus, &idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message"); /* Point to "bogus" information (take it over) */ oh->mesg[idx].native = bogus; @@ -1494,18 +1494,18 @@ H5O_delete(H5F_t *f, haddr_t addr) /* Get the object header information */ if (NULL == (oh = H5O_protect(&loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Delete object */ if (H5O__delete_oh(f, oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file"); /* Uncork cache entries with tag: addr */ if (H5AC_cork(f, addr, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status"); if (corked) if (H5AC_cork(f, addr, H5AC__UNCORK, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNCORK, FAIL, "unable to uncork an object"); /* Mark object header as deleted */ oh_flags = H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; @@ -1550,7 +1550,7 @@ H5O__delete_oh(H5F_t *f, H5O_t *oh) /* Free any space referred to in the file from this message */ if (H5O__delete_mesg(f, oh, curr_msg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, - "unable to delete file space for object header message") + "unable to delete file space for object header message"); } /* end for */ done: @@ -1577,11 +1577,11 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Retrieve the type of the object */ if (H5O__obj_type_real(oh, obj_type) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -1646,11 +1646,11 @@ H5O__obj_class(const H5O_loc_t *loc) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header"); /* Test whether entry qualifies as a particular type of object */ if (NULL == (ret_value = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -1686,13 +1686,13 @@ H5O__obj_class_real(const H5O_t *oh) htri_t isa; /* Is entry a particular type? */ if ((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type"); else if (isa) HGOTO_DONE(H5O_obj_class_g[i - 1]); } if (0 == i) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1718,21 +1718,21 @@ H5O_get_loc(hid_t object_id) switch (H5I_get_type(object_id)) { case H5I_GROUP: if (NULL == (ret_value = H5O_OBJ_GROUP->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from group ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from group ID"); break; case H5I_DATASET: if (NULL == (ret_value = H5O_OBJ_DATASET->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from dataset ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from dataset ID"); break; case H5I_DATATYPE: if (NULL == (ret_value = H5O_OBJ_DATATYPE->get_oloc(object_id))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from datatype ID"); break; case H5I_MAP: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -1750,7 +1750,7 @@ H5O_get_loc(hid_t object_id) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type"); } /* end switch */ done: @@ -1932,7 +1932,7 @@ H5O_loc_free(H5O_loc_t *loc) loc->holding_file = FALSE; if (H5F_NOPEN_OBJS(loc->file) <= 0) { if (H5F_try_close(loc->file, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") + HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file"); } } @@ -1967,11 +1967,11 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to load object header"); /* Get the information for the object header */ if (H5O__get_hdr_info_real(oh, hdr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2082,15 +2082,15 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Get class for object */ if (NULL == (obj_class = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class"); /* Reset the object info structure */ if (H5O__reset_info2(oinfo) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset object data struct"); /* Get basic information, if requested */ if (fields & H5O_INFO_BASIC) { @@ -2099,7 +2099,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Set the object's address into the token */ if (H5VL_native_addr_to_token(loc->file, H5I_FILE, loc->addr, &oinfo->token) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token"); /* Retrieve the type of the object */ oinfo->type = obj_class->type; @@ -2130,20 +2130,20 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Might be information for modification time */ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_ID)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME message"); if (exists > 0) { /* Get "old style" modification time info */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_ID, &oinfo->ctime)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME message"); } /* end if */ else { /* Check for "new style" modification time info */ if ((exists = H5O_msg_exists_oh(oh, H5O_MTIME_NEW_ID)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for MTIME_NEW message"); if (exists > 0) { /* Get "new style" modification time info */ if (NULL == H5O_msg_read_oh(loc->file, oh, H5O_MTIME_NEW_ID, &oinfo->ctime)) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't read MTIME_NEW message"); } /* end if */ else oinfo->ctime = 0; @@ -2154,7 +2154,7 @@ H5O_get_info(const H5O_loc_t *loc, H5O_info2_t *oinfo, unsigned fields) /* Retrieve # of attributes */ if (fields & H5O_INFO_NUM_ATTRS) if (H5O__attr_count_real(loc->file, oh, &oinfo->num_attrs) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute count"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2188,11 +2188,11 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Get class for object */ if (NULL == (obj_class = H5O__obj_class_real(oh))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine object class"); /* Reset the object info structure */ memset(oinfo, 0, sizeof(*oinfo)); @@ -2200,7 +2200,7 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie /* Get the information for the object header, if requested */ if (fields & H5O_NATIVE_INFO_HDR) if (H5O__get_hdr_info_real(oh, &oinfo->hdr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object header info"); /* Get B-tree & heap metadata storage size, if requested */ if (fields & H5O_NATIVE_INFO_META_SIZE) { @@ -2208,11 +2208,11 @@ H5O_get_native_info(const H5O_loc_t *loc, H5O_native_info_t *oinfo, unsigned fie if (obj_class->bh_info) /* Call the object's class 'bh_info' routine */ if ((obj_class->bh_info)(loc, oh, &oinfo->meta_size.obj) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object's btree & heap info"); /* Get B-tree & heap info for any attributes */ if (H5O__attr_bh_info(loc->file, oh, &oinfo->meta_size.attr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve attribute btree & heap info"); } /* end if */ done: @@ -2246,7 +2246,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Set property values, if they were used for the object */ if (oh->version > H5O_VERSION_1) { @@ -2255,9 +2255,9 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Set attribute storage values */ if (H5P_set(oc_plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &oh->max_compact) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, - "can't set max. # of compact attributes in property list") + "can't set max. # of compact attributes in property list"); if (H5P_set(oc_plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &oh->min_dense) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list"); /* Mask off non-"user visible" flags */ H5_CHECKED_ASSIGN(ohdr_flags, uint8_t, @@ -2267,7 +2267,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist) /* Set object header flags */ if (H5P_set(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags"); } /* end if */ done: @@ -2301,7 +2301,7 @@ H5O_get_nlinks(const H5O_loc_t *loc, hsize_t *nlinks) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Retrieve the # of link messages seen when the object header was loaded */ *nlinks = oh->link_msgs_seen; @@ -2344,7 +2344,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc /* Call the object class's 'create' routine */ 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object"); /* Break out of loop */ break; @@ -2450,7 +2450,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Set the object's reference count */ if (rc) @@ -2459,7 +2459,7 @@ H5O_get_rc_and_type(const H5O_loc_t *loc, unsigned *rc, H5O_type_t *otype) /* Retrieve the type of the object */ if (otype) if (H5O__obj_type_real(oh, otype) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -2526,7 +2526,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Find the object using the LAPL passed in */ /* (Correctly handles mounted files) */ if (H5G_loc_find(udata->start_loc, name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, H5_ITER_ERROR, "object not found"); obj_found = TRUE; /* Construct unique "position" for this object */ @@ -2539,7 +2539,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Get the object's info */ if (H5O_get_info(&obj_oloc, &oinfo, udata->fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info"); /* Make the application callback */ ret_value = (udata->op)(udata->obj_id, name, &oinfo, udata->op_data); @@ -2553,7 +2553,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Allocate new object "position" node */ if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node"); /* Set node information */ *new_node = obj_pos; @@ -2561,7 +2561,7 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info2_t *l /* Add to list of visited objects */ if (H5SL_insert(udata->visited, new_node, new_node) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, H5_ITER_ERROR, - "can't insert object node into visited list") + "can't insert object node into visited list"); } /* end if */ } /* end if */ } /* end if */ @@ -2636,25 +2636,25 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Find the object's location */ if (H5G_loc_find(loc, obj_name, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); loc_found = TRUE; /* Get the object's info */ if (H5O_get_info(&obj_oloc, &oinfo, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get object info"); /* Open the object */ /* (Takes ownership of the obj_loc information) */ if (NULL == (obj = H5O_open_by_loc(&obj_loc, &opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object"); /* Get an ID for the visited object */ if ((obj_id = H5VL_wrap_register(opened_type, obj, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register visited object"); /* Make callback for starting object */ if ((ret_value = op(obj_id, ".", &oinfo, op_data)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects"); /* Check return value of first callback */ if (ret_value != H5_ITER_CONT) @@ -2667,7 +2667,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Get the location of the starting group */ if (H5G_loc(obj_id, &start_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Set up user data for visiting links */ udata.obj_id = obj_id; @@ -2678,7 +2678,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Create skip list to store visited object information */ if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects"); /* If its ref count is > 1, we add it to the list of visited objects */ /* (because it could come up again during traversal) */ @@ -2687,7 +2687,7 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* Allocate new object "position" node */ if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "can't allocate object node") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "can't allocate object node"); /* Construct unique "position" for this object */ obj_pos->fileno = oinfo.fileno; @@ -2695,20 +2695,20 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_or /* De-serialize object token into an object address */ if (H5VL_native_token_to_addr(loc->oloc->file, H5I_FILE, oinfo.token, &(obj_pos->addr)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Add to list of visited objects */ if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object node into visited list") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert object node into visited list"); } /* Get the location of the visited group */ if (H5G_loc(obj_id, &vis_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Call internal group visitation routine */ if ((ret_value = H5G_visit(&vis_loc, ".", idx_type, order, H5O__visit_cb, &udata)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); } /* end if */ done: @@ -2748,7 +2748,7 @@ H5O__inc_rc(H5O_t *oh) /* Pin the object header when the reference count goes above 0 */ if (oh->rc == 0) if (H5AC_pin_protected_entry(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Increment reference count */ oh->rc++; @@ -2775,7 +2775,7 @@ H5O__dec_rc(H5O_t *oh) /* check args */ if (!oh) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header"); /* Decrement reference count */ oh->rc--; @@ -2783,7 +2783,7 @@ H5O__dec_rc(H5O_t *oh) /* Unpin the object header when the reference count goes back to 0 */ if (oh->rc == 0) if (H5AC_unpin_entry(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2812,12 +2812,12 @@ H5O_dec_rc_by_loc(const H5O_loc_t *loc) /* Get header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Decrement the reference count on the object header */ /* (which will unpin it, if appropriate) */ if (H5O__dec_rc(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement reference count on object header"); done: /* Release the object header from the cache */ @@ -2902,7 +2902,7 @@ H5O__free(H5O_t *oh, hbool_t H5_ATTR_NDEBUG_UNUSED force) /* Destroy the proxy */ if (oh->proxy) if (H5AC_proxy_entry_dest(oh->proxy) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy virtual entry used for proxy") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to destroy virtual entry used for proxy"); /* destroy object header */ oh = H5FL_FREE(H5O_t, oh); diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 5b741f6..4ee2f82 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -95,47 +95,47 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU assert(p); if (NULL == (mesg = H5FL_CALLOC(H5O_layout_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed"); mesg->storage.type = H5D_LAYOUT_ERROR; if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); mesg->version = *p++; if (mesg->version < H5O_LAYOUT_VERSION_1 || mesg->version > H5O_LAYOUT_VERSION_4) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad version number for layout message") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad version number for layout message"); if (mesg->version < H5O_LAYOUT_VERSION_3) { unsigned ndims; /* Num dimensions in chunk */ /* Dimensionality */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); ndims = *p++; if (!ndims || ndims > H5O_LAYOUT_NDIMS) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is out of range") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is out of range"); /* Layout class */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); mesg->type = (H5D_layout_t)*p++; if (H5D_CONTIGUOUS != mesg->type && H5D_CHUNKED != mesg->type && H5D_COMPACT != mesg->type) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad layout type for layout message") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad layout type for layout message"); /* Set the storage type */ mesg->storage.type = mesg->type; /* Reserved bytes */ if (H5_IS_BUFFER_OVERFLOW(p, 5, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p += 5; /* Address */ if (mesg->type == H5D_CONTIGUOUS) { if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.contig.addr)); /* Set the layout operations */ @@ -143,7 +143,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU } else if (mesg->type == H5D_CHUNKED) { if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr)); /* Set the layout operations */ @@ -160,7 +160,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU mesg->ops = H5D_LOPS_COMPACT; } else - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid layout type") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid layout type"); /* Read the size */ if (mesg->type != H5D_CHUNKED) { @@ -171,16 +171,16 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU * information available also. */ if (H5_IS_BUFFER_OVERFLOW(p, (ndims * 4), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p += ndims * sizeof(uint32_t); /* Skip over dimension sizes */ } else { if (ndims < 2) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad dimensions for chunked storage") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad dimensions for chunked storage"); mesg->u.chunk.ndims = ndims; if (H5_IS_BUFFER_OVERFLOW(p, (ndims * 4), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); for (unsigned u = 0; u < ndims; u++) { UINT32DECODE(p, mesg->u.chunk.dim[u]); @@ -190,7 +190,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad chunk dimension value when parsing layout message - chunk dimension " "must be positive: mesg->u.chunk.dim[%u] = %u", - u, mesg->u.chunk.dim[u]) + u, mesg->u.chunk.dim[u]); } /* Compute chunk size */ @@ -201,17 +201,17 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (mesg->type == H5D_COMPACT) { if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT32DECODE(p, mesg->storage.u.compact.size); if (mesg->storage.u.compact.size > 0) { /* Ensure that size doesn't exceed buffer size, due to possible data corruption */ if (H5_IS_BUFFER_OVERFLOW(p, mesg->storage.u.compact.size, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, - "memory allocation failed for compact data buffer") + "memory allocation failed for compact data buffer"); H5MM_memcpy(mesg->storage.u.compact.buf, p, mesg->storage.u.compact.size); p += mesg->storage.u.compact.size; } @@ -220,7 +220,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU else { /* Layout & storage class */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); mesg->type = mesg->storage.type = (H5D_layout_t)*p++; /* Interpret the rest of the message according to the layout class */ @@ -228,19 +228,19 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_COMPACT: /* Compact data size */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, mesg->storage.u.compact.size); if (mesg->storage.u.compact.size > 0) { /* Ensure that size doesn't exceed buffer size, due to possible data corruption */ if (H5_IS_BUFFER_OVERFLOW(p, mesg->storage.u.compact.size, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); /* Allocate space for compact data */ if (NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size))) HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, - "memory allocation failed for compact data buffer") + "memory allocation failed for compact data buffer"); /* Compact data */ H5MM_memcpy(mesg->storage.u.compact.buf, p, mesg->storage.u.compact.size); @@ -254,12 +254,12 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_CONTIGUOUS: /* Contiguous storage address */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.contig.addr)); /* Contiguous storage size */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_DECODE_LENGTH(f, p, mesg->storage.u.contig.size); /* Set the layout operations */ @@ -274,23 +274,23 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Dimensionality */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.ndims = *p++; if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is too large") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is too large"); if (mesg->u.chunk.ndims < 2) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad dimensions for chunked storage") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad dimensions for chunked storage"); /* B-tree address */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr)); if (H5_IS_BUFFER_OVERFLOW(p, (mesg->u.chunk.ndims * 4), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); /* Chunk dimensions */ for (unsigned u = 0; u < mesg->u.chunk.ndims; u++) { @@ -302,7 +302,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad chunk dimension value when parsing layout message - chunk " "dimension must be positive: mesg->u.chunk.dim[%u] = %u", - u, mesg->u.chunk.dim[u]) + u, mesg->u.chunk.dim[u]); } /* Compute chunk size */ @@ -320,7 +320,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Get the chunked layout flags */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.flags = *p++; /* Check for valid flags */ @@ -328,30 +328,31 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU * until features are added for the flags) */ if (mesg->u.chunk.flags & ~H5O_LAYOUT_ALL_CHUNK_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad flag value for message") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad flag value for message"); /* Dimensionality */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.ndims = *p++; if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is too large") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "dimensionality is too large"); /* Encoded # of bytes for each chunk dimension */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.enc_bytes_per_dim = *p++; if (mesg->u.chunk.enc_bytes_per_dim == 0 || mesg->u.chunk.enc_bytes_per_dim > 8) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "encoded chunk dimension size is too large") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, + "encoded chunk dimension size is too large"); if (H5_IS_BUFFER_OVERFLOW(p, (mesg->u.chunk.ndims * mesg->u.chunk.enc_bytes_per_dim), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); /* Chunk dimensions */ for (unsigned u = 0; u < mesg->u.chunk.ndims; u++) { @@ -362,7 +363,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad chunk dimension value when parsing layout message - chunk " "dimension must be positive: mesg->u.chunk.dim[%u] = %u", - u, mesg->u.chunk.dim[u]) + u, mesg->u.chunk.dim[u]); } /* Compute chunk size */ @@ -373,17 +374,17 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Chunk index type */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.idx_type = (H5D_chunk_index_t)*p++; if (mesg->u.chunk.idx_type >= H5D_CHUNK_IDX_NTYPES) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "unknown chunk index type") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "unknown chunk index type"); mesg->storage.u.chunk.idx_type = mesg->u.chunk.idx_type; switch (mesg->u.chunk.idx_type) { case H5D_CHUNK_IDX_BTREE: HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "v1 B-tree index type should never be in a v4 layout message") + "v1 B-tree index type should never be in a v4 layout message"); break; case H5D_CHUNK_IDX_NONE: /* Implicit Index */ @@ -394,7 +395,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) { if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f) + 4, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); H5F_DECODE_LENGTH(f, p, mesg->storage.u.chunk.u.single.nbytes); UINT32DECODE(p, mesg->storage.u.chunk.u.single.filter_mask); } @@ -407,12 +408,12 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Fixed array creation parameters */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.farray.cparam.max_dblk_page_nelmts_bits = *p++; if (0 == mesg->u.chunk.u.farray.cparam.max_dblk_page_nelmts_bits) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid fixed array creation parameter") + "invalid fixed array creation parameter"); /* Set the chunk operations */ mesg->storage.u.chunk.ops = H5D_COPS_FARRAY; @@ -422,48 +423,48 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Extensible array creation parameters */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.earray.cparam.max_nelmts_bits = *p++; if (0 == mesg->u.chunk.u.earray.cparam.max_nelmts_bits) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid extensible array creation parameter") + "invalid extensible array creation parameter"); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.earray.cparam.idx_blk_elmts = *p++; if (0 == mesg->u.chunk.u.earray.cparam.idx_blk_elmts) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid extensible array creation parameter") + "invalid extensible array creation parameter"); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.earray.cparam.sup_blk_min_data_ptrs = *p++; if (0 == mesg->u.chunk.u.earray.cparam.sup_blk_min_data_ptrs) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid extensible array creation parameter") + "invalid extensible array creation parameter"); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.earray.cparam.data_blk_min_elmts = *p++; if (0 == mesg->u.chunk.u.earray.cparam.data_blk_min_elmts) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid extensible array creation parameter") + "invalid extensible array creation parameter"); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.earray.cparam.max_dblk_page_nelmts_bits = *p++; if (0 == mesg->u.chunk.u.earray.cparam.max_dblk_page_nelmts_bits) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "invalid extensible array creation parameter") + "invalid extensible array creation parameter"); /* Set the chunk operations */ mesg->storage.u.chunk.ops = H5D_COPS_EARRAY; @@ -472,12 +473,12 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_CHUNK_IDX_BT2: /* v2 B-tree index */ if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); UINT32DECODE(p, mesg->u.chunk.u.btree2.cparam.node_size); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.btree2.cparam.split_percent = *p++; if (mesg->u.chunk.u.btree2.cparam.split_percent == 0 || @@ -485,11 +486,11 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad value for v2 B-tree split percent value - must be > 0 and " "<= 100: split percent = %" PRIu8, - mesg->u.chunk.u.btree2.cparam.split_percent) + mesg->u.chunk.u.btree2.cparam.split_percent); if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); mesg->u.chunk.u.btree2.cparam.merge_percent = *p++; if (mesg->u.chunk.u.btree2.cparam.merge_percent == 0 || @@ -497,7 +498,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "bad value for v2 B-tree merge percent value - must be > 0 and " "<= 100: merge percent = %" PRIu8, - mesg->u.chunk.u.btree2.cparam.merge_percent) + mesg->u.chunk.u.btree2.cparam.merge_percent); /* Set the chunk operations */ mesg->storage.u.chunk.ops = H5D_COPS_BT2; @@ -505,13 +506,13 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_CHUNK_IDX_NTYPES: default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "Invalid chunk index type") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "Invalid chunk index type"); } /* Chunk index address */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr)); } @@ -522,16 +523,16 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_VIRTUAL: /* Check version */ if (mesg->version < H5O_LAYOUT_VERSION_4) - HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "invalid layout version with virtual layout") + HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "invalid layout version with virtual layout"); /* Heap information */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(mesg->storage.u.virt.serial_list_hobjid.addr)); /* NOTE: virtual mapping global heap entry address could be undefined */ if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT32DECODE(p, mesg->storage.u.virt.serial_list_hobjid.idx); /* Initialize other fields */ @@ -558,7 +559,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Read heap */ if (NULL == (heap_block = (uint8_t *)H5HG_read( f, &(mesg->storage.u.virt.serial_list_hobjid), NULL, &block_size))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "Unable to read global heap block") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "Unable to read global heap block"); heap_block_p = (const uint8_t *)heap_block; heap_block_p_end = heap_block_p + block_size - 1; @@ -566,24 +567,24 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Decode the version number of the heap block encoding */ if (H5_IS_BUFFER_OVERFLOW(heap_block_p, 1, heap_block_p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); heap_vers = (uint8_t)*heap_block_p++; if ((uint8_t)H5O_LAYOUT_VDS_GH_ENC_VERS != heap_vers) HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "bad version # of encoded VDS heap information, expected %u, got %u", - (unsigned)H5O_LAYOUT_VDS_GH_ENC_VERS, (unsigned)heap_vers) + (unsigned)H5O_LAYOUT_VDS_GH_ENC_VERS, (unsigned)heap_vers); /* Number of entries */ if (H5_IS_BUFFER_OVERFLOW(heap_block_p, H5F_sizeof_size(f), heap_block_p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize); /* Allocate entry list */ if (NULL == (mesg->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc( (size_t)tmp_hsize * sizeof(H5O_storage_virtual_ent_t)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "unable to allocate heap block") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "unable to allocate heap block"); mesg->storage.u.virt.list_nalloc = (size_t)tmp_hsize; mesg->storage.u.virt.list_nused = (size_t)tmp_hsize; @@ -594,42 +595,42 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU avail_buffer_space = heap_block_p_end - heap_block_p + 1; if (avail_buffer_space <= 0) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); /* Source file name */ tmp_size = HDstrnlen((const char *)heap_block_p, (size_t)avail_buffer_space); if (tmp_size == (size_t)avail_buffer_space) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding - unterminated source " - "file name string") + "file name string"); else tmp_size += 1; /* Add space for NUL terminator */ if (NULL == (mesg->storage.u.virt.list[i].source_file_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, - "unable to allocate memory for source file name") + "unable to allocate memory for source file name"); H5MM_memcpy(mesg->storage.u.virt.list[i].source_file_name, heap_block_p, tmp_size); heap_block_p += tmp_size; avail_buffer_space = heap_block_p_end - heap_block_p + 1; if (avail_buffer_space <= 0) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); /* Source dataset name */ tmp_size = HDstrnlen((const char *)heap_block_p, (size_t)avail_buffer_space); if (tmp_size == (size_t)avail_buffer_space) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding - unterminated source " - "dataset name string") + "dataset name string"); else tmp_size += 1; /* Add space for NUL terminator */ if (NULL == (mesg->storage.u.virt.list[i].source_dset_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, - "unable to allocate memory for source dataset name") + "unable to allocate memory for source dataset name"); H5MM_memcpy(mesg->storage.u.virt.list[i].source_dset_name, heap_block_p, tmp_size); heap_block_p += tmp_size; @@ -638,11 +639,12 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (avail_buffer_space <= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, NULL, - "buffer overflow while decoding layout") + "buffer overflow while decoding layout"); if (H5S_SELECT_DESERIALIZE(&mesg->storage.u.virt.list[i].source_select, &heap_block_p, (size_t)(avail_buffer_space)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode source space selection") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, + "can't decode source space selection"); /* Virtual selection */ @@ -651,12 +653,12 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (avail_buffer_space <= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, NULL, - "buffer overflow while decoding layout") + "buffer overflow while decoding layout"); if (H5S_SELECT_DESERIALIZE(&mesg->storage.u.virt.list[i].source_dset.virtual_select, &heap_block_p, (size_t)(avail_buffer_space)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, - "can't decode virtual space selection") + "can't decode virtual space selection"); /* Parse source file and dataset names for "printf" * style format specifiers */ @@ -665,13 +667,13 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU &mesg->storage.u.virt.list[i].parsed_source_file_name, &mesg->storage.u.virt.list[i].psfn_static_strlen, &mesg->storage.u.virt.list[i].psfn_nsubs) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source file name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source file name"); if (H5D_virtual_parse_source_name( mesg->storage.u.virt.list[i].source_dset_name, &mesg->storage.u.virt.list[i].parsed_source_dset_name, &mesg->storage.u.virt.list[i].psdn_static_strlen, &mesg->storage.u.virt.list[i].psdn_nsubs) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source dataset name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't parse source dataset name"); /* Set source names in source_dset struct */ if ((mesg->storage.u.virt.list[i].psfn_nsubs == 0) && @@ -714,20 +716,20 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (H5D_virtual_check_mapping_pre( mesg->storage.u.virt.list[i].source_dset.virtual_select, mesg->storage.u.virt.list[i].source_select, H5O_VIRTUAL_STATUS_INVALID) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid mapping selections") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid mapping selections"); if (H5D_virtual_check_mapping_post(&mesg->storage.u.virt.list[i]) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid mapping entry") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid mapping entry"); /* Update min_dims */ if (H5D_virtual_update_min_dims(mesg, i) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, - "unable to update virtual dataset minimum dimensions") + "unable to update virtual dataset minimum dimensions"); } /* Read stored checksum */ if (H5_IS_BUFFER_OVERFLOW(heap_block_p, 4, heap_block_p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); UINT32DECODE(heap_block_p, stored_chksum); /* Compute checksum */ @@ -736,11 +738,11 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU /* Verify checksum */ if (stored_chksum != computed_chksum) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, - "incorrect metadata checksum for global heap block") + "incorrect metadata checksum for global heap block"); /* Verify that the heap block size is correct */ if ((size_t)(heap_block_p - heap_block) != block_size) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect heap block size") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "incorrect heap block size"); } /* end if */ /* Set the layout operations */ @@ -751,7 +753,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "Invalid layout class") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "Invalid layout class"); } } @@ -863,7 +865,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, switch (mesg->u.chunk.idx_type) { case H5D_CHUNK_IDX_BTREE: HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "v1 B-tree index type should never be in a v4 layout message") + "v1 B-tree index type should never be in a v4 layout message"); break; case H5D_CHUNK_IDX_NONE: /* Implicit */ @@ -899,7 +901,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, case H5D_CHUNK_IDX_NTYPES: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid chunk index type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid chunk index type"); } /* end switch */ /* @@ -920,7 +922,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid layout class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid layout class"); } /* end switch */ done: @@ -953,7 +955,7 @@ H5O__layout_copy(const void *_mesg, void *_dest) /* Allocate destination message, if necessary */ if (!dest && NULL == (dest = H5FL_MALLOC(H5O_layout_t))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "layout message allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL, "layout message allocation failed"); /* copy */ *dest = *mesg; @@ -968,7 +970,7 @@ H5O__layout_copy(const void *_mesg, void *_dest) /* Allocate memory for the raw data */ if (NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset"); /* Copy over the raw data */ H5MM_memcpy(dest->storage.u.compact.buf, mesg->storage.u.compact.buf, @@ -990,13 +992,13 @@ H5O__layout_copy(const void *_mesg, void *_dest) case H5D_VIRTUAL: if (H5D__virtual_copy_layout(dest) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, NULL, "Invalid layout class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, NULL, "Invalid layout class"); } /* end switch */ /* Set return value */ @@ -1067,7 +1069,7 @@ H5O__layout_reset(void *_mesg) else if (H5D_VIRTUAL == mesg->type) /* Free the virtual entry list */ if (H5D__virtual_reset_layout(mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to reset virtual layout") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to reset virtual layout"); /* Reset the message */ mesg->type = H5D_CONTIGUOUS; @@ -1135,25 +1137,25 @@ H5O__layout_delete(H5F_t *f, H5O_t *open_oh, void *_mesg) case H5D_CONTIGUOUS: /* Contiguous block on disk */ /* Free the file space for the raw data */ if (H5D__contig_delete(f, &mesg->storage) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data"); break; case H5D_CHUNKED: /* Chunked blocks on disk */ /* Free the file space for the index & chunk raw data */ if (H5D__chunk_delete(f, open_oh, &mesg->storage) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data"); break; case H5D_VIRTUAL: /* Virtual dataset */ /* Free the file space virtual dataset */ if (H5D__virtual_delete(f, &mesg->storage) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "not valid storage type") + HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "not valid storage type"); } /* end switch */ done: @@ -1188,7 +1190,7 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, /* 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 */ if (layout_src->version > H5O_layout_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "layout message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "layout message version out of bounds"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1225,7 +1227,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, /* Copy the layout information */ if (NULL == (layout_dst = (H5O_layout_t *)H5O__layout_copy(layout_src, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy layout") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy layout"); /* Copy the layout type specific information */ switch (layout_src->type) { @@ -1234,7 +1236,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, /* copy compact raw data */ if (H5D__compact_copy(file_src, &layout_src->storage.u.compact, file_dst, &layout_dst->storage.u.compact, udata->src_dtype, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage"); copied = TRUE; } /* end if */ break; @@ -1254,7 +1256,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, /* copy contiguous raw data */ if (H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst, &layout_dst->storage.u.contig, udata->src_dtype, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage"); copied = TRUE; } /* end if */ break; @@ -1267,7 +1269,7 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, if (H5D__chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst, &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype, udata->common.src_pline, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage"); copied = TRUE; } /* end if */ break; @@ -1276,13 +1278,13 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, /* Copy virtual layout. Always copy so the memory fields get copied * properly. */ if (H5D__virtual_copy(file_dst, layout_dst) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual storage"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class"); } /* end switch */ /* Check if copy routine was invoked (which frees the source datatype) */ diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index 36f664a..507f39c 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -114,20 +114,20 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS /* Check input buffer before decoding version and index flags */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); /* Version of message */ if (*p++ != H5O_LINFO_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (linfo = H5FL_MALLOC(H5O_linfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get the index flags for the group */ index_flags = *p++; if (index_flags & ~H5O_LINFO_ALL_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message"); linfo->track_corder = (index_flags & H5O_LINFO_TRACK_CORDER) ? TRUE : FALSE; linfo->index_corder = (index_flags & H5O_LINFO_INDEX_CORDER) ? TRUE : FALSE; @@ -137,7 +137,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS /* Max. link creation order value for the group, if tracked */ if (linfo->track_corder) { if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); INT64DECODE(p, linfo->max_corder); } else @@ -145,7 +145,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS /* Check input buffer before decoding the next two addresses */ if (H5_IS_BUFFER_OVERFLOW(p, addr_size + addr_size, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); /* Address of fractal heap to store "dense" links */ H5F_addr_decode(f, &p, &(linfo->fheap_addr)); @@ -156,7 +156,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS /* Address of v2 B-tree to index creation order of links, if there is one */ if (linfo->index_corder) { if (H5_IS_BUFFER_OVERFLOW(p, addr_size, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(linfo->corder_bt2_addr)); } else @@ -245,7 +245,7 @@ H5O__linfo_copy(const void *_mesg, void *_dest) /* check args */ assert(linfo); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_linfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *linfo; @@ -335,7 +335,7 @@ H5O__linfo_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg) /* If the group is using "dense" link storage, delete it */ if (H5_addr_defined(linfo->fheap_addr)) if (H5G__dense_delete(f, linfo, TRUE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense link storage") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense link storage"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -370,7 +370,7 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi /* Copy the source message */ if (NULL == (linfo_dst = (H5O_linfo_t *)H5O__linfo_copy(linfo_src, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "memory allocation failed"); /* If we are performing a 'shallow hierarchy' copy, and the links in this * group won't be included in the destination, reset the link info for @@ -391,7 +391,7 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi if (H5_addr_defined(linfo_src->fheap_addr)) { /* Create the dense link storage */ if (H5G__dense_create(file_dst, linfo_dst, udata->common.src_pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create 'dense' form of new format group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create 'dense' form of new format group"); } /* end if */ } /* end else */ @@ -433,7 +433,7 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy link") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy link"); dst_lnk_init = TRUE; /* Set metadata tag in API context */ @@ -499,7 +499,7 @@ H5O__linfo_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_l /* Iterate over the links in the group, building a table of the link messages */ if (H5G__dense_iterate(src_oloc->file, linfo_src, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5O__linfo_post_copy_file_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links"); } /* end if */ done: diff --git a/src/H5Olink.c b/src/H5Olink.c index 4fa70c1..88611ec 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -118,29 +118,29 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE 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") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_LINK_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (lnk = H5FL_CALLOC(H5O_link_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get the encoding flags for the link */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); link_flags = *p++; if (link_flags & ~H5O_LINK_ALL_FLAGS) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message"); /* Check for non-default link type */ if (link_flags & H5O_LINK_STORE_LINK_TYPE) { /* Get the type of the link */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); lnk->type = (H5L_type_t)*p++; if (lnk->type < H5L_TYPE_HARD || lnk->type > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad link type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad link type"); } else lnk->type = H5L_TYPE_HARD; @@ -148,7 +148,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE /* Get the link creation time from the file */ if (link_flags & H5O_LINK_STORE_CORDER) { if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); INT64DECODE(p, lnk->corder); lnk->corder_valid = TRUE; } @@ -161,10 +161,10 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE if (link_flags & H5O_LINK_STORE_NAME_CSET) { /* Get the link name's character set */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); lnk->cset = (H5T_cset_t)*p++; if (lnk->cset < H5T_CSET_ASCII || lnk->cset > H5T_CSET_UTF8) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad cset type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad cset type"); } else lnk->cset = H5T_CSET_ASCII; @@ -173,39 +173,39 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE switch (link_flags & H5O_LINK_NAME_SIZE) { case 0: /* 1 byte size */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); len = *p++; break; case 1: /* 2 byte size */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, len); break; case 2: /* 4 byte size */ if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT32DECODE(p, len); break; case 3: /* 8 byte size */ if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT64DECODE(p, len); break; default: - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no appropriate size for name length") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "no appropriate size for name length"); } if (len == 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid name length") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid name length"); /* Get the link's name */ if (H5_IS_BUFFER_OVERFLOW(p, len, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (lnk->name = (char *)H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(lnk->name, p, len); lnk->name[len] = '\0'; p += len; @@ -215,22 +215,22 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE case H5L_TYPE_HARD: /* Get the address of the object the link points to */ if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); H5F_addr_decode(f, &p, &(lnk->u.hard.addr)); break; case H5L_TYPE_SOFT: /* Get the link value */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, len); if (len == 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length"); if (H5_IS_BUFFER_OVERFLOW(p, len, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (lnk->u.soft.name = (char *)H5MM_malloc((size_t)len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(lnk->u.soft.name, p, len); lnk->u.soft.name[len] = '\0'; p += len; @@ -242,20 +242,20 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE case H5L_TYPE_MAX: default: if (lnk->type < H5L_TYPE_UD_MIN || lnk->type > H5L_TYPE_MAX) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown link type") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unknown link type"); /* A UD link. Get the user-supplied data */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, len); if (lnk->type == H5L_TYPE_EXTERNAL && len < 3) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "external link information length < 3") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "external link information length < 3"); lnk->u.ud.size = len; if (len > 0) { if (H5_IS_BUFFER_OVERFLOW(p, len, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (lnk->u.ud.udata = H5MM_malloc((size_t)len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(lnk->u.ud.udata, p, len); p += len; } @@ -421,7 +421,7 @@ H5O__link_copy(const void *_mesg, void *_dest) /* Check args */ assert(lnk); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_link_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy static information */ *dest = *lnk; @@ -429,17 +429,17 @@ H5O__link_copy(const void *_mesg, void *_dest) /* Duplicate the link's name */ assert(lnk->name); if (NULL == (dest->name = H5MM_xstrdup(lnk->name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate link name") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate link name"); /* Copy other information needed for different link types */ if (lnk->type == H5L_TYPE_SOFT) { if (NULL == (dest->u.soft.name = H5MM_xstrdup(lnk->u.soft.name))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate soft link value") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't duplicate soft link value"); } /* end if */ else if (lnk->type >= H5L_TYPE_UD_MIN) { if (lnk->u.ud.size > 0) { if (NULL == (dest->u.ud.udata = H5MM_malloc(lnk->u.ud.size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(dest->u.ud.udata, lnk->u.ud.udata, lnk->u.ud.size); } /* end if */ } /* end if */ @@ -620,7 +620,7 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg) /* Decrement the ref count for the object */ if (H5O_link(&oloc, -1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to decrement object link count") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to decrement object link count"); } /* end if */ /* Perform the "delete" callback when a user-defined link is removed */ else if (lnk->type >= H5L_TYPE_UD_MIN) { @@ -628,17 +628,17 @@ H5O_link_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg) /* Get the link class for this type of link. */ if (NULL == (link_class = H5L_find_class(lnk->type))) - HGOTO_ERROR(H5E_OHDR, H5E_NOTREGISTERED, FAIL, "link class not registered") + HGOTO_ERROR(H5E_OHDR, H5E_NOTREGISTERED, FAIL, "link class not registered"); /* Check for delete callback */ if (link_class->del_func) { /* Get a file ID for the file the link is in */ if ((file_id = H5F_get_id(f)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get file ID") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to get file ID"); /* Call user-defined link's 'delete' callback */ if ((link_class->del_func)(lnk->name, file_id, lnk->u.ud.udata, lnk->u.ud.size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "link deletion callback returned failure") + HGOTO_ERROR(H5E_OHDR, H5E_CALLBACK, FAIL, "link deletion callback returned failure"); } /* end if */ } /* end if */ @@ -711,12 +711,12 @@ H5O__link_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t H5_A /* Sanity check source link type */ if (link_src->type > H5L_TYPE_SOFT && link_src->type < H5L_TYPE_UD_MIN) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "unrecognized built-in link type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, NULL, "unrecognized built-in link type"); /* Allocate "blank" link for destination */ /* (values will be filled in during 'post copy' operation) */ if (NULL == (ret_value = H5FL_CALLOC(H5O_link_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -752,7 +752,7 @@ H5O__link_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo /* 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) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy link") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -828,7 +828,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in } /* end else */ } /* end if */ else - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unrecognized link type"); break; } /* end switch */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 1c68c22..d76409d 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -108,11 +108,11 @@ H5O_msg_create(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsi /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Go append message to object header */ if (H5O_msg_append_oh(loc->file, oh, type_id, mesg_flags, update_flags, mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to append to object header") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to append to object header"); done: if (oh && H5O_unpin(oh) < 0) @@ -155,7 +155,7 @@ H5O_msg_append_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, un /* Append new message to object header */ if (H5O__msg_append_real(f, oh, type, mesg_flags, update_flags, mesg) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new message in header") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to create new message in header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -190,11 +190,11 @@ H5O__msg_append_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned /* Allocate space for a new message */ if (H5O__msg_alloc(f, oh, type, &mesg_flags, mesg, &idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create new message") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create new message"); /* Copy the information for the message */ if (H5O__copy_mesg(f, oh, idx, type, mesg, mesg_flags, update_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to write message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to write message"); #ifdef H5O_DEBUG H5O__assert(oh); #endif /* H5O_DEBUG */ @@ -241,11 +241,11 @@ H5O_msg_write(const H5O_loc_t *loc, unsigned type_id, unsigned mesg_flags, unsig /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Call the "real" modify routine */ if (H5O__msg_write_real(loc->file, oh, type, mesg_flags, update_flags, mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message"); done: if (oh && H5O_unpin(oh) < 0) @@ -290,7 +290,7 @@ H5O_msg_write_oh(H5F_t *f, H5O_t *oh, unsigned type_id, unsigned mesg_flags, uns /* Call the "real" modify routine */ if (H5O__msg_write_real(f, oh, type, mesg_flags, update_flags, mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to write object header message"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -335,11 +335,11 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m if (type == idx_msg->type) break; if (idx == oh->nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found"); /* Check for modifying a constant message */ if (!(update_flags & H5O_UPDATE_FORCE) && (idx_msg->flags & H5O_MSG_FLAG_CONSTANT)) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to modify constant message") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to modify constant message"); /* This message is shared, but it's being modified. */ else if ((idx_msg->flags & H5O_MSG_FLAG_SHARED) || (idx_msg->flags & H5O_MSG_FLAG_SHAREABLE)) { htri_t status; /* Status of "try share" call */ @@ -363,7 +363,7 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m * header to the SOHM heap), so just delete it first -QAK) */ if (H5SM_delete(f, oh, (H5O_shared_t *)idx_msg->native) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete message from SOHM index") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete message from SOHM index"); /* If we're replacing a shared message, the new message must be shared * (or else it may increase in size!), so pass in NULL for the OH @@ -374,14 +374,14 @@ H5O__msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned m */ if ((status = H5SM_try_share(f, ((mesg_flags & H5O_MSG_FLAG_SHARED) ? NULL : oh), 0, idx_msg->type->id, mesg, &mesg_flags)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message"); if (status == FALSE && (mesg_flags & H5O_MSG_FLAG_SHARED)) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "message changed sharing status"); } /* end if */ /* Copy the information for the message */ if (H5O__copy_mesg(f, oh, idx, type, mesg, mesg_flags, update_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to write message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to write message"); #ifdef H5O_DEBUG H5O__assert(oh); #endif /* H5O_DEBUG */ @@ -425,11 +425,11 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to protect object header"); /* Call the "real" read routine */ if (NULL == (ret_value = H5O_msg_read_oh(loc->file, oh, type_id, mesg))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header message"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -478,7 +478,7 @@ H5O_msg_read_oh(H5F_t *f, H5O_t *oh, unsigned type_id, void *mesg) if (type == oh->mesg[idx].type) break; if (idx == oh->nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "message type not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, NULL, "message type not found"); /* * Decode the message if necessary. If the message is shared then retrieve @@ -492,7 +492,7 @@ H5O_msg_read_oh(H5F_t *f, H5O_t *oh, unsigned type_id, void *mesg) * returning. */ if (NULL == (ret_value = (type->copy)(oh->mesg[idx].native, mesg))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy message to user space") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy message to user space"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -524,7 +524,7 @@ H5O_msg_reset(unsigned type_id, void *native) /* Call the "real" reset routine */ if (H5O__msg_reset_real(type, native) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "unable to reset object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "unable to reset object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -554,7 +554,7 @@ H5O__msg_reset_real(const H5O_msg_class_t *type, void *native) if (native) { if (type->reset) { if ((type->reset)(native) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "reset method failed"); } /* end if */ else memset(native, 0, type->native_size); @@ -676,7 +676,7 @@ H5O_msg_copy(unsigned type_id, const void *mesg, void *dst) /* Call the message class's copy routine */ if (NULL == (ret_value = (type->copy)(mesg, dst))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to copy object header message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -714,7 +714,7 @@ H5O_msg_count(const H5O_loc_t *loc, unsigned type_id) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Count the messages of the correct type */ msg_count = H5O__msg_count_real(oh, type); @@ -788,11 +788,11 @@ H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id) /* Load the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Call the "real" exists routine */ if ((ret_value = H5O_msg_exists_oh(oh, type_id)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, FAIL, "unable to verify object header message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, FAIL, "unable to verify object header message"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -875,11 +875,11 @@ H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Call the "real" remove routine */ if ((ret_value = H5O__msg_remove_real(loc->file, oh, type, sequence, NULL, NULL, adj_link)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message"); done: if (oh && H5O_unpin(oh) < 0) @@ -922,11 +922,11 @@ H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, H5O_oper /* Pin the object header */ if (NULL == (oh = H5O_pin(loc))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header"); /* Call the "real" remove routine */ if ((ret_value = H5O__msg_remove_real(loc->file, oh, type, sequence, op, op_data, adj_link)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to remove object header message"); done: if (oh && H5O_unpin(oh) < 0) @@ -964,7 +964,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un /* Call the iterator callback */ if ((try_remove = (udata->op)(mesg->native, sequence, udata->op_data)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, - "object header message deletion callback failed") + "object header message deletion callback failed"); } /* end if */ else { /* If there's no callback routine, does the sequence # match? */ @@ -981,7 +981,7 @@ H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, un */ /* Convert message into a null message */ if (H5O__release_mesg(udata->f, oh, mesg, udata->adj_link) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release message"); /* Indicate that the object header was modified */ *oh_modified = H5O_MODIFY_CONDENSE; @@ -1025,7 +1025,7 @@ H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int seque /* Make certain we are allowed to modify the file */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file"); /* Set up iterator operator data */ udata.f = f; @@ -1039,11 +1039,11 @@ H5O__msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int seque op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5O__msg_remove_cb; if (H5O__msg_iterate_real(f, oh, type, &op, &udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error iterating over messages") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error iterating over messages"); /* Fail if we tried to remove any constant messages */ if (udata.nfailed) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to remove constant message(s)") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to remove constant message(s)"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1096,7 +1096,7 @@ H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, const H5O_mesg_operator_ /* Protect the object header to iterate over */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Call the "real" iterate routine */ if ((ret_value = H5O__msg_iterate_real(loc->file, oh, type, op, op_data)) < 0) @@ -1198,7 +1198,7 @@ done: /* Mark object header as dirty in cache */ if (H5AC_mark_entry_dirty(oh) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty") + HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty"); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1232,7 +1232,7 @@ H5O_msg_raw_size(const H5F_t *f, unsigned type_id, hbool_t disable_shared, const /* Compute the raw data size for the mesg */ if (0 == (ret_value = (type->raw_size)(f, disable_shared, mesg))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1271,15 +1271,15 @@ H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id, const void *mesg /* Get the property list */ if (NULL == (ocpl = (H5P_genplist_t *)H5I_object(ocpl_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, 0, "not a property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, 0, "not a property list"); /* Get any object header status flags set by properties */ if (H5P_get(ocpl, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get object header flags"); /* Compute the raw data size for the mesg */ if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message"); /* Add in "extra" raw space */ ret_value += extra_raw; @@ -1326,7 +1326,7 @@ H5O_msg_size_oh(const H5F_t *f, const H5O_t *oh, unsigned type_id, const void *m /* Compute the raw data size for the mesg */ if ((ret_value = (type->raw_size)(f, FALSE, mesg)) == 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, 0, "unable to determine size of message"); /* Add in "extra" raw space */ ret_value += extra_raw; @@ -1493,14 +1493,14 @@ H5O_msg_set_share(unsigned type_id, const H5O_shared_t *share, void *mesg) */ if (type->set_share) { if ((type->set_share)(mesg, share) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information"); } /* end if */ else { /* Set this message as the shared component for the message, wiping out * any information that was there before */ if (H5O_set_shared((H5O_shared_t *)mesg, share) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set shared message information"); } /* end else */ done: @@ -1563,7 +1563,7 @@ H5O_msg_get_crt_index(unsigned type_id, const void *mesg, H5O_msg_crt_idx_t *crt if (type->get_crt_index) { /* Retrieve the creation index from the native message */ if ((type->get_crt_index)(mesg, crt_idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index"); } /* end if */ else *crt_idx = 0; @@ -1600,7 +1600,7 @@ H5O_msg_encode(H5F_t *f, unsigned type_id, hbool_t disable_shared, unsigned char /* Encode */ if ((type->encode)(f, disable_shared, buf, mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1635,7 +1635,7 @@ H5O_msg_decode(H5F_t *f, H5O_t *open_oh, unsigned type_id, size_t buf_size, cons /* decode */ if (NULL == (ret_value = (type->decode)(f, open_oh, 0, &ioflags, buf_size, buf))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1678,7 +1678,7 @@ H5O__msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, void *native_sr */ if (NULL == (ret_value = (type->copy_file)(file_src, native_src, file_dst, recompute_size, mesg_flags, cpy_info, udata))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy object header message to file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy object header message to file"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1715,28 +1715,28 @@ H5O__msg_alloc(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, unsigned *mesg_ /* Check if message is already shared */ if ((shared_mesg = H5O_msg_is_shared(type->id, native)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "error determining if message is shared") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "error determining if message is shared"); else if (shared_mesg > 0) { /* Increment message's reference count */ if (type->link && (type->link)(f, oh, native) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared message ref count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared message ref count"); *mesg_flags |= H5O_MSG_FLAG_SHARED; } /* end if */ else { /* Attempt to share message */ if (H5SM_try_share(f, oh, 0, type->id, native, mesg_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared"); } /* end else */ /* Allocate space in the object header for the message */ if (H5O__alloc(f, oh, type, native, &new_idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for message"); /* Get the message's "creation index", if it has one */ if (type->get_crt_index) { /* Retrieve the creation index from the native message */ if ((type->get_crt_index)(native, &oh->mesg[new_idx].crt_idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve creation index"); } /* end if */ /* Set new message index */ @@ -1776,14 +1776,14 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con /* Protect chunk */ if (NULL == (chk_proxy = H5O__chunk_protect(f, oh, idx_msg->chunkno))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk"); /* Reset existing native information for the header's message */ H5O__msg_reset_real(type, idx_msg->native); /* Copy the native object for the message */ if (NULL == (idx_msg->native = (type->copy)(mesg, idx_msg->native))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy message to object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy message to object header"); /* Update the message flags */ idx_msg->flags = (uint8_t)mesg_flags; @@ -1794,13 +1794,13 @@ H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx, const H5O_msg_class_t *type, con /* Release chunk */ if (H5O__chunk_unprotect(f, chk_proxy, chk_dirtied) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk"); chk_proxy = NULL; /* Update the modification time, if requested */ if (update_flags & H5O_UPDATE_TIME) if (H5O_touch_oh(f, oh, FALSE) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object"); done: /* Release chunk, if not already released */ @@ -1845,7 +1845,7 @@ H5O_msg_delete(H5F_t *f, H5O_t *open_oh, unsigned type_id, void *mesg) /* delete */ if ((type->del) && (type->del)(f, open_oh, mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete file space for object header message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1882,7 +1882,7 @@ H5O__delete_mesg(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg) if ((type->del)(f, oh, mesg->native) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, - "unable to delete file space for object header message") + "unable to delete file space for object header message"); } /* end if */ done: @@ -1975,7 +1975,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg) #endif /* NDEBUG */ 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") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message"); } /* end if */ /* Mark the message as clean now */ @@ -2011,11 +2011,11 @@ H5O__flush_msgs(H5F_t *f, H5O_t *oh) for (u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) if (curr_msg->dirty) if (H5O_msg_flush(f, oh, curr_msg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode object header message"); /* Sanity check for the correct # of messages in object header */ if (oh->nmesgs != u) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "corrupt object header - too few messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "corrupt object header - too few messages"); #ifndef NDEBUG /* Reset the number of messages dirtied by decoding, as they have all @@ -2057,7 +2057,7 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Locate message of correct type */ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++) @@ -2065,7 +2065,7 @@ H5O_msg_get_flags(const H5O_loc_t *loc, unsigned type_id, uint8_t *flags) break; if (idx == oh->nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message type not found"); /* Set return value */ *flags = idx_msg->flags; diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 6cdd4b7..1474c66 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -185,7 +185,7 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); for (int i = 0; i < 14; i++) if (!isdigit(p[i])) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message"); /* Convert YYYYMMDDhhmmss UTC to a time_t. */ memset(&tm, 0, sizeof tm); @@ -197,11 +197,11 @@ H5O__mtime_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, tm.tm_sec = (p[12] - '0') * 10 + (p[13] - '0'); tm.tm_isdst = -1; /* (figure it out) */ if ((time_t)-1 == (the_time = H5_make_time(&tm))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't construct time info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't construct time info"); /* The return value */ if (NULL == (mesg = H5FL_MALLOC(time_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); *mesg = the_time; /* Set return value */ diff --git a/src/H5Oname.c b/src/H5Oname.c index 79a632f..727b603 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -83,10 +83,10 @@ H5O__name_decode(H5F_t H5_ATTR_NDEBUG_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, assert(p); if (NULL == (mesg = (H5O_name_t *)H5MM_calloc(sizeof(H5O_name_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == (mesg->s = (char *)H5MM_strndup((const char *)p, p_size - 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); ret_value = mesg; @@ -153,12 +153,12 @@ H5O__name_copy(const void *_mesg, void *_dest) 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *mesg; if (NULL == (dest->s = H5MM_xstrdup(mesg->s))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set return value */ ret_value = dest; diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 2ef2e38..ee7104e 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -169,7 +169,7 @@ 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") \ + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message"); \ \ /* Mark the message dirty if it was changed by decoding */ \ if ((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \ @@ -190,7 +190,7 @@ if (msg_type->set_crt_index) { \ /* Set the creation index for the message */ \ if ((msg_type->set_crt_index)((MSG)->native, (MSG)->crt_idx) < 0) \ - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, ERR, "unable to set creation index") \ + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, ERR, "unable to set creation index"); \ } /* end if */ \ } /* end if */ diff --git a/src/H5Opline.c b/src/H5Opline.c index 476e2ac..01c271f 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -122,18 +122,18 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Allocate space for I/O pipeline message */ if (NULL == (pline = H5FL_CALLOC(H5O_pline_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Version */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); pline->version = *p++; if (pline->version < H5O_PLINE_VERSION_1 || pline->version > H5O_PLINE_VERSION_LATEST) - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "bad version number for filter pipeline message") + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "bad version number for filter pipeline message"); /* Number of filters */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); pline->nused = *p++; if (pline->nused > H5Z_MAX_NFILTERS) { @@ -142,26 +142,26 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign */ pline->nused = 0; - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter pipeline message has too many filters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter pipeline message has too many filters"); } /* Reserved */ if (pline->version == H5O_PLINE_VERSION_1) { if (H5_IS_BUFFER_OVERFLOW(p, 6, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p += 6; } /* Allocate array for filters */ pline->nalloc = pline->nused; if (NULL == (pline->filter = (H5Z_filter_info_t *)H5MM_calloc(pline->nalloc * sizeof(pline->filter[0])))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Decode filters */ for (i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) { /* Filter ID */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, filter->id); /* Length of filter name */ @@ -169,20 +169,20 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign name_length = 0; else { if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, name_length); if (pline->version == H5O_PLINE_VERSION_1 && name_length % 8) - HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter name length is not a multiple of eight") + HGOTO_ERROR(H5E_PLINE, H5E_CANTLOAD, NULL, "filter name length is not a multiple of eight"); } /* Filter flags */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, filter->flags); /* Number of filter parameters ("client data elements") */ if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT16DECODE(p, filter->cd_nelmts); /* Filter name, if there is one */ @@ -193,14 +193,14 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Determine actual name length (without padding, but with null terminator) */ actual_name_length = HDstrnlen((const char *)p, max); if (actual_name_length == max) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "filter name not null terminated") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "filter name not null terminated"); actual_name_length += 1; /* include \0 byte */ /* Allocate space for the filter name, or use the internal buffer */ if (actual_name_length > H5Z_COMMON_NAME_LEN) { filter->name = (char *)H5MM_malloc(actual_name_length); if (NULL == filter->name) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for filter name"); } else filter->name = filter->_name; @@ -208,7 +208,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign HDstrncpy(filter->name, (const char *)p, actual_name_length); if (H5_IS_BUFFER_OVERFLOW(p, name_length, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p += name_length; } @@ -219,7 +219,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign if (filter->cd_nelmts > H5Z_COMMON_CD_VALUES) { filter->cd_values = (unsigned *)H5MM_malloc(filter->cd_nelmts * sizeof(unsigned)); if (NULL == filter->cd_values) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for client data") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for client data"); } else filter->cd_values = filter->_cd_values; @@ -227,7 +227,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign /* Read the client data values and the padding */ for (size_t j = 0; j < filter->cd_nelmts; j++) { if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT32DECODE(p, filter->cd_values[j]); } @@ -235,7 +235,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign if (filter->cd_nelmts % 2) { if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, - "ran off end of input buffer while decoding") + "ran off end of input buffer while decoding"); p += 4; /* padding */ } } @@ -372,7 +372,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/) /* Allocate pipeline message, if not provided */ if (!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Shallow copy basic fields */ *dst = *src; @@ -382,7 +382,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/) if (dst->nalloc) { /* Allocate array to hold filters */ if (NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0])))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Deep-copy filters */ for (i = 0; i < src->nused; i++) { @@ -400,7 +400,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/) dst->filter[i].name = (char *)H5MM_strdup(src->filter[i].name); if (NULL == dst->filter[i].name) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for filter name") + "memory allocation failed for filter name"); } /* end if */ else dst->filter[i].name = dst->filter[i]._name; @@ -412,7 +412,7 @@ H5O__pline_copy(const void *_src, void *_dst /*out*/) if (src->filter[i].cd_nelmts > H5Z_COMMON_CD_VALUES) { if (NULL == (dst->filter[i].cd_values = (unsigned *)H5MM_malloc(src->filter[i].cd_nelmts * sizeof(unsigned)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(dst->filter[i].cd_values, src->filter[i].cd_values, src->filter[i].cd_nelmts * sizeof(unsigned)); @@ -601,7 +601,7 @@ H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, /* 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 */ if (pline_src->version > H5O_pline_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "pline message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "pline message version out of bounds"); /* If the user data is non-NULL, assume we are copying a dataset or group * and make a copy of the filter pipeline for later in @@ -609,7 +609,7 @@ H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, */ if (udata) if (NULL == (udata->src_pline = (H5O_pline_t *)H5O__pline_copy(pline_src, NULL))) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to copy") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to copy"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -705,7 +705,7 @@ H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline) /* Version bounds check */ if (version > H5O_pline_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_PLINE, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds") + HGOTO_ERROR(H5E_PLINE, H5E_BADRANGE, FAIL, "Filter pipeline version out of bounds"); /* Set the message version */ pline->version = version; diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c index b280b3a..7c0c71f 100644 --- a/src/H5Orefcount.c +++ b/src/H5Orefcount.c @@ -93,17 +93,17 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Version of message */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (*p++ != H5O_REFCOUNT_VERSION) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message"); /* Allocate space for message */ if (NULL == (refcount = H5FL_MALLOC(H5O_refcount_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get reference count for object */ if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); UINT32DECODE(p, *refcount); /* Set return value */ @@ -170,7 +170,7 @@ H5O__refcount_copy(const void *_mesg, void *_dest) /* check args */ assert(refcount); if (!dest && NULL == (dest = H5FL_MALLOC(H5O_refcount_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* copy */ *dest = *refcount; diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index e6ee96b..cd0d3ed 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -119,39 +119,39 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN assert(p); if (NULL == (sdim = H5FL_CALLOC(H5S_extent_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "dataspace structure allocation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "dataspace structure allocation failed"); sdim->type = H5S_NO_CLASS; /* Check version */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); version = *p++; if (version < H5O_SDSPACE_VERSION_1 || version > H5O_SDSPACE_VERSION_2) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "wrong version number in dataspace message") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "wrong version number in dataspace message"); sdim->version = version; /* Get rank */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); sdim->rank = *p++; if (sdim->rank > H5S_MAX_RANK) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "simple dataspace dimensionality is too large") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "simple dataspace dimensionality is too large"); /* Get dataspace flags for later */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); flags = *p++; /* Get or determine the type of the extent */ if (version >= H5O_SDSPACE_VERSION_2) { if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); sdim->type = (H5S_class_t)*p++; if (sdim->type != H5S_SIMPLE && sdim->rank > 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid rank for scalar or NULL dataspace") + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "invalid rank for scalar or NULL dataspace"); } else { /* Set the dataspace type to be simple or scalar as appropriate @@ -164,14 +164,14 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN /* Increment past reserved byte */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p++; } /* Version 1 has 4 reserved bytes */ if (version == H5O_SDSPACE_VERSION_1) { if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); p += 4; } @@ -182,10 +182,10 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN /* Check that we have space to decode sdim->rank values */ if (H5_IS_BUFFER_OVERFLOW(p, (H5F_sizeof_size(f) * sdim->rank), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (NULL == (sdim->size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed"); for (i = 0; i < sdim->rank; i++) H5F_DECODE_LENGTH(f, p, sdim->size[i]); @@ -193,11 +193,11 @@ H5O__sdspace_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UN if (flags & H5S_VALID_MAX) { if (NULL == (sdim->max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Check that we have space to decode sdim->rank values */ if (H5_IS_BUFFER_OVERFLOW(p, (H5F_sizeof_size(f) * sdim->rank), p_end)) - HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding") + HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); for (i = 0; i < sdim->rank; i++) H5F_DECODE_LENGTH(f, p, sdim->max[i]); } @@ -325,11 +325,11 @@ H5O__sdspace_copy(const void *_mesg, void *_dest) /* check args */ assert(mesg); if (!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy extent information */ if (H5S__extent_copy_real(dest, mesg, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent"); /* Set return value */ ret_value = dest; @@ -457,7 +457,7 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, /* 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 */ if (src_space_extent->version > H5O_sdspace_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) - HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "dataspace message version out of bounds") + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "dataspace message version out of bounds"); /* If the user data is non-NULL, assume we are copying a dataset * and make a copy of the dataspace extent for later in the object copying @@ -468,11 +468,11 @@ H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, if (udata) { /* Allocate copy of dataspace extent */ if (NULL == (udata->src_space_extent = H5FL_CALLOC(H5S_extent_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed"); /* Create a copy of the dataspace extent */ if (H5S__extent_copy_real(udata->src_space_extent, src_space_extent, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent"); } /* end if */ done: diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 718b3a7..eb4eb26 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -122,31 +122,31 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t /* Retrieve the fractal heap address for shared messages */ if (H5SM_get_fheap_addr(f, type->id, &fheap_addr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get fheap address for shared messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get fheap address for shared messages"); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, fheap_addr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap"); /* Get the size of the message in the heap */ if (H5HF_get_obj_len(fheap, &(shared->u.heap_id), &mesg_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get message size from fractal heap.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get message size from fractal heap."); /* Wrap the local buffer for serialized message */ if (NULL == (wb = H5WB_wrap(mesg_buf, sizeof(mesg_buf)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for message */ if (NULL == (mesg_ptr = (uint8_t *)H5WB_actual(wb, mesg_size))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer"); /* Retrieve the message from the heap */ if (H5HF_read(fheap, &(shared->u.heap_id), mesg_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap."); /* Decode the message */ if (NULL == (ret_value = (type->decode)(f, open_oh, 0, ioflags, mesg_size, mesg_ptr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message."); } /* end if */ else { H5O_loc_t oloc; /* Location for object header where message is stored */ @@ -164,17 +164,17 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t * the same object header the attribute is in. Read the message * directly. */ if (NULL == (ret_value = H5O_msg_read_oh(f, open_oh, type->id, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message"); } else /* The shared message is in another object header */ if (NULL == (ret_value = H5O_msg_read(&oloc, type->id, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message"); } /* end else */ /* Mark the message as shared */ if (H5O_msg_set_share(type->id, shared, ret_value) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information"); done: /* Release resources */ @@ -248,14 +248,14 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ hbool_t deleted = FALSE; /* This is used only to satisfy H5O__link_oh */ if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); assert(!deleted); } else /* The shared message is in another object header */ if (H5O_link(&oloc, adjust) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); } /* end if */ else { assert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE); @@ -263,12 +263,12 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ /* Check for decrementing reference count on shared message */ if (adjust < 0) { if (H5SM_delete(f, open_oh, shared) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to delete message from SOHM table") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to delete message from SOHM table"); } /* end if */ /* Check for incrementing reference count on message */ else if (adjust > 0) { if (H5SM_try_share(f, open_oh, 0, type->id, shared, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message"); } /* end if */ } /* end else */ @@ -304,7 +304,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b /* Version */ version = *buf++; if (version < H5O_SHARED_VERSION_1 || version > H5O_SHARED_VERSION_LATEST) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message"); /* Get the shared information type * Flags are unused before version 3. @@ -355,7 +355,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b /* Retrieve actual message, through decoded shared message info */ if (NULL == (ret_value = H5O__shared_read(f, open_oh, ioflags, &sh_mesg, type))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -493,7 +493,7 @@ H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_sh /* Decrement the reference count on the shared object */ if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, -1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -522,7 +522,7 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar /* Increment the reference count on the shared object */ if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, 1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -630,7 +630,7 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O src_oloc.file = shared_src->file; src_oloc.addr = shared_src->u.loc.oh_addr; if (H5O_copy_header_map(&src_oloc, &dst_oloc, cpy_info, FALSE, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Set up destination message's shared info */ H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, f, mesg_type->id, 0, dst_oloc.addr) @@ -638,7 +638,7 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O else /* Share the message */ if (H5SM_try_share(f, NULL, H5SM_WAS_DEFERRED, mesg_type->id, shared_dst, mesg_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Oshared.h b/src/H5Oshared.h index aef49f0..a9c8c85 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -58,12 +58,12 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla if (mesg_flags & H5O_MSG_FLAG_SHARED) { /* Retrieve native message info indirectly through shared message */ if (NULL == (ret_value = H5O__shared_decode(f, open_oh, ioflags, p, H5O_SHARED_TYPE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message"); /* We currently do not support automatically fixing shared messages */ #ifdef H5_STRICT_FORMAT_CHECKS if (*ioflags & H5O_DECODEIO_DIRTY) - HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") + HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty"); #else /* H5_STRICT_FORMAT_CHECKS */ *ioflags &= ~H5O_DECODEIO_DIRTY; #endif /* H5_STRICT_FORMAT_CHECKS */ @@ -71,7 +71,7 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla else { /* Decode native message directly */ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, open_oh, mesg_flags, ioflags, p_size, p))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message"); } /* end else */ done: @@ -116,12 +116,12 @@ H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mes if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) { /* Encode shared message into buffer */ if (H5O__shared_encode(f, p, sh_mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode shared message"); } /* end if */ else { /* Encode native message directly */ if (H5O_SHARED_ENCODE_REAL(f, p, _mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode native message"); } /* end else */ done: @@ -164,12 +164,12 @@ H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg) if (H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) { /* Retrieve encoded size of shared message */ if (0 == (ret_value = H5O__shared_size(f, sh_mesg))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of shared message"); } /* end if */ else { /* Retrieve size of native message directly */ if (0 == (ret_value = H5O_SHARED_SIZE_REAL(f, _mesg))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, 0, "unable to retrieve encoded size of native message"); } /* end else */ done: @@ -208,13 +208,13 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) if (H5O_IS_TRACKED_SHARED(sh_mesg->type)) { /* Decrement the reference count on the shared message/object */ if (H5O__shared_delete(f, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for shared message"); } /* end if */ #ifdef H5O_SHARED_DELETE_REAL else { /* Decrement the reference count on the native message directly */ if (H5O_SHARED_DELETE_REAL(f, open_oh, _mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message"); } /* end else */ #endif /* H5O_SHARED_DELETE_REAL */ @@ -254,13 +254,13 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) if (H5O_IS_TRACKED_SHARED(sh_mesg->type)) { /* Increment the reference count on the shared message/object */ if (H5O__shared_link(f, open_oh, H5O_SHARED_TYPE, sh_mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for shared message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for shared message"); } /* end if */ #ifdef H5O_SHARED_LINK_REAL else { /* Increment the reference count on the native message directly */ if (H5O_SHARED_LINK_REAL(f, open_oh, _mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message"); } /* end else */ #endif /* H5O_SHARED_LINK_REAL */ @@ -300,11 +300,11 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ /* Call native message's copy file callback to copy the message */ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file"); #else /* H5O_SHARED_COPY_FILE_REAL */ /* No copy file callback defined, just copy the message itself */ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message"); #endif /* H5O_SHARED_COPY_FILE_REAL */ /* Reset shared message info for new message */ @@ -313,7 +313,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ /* Handle sharing destination message */ if (H5O__shared_copy_file(file_src, file_dst, H5O_SHARED_TYPE, _native_src, dst_mesg, recompute_size, mesg_flags, cpy_info, udata) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "unable to determine if message should be shared") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, NULL, "unable to determine if message should be shared"); /* Set return value */ ret_value = dst_mesg; @@ -365,7 +365,7 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const #ifdef H5O_SHARED_POST_COPY_FILE_REAL /* Call native message's post copy file callback to copy the message */ if (H5O_SHARED_POST_COPY_FILE_REAL(oloc_src, mesg_src, oloc_dst, mesg_dst, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy native message to another file") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy native message to another file"); #endif /* H5O_SHARED_POST_COPY_FILE_REAL */ /* Update shared message after the post copy - will short circuit in @@ -373,13 +373,13 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const * verifies that it is indeed the case */ if (H5O__shared_post_copy_file(oloc_dst->file, H5O_SHARED_TYPE, shared_src, shared_dst, mesg_flags, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy"); #ifdef H5O_SHARED_POST_COPY_FILE_UPD /* Call native message's post copy file update callback to update the * message */ if (H5O_SHARED_POST_COPY_FILE_UPD(oloc_src, mesg_src, oloc_dst, mesg_dst, cpy_info) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to update native message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to update native message"); #endif /* H5O_SHARED_POST_COPY_FILE_UPD */ /* Make sure that if the source or destination is committed, both are @@ -425,12 +425,12 @@ H5O_SHARED_DEBUG(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwid if (H5O_IS_STORED_SHARED(sh_mesg->type)) { /* Print shared message information */ if (H5O__shared_debug(sh_mesg, stream, indent, fwidth) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display shared message info") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display shared message info"); } /* end if */ /* Call native message's debug callback */ if (H5O_SHARED_DEBUG_REAL(f, _mesg, stream, indent, fwidth) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display native message info") + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to display native message info"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c index d5303b7..6588097 100644 --- a/src/H5Oshmesg.c +++ b/src/H5Oshmesg.c @@ -78,7 +78,7 @@ H5O__shmesg_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU if (NULL == (mesg = (H5O_shmesg_table_t *)H5MM_calloc(sizeof(H5O_shmesg_table_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for shared message table message") + "memory allocation failed for shared message table message"); /* Retrieve version, table address, and number of indexes */ if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end)) @@ -157,7 +157,7 @@ H5O__shmesg_copy(const void *_mesg, void *_dest) if (!dest && NULL == (dest = (H5O_shmesg_table_t *)H5MM_malloc(sizeof(H5O_shmesg_table_t)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for shared message table message") + "memory allocation failed for shared message table message"); /* All this message requires is a shallow copy */ *dest = *mesg; diff --git a/src/H5Ostab.c b/src/H5Ostab.c index 64dfb90..24504f9 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -94,7 +94,7 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE assert(p); if (NULL == (stab = H5FL_CALLOC(H5O_stab_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end)) HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); @@ -246,7 +246,7 @@ H5O__stab_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *mesg) /* Free the file space for the symbol table */ if (H5G__stab_delete(f, (const H5O_stab_t *)mesg) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -282,11 +282,11 @@ H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst, /* Allocate space for the destination stab */ if (NULL == (stab_dst = H5FL_MALLOC(H5O_stab_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Get the old local heap's size and use that as the hint for the new heap */ if (H5HL_get_size(file_src, stab_src->heap_addr, &size_hint) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size"); /* Set copy metadata tag */ H5_BEGIN_TAG(H5AC__COPIED_TAG) @@ -354,7 +354,7 @@ H5O__stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo /* Iterate over objects in group, copying them */ if ((H5B_iterate(src_oloc->file, H5B_SNODE, stab_src->btree_addr, H5G__node_copy, &udata)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "iteration operator failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Otest.c b/src/H5Otest.c index ff902dd..c646f42 100644 --- a/src/H5Otest.c +++ b/src/H5Otest.c @@ -93,23 +93,23 @@ H5O__is_attr_dense_test(hid_t oid) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Check if dense storage is being used */ @@ -165,22 +165,22 @@ H5O__is_attr_empty_test(hid_t oid) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if ((ainfo_exists = H5A__get_ainfo(loc->file, oh, &ainfo)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Retrieve the number of attribute messages in header */ @@ -208,7 +208,7 @@ H5O__is_attr_empty_test(hid_t oid) /* Retrieve # of records in name index */ if (H5B2_get_nrec(bt2_name, &nattrs) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, - "unable to retrieve # of records from name index") + "unable to retrieve # of records from name index"); } /* end if */ /* Verify that attribute count in object header is correct */ @@ -267,23 +267,23 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Check for attribute info stored */ ainfo.fheap_addr = HADDR_UNDEF; if (oh->version > H5O_VERSION_1) { /* Check for (& retrieve if available) attribute info */ if (H5A__get_ainfo(loc->file, oh, &ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message"); } /* end if */ /* Retrieve the number of attribute messages in header */ @@ -308,7 +308,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs) /* Retrieve # of records in name index */ if (H5B2_get_nrec(bt2_name, &obj_nattrs) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index"); } /* end if */ /* Verify that attribute count in object header is correct */ @@ -366,11 +366,11 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Set metadata tag in API context */ @@ -468,11 +468,11 @@ H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate "unknown" message */ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++) @@ -480,7 +480,7 @@ H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val) /* Check for "unknown" message having the correct flags */ if (((idx_msg->flags & H5O_MSG_FLAG_WAS_UNKNOWN) > 0) != flag_val) HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, - "'unknown' message has incorrect 'was unknown' flag value") + "'unknown' message has incorrect 'was unknown' flag value"); /* Break out of loop, to indicate that the "unknown" message was found */ break; @@ -488,7 +488,7 @@ H5O__check_msg_marked_test(hid_t oid, hbool_t flag_val) /* Check for not finding an "unknown" message */ if (idx == oh->nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "'unknown' message type not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "'unknown' message type not found"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -529,7 +529,7 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Safety check */ nchunks = oh->nchunks; @@ -541,14 +541,14 @@ H5O__expunge_chunks_test(const H5O_loc_t *loc) /* Release the object header */ if (H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header"); /* Iterate over all the saved chunk addresses, evicting them from the cache */ /* (in reverse order, so that chunk #0 is unpinned) */ for (u = nchunks - 1; u < nchunks; u--) if (H5AC_expunge_entry(loc->file, (u == 0 ? H5AC_OHDR : H5AC_OHDR_CHK), chk_addr[u], H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTEXPUNGE, FAIL, "unable to expunge object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTEXPUNGE, FAIL, "unable to expunge object header chunk"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -588,7 +588,7 @@ H5O__get_rc_test(const H5O_loc_t *loc, unsigned *rc) /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header"); /* Save the refcount for the object header */ *rc = oh->nlink; @@ -636,16 +636,16 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate first message of given type */ for (idx = 0, idx_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, idx_msg++) @@ -659,7 +659,7 @@ H5O__msg_get_chunkno_test(hid_t oid, unsigned msg_type, unsigned *chunk_num) /* Check for not finding a message of the given type*/ if (idx == oh->nmesgs) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message of type not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "message of type not found"); done: if (oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) @@ -703,16 +703,16 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type) /* Get object location for object */ if (NULL == (loc = H5O_get_loc(oid))) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found"); /* Set API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Get the object header */ if (NULL == (oh = H5O_protect(loc, H5AC__NO_FLAGS_SET, FALSE))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header"); /* Locate first message of given type */ for (idx = 0, curr_msg = &oh->mesg[0]; idx < oh->nmesgs; idx++, curr_msg++) @@ -766,7 +766,7 @@ H5O__msg_move_to_new_chunk_test(hid_t oid, unsigned msg_type) /* (*new_idx returned from this routine is unused here) */ if (H5O__alloc_chunk(loc->file, oh, (curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh)), oh->nmesgs, &found_msg, &new_idx) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate new object header chunk") + HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, FAIL, "can't allocate new object header chunk"); /* Break out of loop, the message was found */ break; diff --git a/src/H5P.c b/src/H5P.c index 427eb24..8d64bfd 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -173,27 +173,27 @@ H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create /* Check arguments. */ if (H5P_DEFAULT != parent && (H5I_GENPROP_CLS != H5I_get_type(parent))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list class"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid class name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid class name"); if ((create_data != NULL && cls_create == NULL) || (copy_data != NULL && cls_copy == NULL) || (close_data != NULL && cls_close == NULL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "data specified, but no callback provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "data specified, but no callback provided"); /* Get the pointer to the parent class */ if (parent == H5P_DEFAULT) par_class = NULL; else if (NULL == (par_class = (H5P_genclass_t *)H5I_object(parent))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve parent class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't retrieve parent class"); /* Create the new property list class */ if (NULL == (pclass = H5P__create_class(par_class, name, H5P_TYPE_USER, cls_create, create_data, cls_copy, copy_data, cls_close, close_data))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list class"); /* Get an ID for the class */ if ((ret_value = H5I_register(H5I_GENPROP_CLS, pclass, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class"); done: if (H5I_INVALID_HID == ret_value && pclass) @@ -414,17 +414,17 @@ H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, H5P_p /* Check arguments. */ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(cls_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid class name"); if (size > 0 && def_value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); /* Create the new property list class */ orig_pclass = pclass; if ((ret_value = H5P__register(&pclass, name, size, def_value, prp_create, prp_set, prp_get, NULL, NULL, prp_delete, prp_copy, prp_cmp, prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in class"); /* Check if the property class changed and needs to be substituted in the ID */ if (pclass != orig_pclass) { @@ -432,13 +432,13 @@ 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID"); assert(old_pclass == orig_pclass); /* Close the previous class */ if (H5P__close_class(old_pclass) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, - "unable to close original property class after substitution") + "unable to close original property class after substitution"); } /* end if */ done: @@ -598,16 +598,16 @@ H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_s /* Check arguments. */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name"); if (size > 0 && value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); /* Create the new property list class */ if ((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, NULL, NULL, prp_delete, prp_copy, prp_cmp, prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist"); done: FUNC_LEAVE_API(ret_value) @@ -830,7 +830,7 @@ H5Pencode2(hid_t plist_id, void *buf, size_t *nalloc, hid_t fapl_id) /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Call the internal encode routine */ if ((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0) @@ -1022,18 +1022,18 @@ H5Pequal(hid_t id1, hid_t id2) /* Check arguments. */ if ((H5I_GENPROP_LST != H5I_get_type(id1) && H5I_GENPROP_CLS != H5I_get_type(id1)) || (H5I_GENPROP_LST != H5I_get_type(id2) && H5I_GENPROP_CLS != H5I_get_type(id2))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects"); if (H5I_get_type(id1) != H5I_get_type(id2)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects"); if (NULL == (obj1 = H5I_object(id1)) || NULL == (obj2 = H5I_object(id2))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); /* Compare property lists */ if (H5I_GENPROP_LST == H5I_get_type(id1)) { int cmp_ret = 0; if (H5P__cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2, &cmp_ret) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists"); /* Set return value */ ret_value = cmp_ret == 0 ? TRUE : FALSE; @@ -1379,26 +1379,26 @@ H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name) /* Check arguments. */ if ((src_id_type = H5I_get_type(src_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid source ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid source ID"); if ((dst_id_type = H5I_get_type(dst_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid destination ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid destination ID"); if ((H5I_GENPROP_LST != src_id_type && H5I_GENPROP_CLS != src_id_type) || (H5I_GENPROP_LST != dst_id_type && H5I_GENPROP_CLS != dst_id_type)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not property objects"); if (src_id_type != dst_id_type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not the same kind of property objects"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); /* Compare property lists */ if (H5I_GENPROP_LST == src_id_type) { if (H5P__copy_prop_plist(dst_id, src_id, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between lists") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between lists"); } /* end if */ /* Must be property classes */ else { if (H5P__copy_prop_pclass(dst_id, src_id, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between classes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy property between classes"); } /* end else */ done: @@ -1482,11 +1482,11 @@ H5Pclose(hid_t plist_id) if (H5P_DEFAULT != plist_id) { /* Check arguments. */ if (H5I_GENPROP_LST != H5I_get_type(plist_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Close the property list */ if (H5I_dec_app_ref(plist_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close"); } /* end if */ done: @@ -1565,19 +1565,19 @@ H5Pget_class_parent(hid_t pclass_id) /* Check arguments. */ if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property class"); /* Retrieve the property class's parent */ if (NULL == (parent = H5P__get_class_parent(pclass))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to query class of property list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5I_INVALID_HID, "unable to query class of property list"); /* Increment the outstanding references to the class object */ if (H5P__access_class(parent, H5P_MOD_INC_REF) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ID ref count"); /* Get an ID for the class */ if ((ret_value = H5I_register(H5I_GENPROP_CLS, parent, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list class"); done: if (H5I_INVALID_HID == ret_value && parent) @@ -1614,11 +1614,11 @@ H5Pclose_class(hid_t cls_id) /* Check arguments */ if (H5I_GENPROP_CLS != H5I_get_type(cls_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list class"); /* Close the property list class */ if (H5I_dec_app_ref(cls_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5PB.c b/src/H5PB.c index 01cfac0..6f9f732 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -283,7 +283,8 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un /* Check args */ if (f_sh->fs_strategy != H5F_FSPACE_STRATEGY_PAGE) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "Enabling Page Buffering requires PAGE file space strategy") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, + "Enabling Page Buffering requires PAGE file space strategy"); /* round down the size if it is larger than the page size */ else if (size > f_sh->fs_page_size) { hsize_t temp_size; @@ -292,11 +293,11 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un H5_CHECKED_ASSIGN(size, size_t, temp_size, hsize_t); } /* end if */ else if (0 != size % f_sh->fs_page_size) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINIT, FAIL, "Page Buffer size must be >= to the page size") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINIT, FAIL, "Page Buffer size must be >= to the page size"); /* Allocate the new page buffering structure */ if (NULL == (page_buf = H5FL_CALLOC(H5PB_t))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed"); page_buf->max_size = size; H5_CHECKED_ASSIGN(page_buf->page_size, size_t, f_sh->fs_page_size, hsize_t); @@ -310,12 +311,12 @@ H5PB_create(H5F_shared_t *f_sh, size_t size, unsigned page_buf_min_meta_perc, un page_buf->min_raw_count = (unsigned)((size * page_buf_min_raw_perc) / (f_sh->fs_page_size * 100)); if (NULL == (page_buf->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCREATE, FAIL, "can't create skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCREATE, FAIL, "can't create skip list"); if (NULL == (page_buf->mf_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCREATE, FAIL, "can't create skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCREATE, FAIL, "can't create skip list"); if (NULL == (page_buf->page_fac = H5FL_fac_init(page_buf->page_size))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINIT, FAIL, "can't create page factory") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINIT, FAIL, "can't create page factory"); f_sh->page_buf = page_buf; @@ -360,7 +361,7 @@ H5PB__flush_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data) /* Flush the page if it's dirty */ if (page_entry->is_dirty) if (H5PB__write_entry(f_sh, page_entry) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -391,7 +392,7 @@ H5PB_flush(H5F_shared_t *f_sh) /* Iterate over all entries in page buffer skip list */ if (H5SL_iterate(page_buf->slist_ptr, H5PB__flush_cb, f_sh)) - HGOTO_ERROR(H5E_PAGEBUF, H5E_BADITER, FAIL, "can't flush page buffer skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_BADITER, FAIL, "can't flush page buffer skip list"); } /* end if */ done: @@ -457,7 +458,7 @@ H5PB_dest(H5F_shared_t *f_sh) H5PB_ud1_t op_data; /* Iteration context */ if (H5PB_flush(f_sh) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTFLUSH, FAIL, "can't flush page buffer") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTFLUSH, FAIL, "can't flush page buffer"); /* Set up context info */ op_data.page_buf = page_buf; @@ -465,16 +466,16 @@ H5PB_dest(H5F_shared_t *f_sh) /* Destroy the skip list containing all the entries in the PB */ op_data.actual_slist = TRUE; if (H5SL_destroy(page_buf->slist_ptr, H5PB__dest_cb, &op_data)) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list"); /* Destroy the skip list containing the new entries */ op_data.actual_slist = FALSE; if (H5SL_destroy(page_buf->mf_slist_ptr, H5PB__dest_cb, &op_data)) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTCLOSEOBJ, FAIL, "can't destroy page buffer skip list"); /* Destroy the page factory */ if (H5FL_fac_term(page_buf->page_fac) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTRELEASE, FAIL, "can't destroy page buffer page factory") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTRELEASE, FAIL, "can't destroy page buffer page factory"); f_sh->page_buf = H5FL_FREE(H5PB_t, page_buf); } /* end if */ @@ -520,7 +521,7 @@ H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr) if (NULL == H5SL_search(page_buf->mf_slist_ptr, &(page_addr))) { /* Create the new PB entry */ if (NULL == (page_entry = H5FL_CALLOC(H5PB_entry_t))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Initialize page fields */ page_entry->addr = page_addr; @@ -529,7 +530,7 @@ H5PB_add_new_page(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t page_addr) /* Insert entry in skip list */ if (H5SL_insert(page_buf->mf_slist_ptr, page_entry, &(page_entry->addr)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, "Can't insert entry in skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, "Can't insert entry in skip list"); } /* end if */ done: @@ -618,7 +619,7 @@ H5PB_remove_entry(const H5F_shared_t *f_sh, haddr_t addr) if (page_entry) { 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") + 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) @@ -677,7 +678,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * int mpi_size; if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size"); if (1 != mpi_size) bypass_pb = TRUE; #endif @@ -690,7 +691,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * */ if (NULL == page_buf || size >= page_buf->page_size || (bypass_pb && H5FD_MEM_DRAW == type)) { if (H5F__accum_read(f_sh, type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "read through metadata accumulator failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "read through metadata accumulator failed"); /* Update statistics */ if (page_buf) { @@ -859,7 +860,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* check if we can make space in page buffer */ if ((can_make_space = H5PB__make_space(f_sh, page_buf, type)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "make space in Page buffer Failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "make space in Page buffer Failed"); /* if make_space returns 0, then we can't use the page buffer for this I/O and we need to bypass */ @@ -870,7 +871,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* read entire block from VFD and return */ if (H5FD_read(file, type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed"); /* Break out of loop */ break; @@ -880,18 +881,18 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* Read page from VFD */ 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") + "memory allocation failed for page buffer entry"); /* Read page through the VFD layer, but make sure we don't read past the EOA. */ /* Retrieve the 'eoa' for the file */ if (HADDR_UNDEF == (eoa = H5F_shared_get_eoa(f_sh, type))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* If the entire page falls outside the EOA, then fail */ if (search_addr > eoa) HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, - "reading an entire page that is outside the file EOA") + "reading an entire page that is outside the file EOA"); /* Adjust the read size to not go beyond the EOA */ if (search_addr + page_size > eoa) @@ -899,7 +900,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* Read page from VFD */ if (H5FD_read(file, type, search_addr, page_size, new_page_buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed"); /* Copy the requested data from the page into the input buffer */ offset = (0 == i ? addr - search_addr : 0); @@ -908,7 +909,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* Create the new PB entry */ if (NULL == (page_entry = H5FL_CALLOC(H5PB_entry_t))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "memory allocation failed"); page_entry->page_buf_ptr = new_page_buf; page_entry->addr = search_addr; @@ -917,7 +918,7 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * /* Insert page into PB */ if (H5PB__insert_entry(page_buf, page_entry) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTSET, FAIL, "error inserting new page in page buffer") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTSET, FAIL, "error inserting new page in page buffer"); /* Update statistics */ if (type == H5FD_MEM_DRAW) @@ -975,7 +976,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const int mpi_size; if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size"); if (1 != mpi_size) bypass_pb = TRUE; #endif @@ -988,7 +989,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const */ if (NULL == page_buf || size >= page_buf->page_size || bypass_pb) { if (H5F__accum_write(f_sh, type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "write through metadata accumulator failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "write through metadata accumulator failed"); /* Update statistics */ if (page_buf) { @@ -1008,7 +1009,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const #ifdef H5_HAVE_PARALLEL if (bypass_pb) { if (H5PB_update_entry(page_buf, addr, size, buf) > 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTUPDATE, FAIL, "failed to update PB with metadata cache") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTUPDATE, FAIL, "failed to update PB with metadata cache"); HGOTO_DONE(SUCCEED); } /* end if */ #endif @@ -1162,7 +1163,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Check if we can make space in page buffer */ if ((can_make_space = H5PB__make_space(f_sh, page_buf, type)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "make space in Page buffer Failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_NOSPACE, FAIL, "make space in Page buffer Failed"); /* If make_space returns 0, then we can't use the page * buffer for this I/O and we need to bypass @@ -1172,7 +1173,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Write to VFD and return */ if (H5FD_write(file, type, addr, size, buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "driver write request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "driver write request failed"); /* Break out of loop */ break; @@ -1195,7 +1196,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Allocate space for the page buffer */ 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") + "memory allocation failed for page buffer entry"); 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)); @@ -1215,11 +1216,11 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Allocate space for the page buffer */ if (NULL == (new_page_buf = H5FL_FAC_CALLOC(page_buf->page_fac))) HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL, - "memory allocation failed for page buffer entry") + "memory allocation failed for page buffer entry"); /* Create the new loaded PB entry */ if (NULL == (page_entry = H5FL_CALLOC(H5PB_entry_t))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTALLOC, FAIL, "memory allocation failed"); page_entry->page_buf_ptr = new_page_buf; page_entry->addr = search_addr; @@ -1227,12 +1228,12 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Retrieve the 'eoa' for the file */ if (HADDR_UNDEF == (eoa = H5F_shared_get_eoa(f_sh, type))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* If the entire page falls outside the EOA, then fail */ if (search_addr > eoa) HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, - "writing to a page that is outside the file EOA") + "writing to a page that is outside the file EOA"); /* Retrieve the 'eof' for the file - The MPI-VFD EOF * returned will most likely be HADDR_UNDEF, so skip @@ -1240,7 +1241,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const */ if (!H5F_SHARED_HAS_FEATURE(f_sh, H5FD_FEAT_HAS_MPI)) if (HADDR_UNDEF == (eof = H5FD_get_eof(f_sh->lf, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eof request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eof request failed"); /* Adjust the read size to not go beyond the EOA */ if (search_addr + page_size > eoa) @@ -1248,7 +1249,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const if (search_addr < eof) { if (H5FD_read(file, type, search_addr, page_size, new_page_buf) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, "driver read request failed"); /* Update statistics */ if (type == H5FD_MEM_DRAW || type == H5FD_MEM_GHEAP) @@ -1266,7 +1267,7 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const /* Insert page into PB, evicting other pages as necessary */ if (H5PB__insert_entry(page_buf, page_entry) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTSET, FAIL, "error inserting new page in page buffer") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTSET, FAIL, "error inserting new page in page buffer"); } /* end else */ } /* end for */ } /* end else */ @@ -1309,7 +1310,7 @@ H5PB_enabled(H5F_shared_t *f_sh, H5FD_mem_t type, hbool_t *enabled) int mpi_size; if ((mpi_size = H5F_shared_mpi_get_size(f_sh)) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "can't retrieve MPI communicator size"); if (1 != mpi_size) bypass_pb = TRUE; #endif @@ -1371,7 +1372,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") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTINSERT, FAIL, "can't insert entry in skip list"); assert(H5SL_count(page_buf->slist_ptr) * page_buf->page_size <= page_buf->max_size); /* Increment appropriate page count */ @@ -1457,7 +1458,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type) /* Remove from page index */ if (NULL == H5SL_remove(page_buf->slist_ptr, &(page_entry->addr))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, "Tail Page Entry is not in skip list") + HGOTO_ERROR(H5E_PAGEBUF, H5E_BADVALUE, FAIL, "Tail Page Entry is not in skip list"); /* Remove entry from LRU list */ H5PB__REMOVE_LRU(page_buf, page_entry) @@ -1472,7 +1473,7 @@ H5PB__make_space(H5F_shared_t *f_sh, H5PB_t *page_buf, H5FD_mem_t inserted_type) /* Flush page if dirty */ if (page_entry->is_dirty) if (H5PB__write_entry(f_sh, page_entry) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed"); /* Update statistics */ if (page_entry->type == H5F_MEM_PAGE_DRAW || H5F_MEM_PAGE_GHEAP == page_entry->type) @@ -1514,7 +1515,7 @@ H5PB__write_entry(H5F_shared_t *f_sh, H5PB_entry_t *page_entry) /* Retrieve the 'eoa' for the file */ if (HADDR_UNDEF == (eoa = H5F_shared_get_eoa(f_sh, (H5FD_mem_t)page_entry->type))) - HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTGET, FAIL, "driver get_eoa request failed"); /* If the starting address of the page is larger than * the EOA, then the entire page is discarded without writing. @@ -1532,7 +1533,7 @@ H5PB__write_entry(H5F_shared_t *f_sh, H5PB_entry_t *page_entry) if (H5FD_write(file, (H5FD_mem_t)page_entry->type, page_entry->addr, page_size, page_entry->page_buf_ptr) < 0) - HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed") + HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, "file write failed"); } /* end if */ page_entry->is_dirty = FALSE; diff --git a/src/H5PL.c b/src/H5PL.c index 5747fb1..c7c3df3 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -81,7 +81,7 @@ H5PLset_loading_state(unsigned int plugin_control_mask) /* Set the plugin control mask */ if (H5PL__set_plugin_control_mask(plugin_control_mask) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "error setting plugin control mask") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "error setting plugin control mask"); done: FUNC_LEAVE_API(ret_value) @@ -112,11 +112,11 @@ H5PLget_loading_state(unsigned *plugin_control_mask /*out*/) H5TRACE1("e", "x", plugin_control_mask); if (NULL == plugin_control_mask) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_control_mask parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_control_mask parameter cannot be NULL"); /* Set the plugin control mask */ if (H5PL__get_plugin_control_mask(plugin_control_mask) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error getting plugin control mask") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error getting plugin control mask"); done: FUNC_LEAVE_API(ret_value) @@ -142,13 +142,13 @@ H5PLappend(const char *search_path) /* Check args */ if (NULL == search_path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL"); if (0 == HDstrlen(search_path)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero"); /* Append the search path to the path table */ if (H5PL__append_path(search_path) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTAPPEND, FAIL, "unable to append search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTAPPEND, FAIL, "unable to append search path"); done: FUNC_LEAVE_API(ret_value) @@ -174,13 +174,13 @@ H5PLprepend(const char *search_path) /* Check args */ if (NULL == search_path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL"); if (0 == HDstrlen(search_path)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero"); /* Prepend the search path to the path table */ if (H5PL__prepend_path(search_path) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to prepend search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to prepend search path"); done: FUNC_LEAVE_API(ret_value) @@ -207,21 +207,21 @@ H5PLreplace(const char *search_path, unsigned int idx) /* Check args */ if (NULL == search_path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL"); if (0 == HDstrlen(search_path)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero"); /* Check index */ num_paths = H5PL__get_num_paths(); if (0 == num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty"); else if (idx >= num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + "index path out of bounds for table - can't be more than %u", (num_paths - 1)); /* Insert the search path into the path table */ if (H5PL__replace_path(search_path, idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path"); done: FUNC_LEAVE_API(ret_value) @@ -249,19 +249,19 @@ H5PLinsert(const char *search_path, unsigned int idx) /* Check args */ if (NULL == search_path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot be NULL"); if (0 == HDstrlen(search_path)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_path parameter cannot have length zero"); /* Check index */ num_paths = H5PL__get_num_paths(); if ((0 != num_paths) && (idx >= num_paths)) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + "index path out of bounds for table - can't be more than %u", (num_paths - 1)); /* Insert the search path into the path table */ if (H5PL__insert_path(search_path, idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path"); done: FUNC_LEAVE_API(ret_value) @@ -292,14 +292,14 @@ H5PLremove(unsigned int idx) /* Check index */ num_paths = H5PL__get_num_paths(); if (0 == num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty"); else if (idx >= num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + "index path out of bounds for table - can't be more than %u", (num_paths - 1)); /* Delete the search path from the path table */ if (H5PL__remove_path(idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "unable to remove search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "unable to remove search path"); done: FUNC_LEAVE_API(ret_value) @@ -343,18 +343,18 @@ H5PLget(unsigned int idx, char *path_buf, size_t buf_size) /* Check index */ num_paths = H5PL__get_num_paths(); if (0 == num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty"); else if (idx >= num_paths) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "index path out of bounds for table - can't be more than %u", (num_paths - 1)) + "index path out of bounds for table - can't be more than %u", (num_paths - 1)); /* Check if the search table is empty */ if (H5PL__get_num_paths() == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, (-1), "plugin search path table is empty") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, (-1), "plugin search path table is empty"); /* Get the path at the specified index and its length */ if (NULL == (path = H5PL__get_path(idx))) - HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, (-1), "no path stored at that index") + HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, (-1), "no path stored at that index"); path_len = HDstrlen(path); /* If the path buffer is not NULL, copy the path to the buffer */ @@ -391,7 +391,7 @@ H5PLsize(unsigned int *num_paths) /* Check arguments */ if (!num_paths) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "num_paths parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "num_paths parameter cannot be NULL"); /* Get the number of stored plugin paths */ *num_paths = H5PL__get_num_paths(); diff --git a/src/H5PLint.c b/src/H5PLint.c index a169ec9..73be42a 100644 --- a/src/H5PLint.c +++ b/src/H5PLint.c @@ -148,11 +148,11 @@ H5PL_init(void) /* Create the table of previously-loaded plugins */ if (H5PL__create_plugin_cache() < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, FAIL, "can't create plugin cache") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, FAIL, "can't create plugin cache"); /* Create the table of search paths for dynamic libraries */ if (H5PL__create_path_table() < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, FAIL, "can't create plugin search path table") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINIT, FAIL, "can't create plugin search path table"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -183,13 +183,13 @@ H5PL_term_package(void) * We need to bump the return value if we did any real work here. */ if (H5PL__close_plugin_cache(&already_closed) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, (-1), "problem closing plugin cache") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, (-1), "problem closing plugin cache"); if (!already_closed) ret_value++; /* Close the search path table and free the paths */ if (H5PL__close_path_table() < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, (-1), "problem closing search path table") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, (-1), "problem closing search path table"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -223,24 +223,24 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key) switch (type) { case H5PL_TYPE_FILTER: if ((H5PL_plugin_control_mask_g & H5PL_FILTER_PLUGIN) == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "filter plugins disabled") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "filter plugins disabled"); break; case H5PL_TYPE_VOL: if ((H5PL_plugin_control_mask_g & H5PL_VOL_PLUGIN) == 0) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, - "Virtual Object Layer (VOL) driver plugins disabled") + "Virtual Object Layer (VOL) driver plugins disabled"); break; case H5PL_TYPE_VFD: if ((H5PL_plugin_control_mask_g & H5PL_VFD_PLUGIN) == 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "Virtual File Driver (VFD) plugins disabled") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "Virtual File Driver (VFD) plugins disabled"); break; case H5PL_TYPE_ERROR: case H5PL_TYPE_NONE: default: - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "Invalid plugin type specified") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "Invalid plugin type specified"); } /* Set up the search parameters */ @@ -249,14 +249,14 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key) /* Search in the table of already loaded plugin libraries */ if (H5PL__find_plugin_in_cache(&search_params, &found, &plugin_info) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in plugin cache failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "search in plugin cache failed"); /* If not found, try iterating through the path table to find an appropriate plugin */ if (!found) if (H5PL__find_plugin_in_path_table(&search_params, &found, &plugin_info) < 0) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, NULL, "can't find plugin in the paths either set by HDF5_PLUGIN_PATH, or default location, " - "or set by H5PLxxx functions") + "or set by H5PLxxx functions"); /* Set the return value we found the plugin */ if (found) @@ -264,7 +264,7 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key) else HGOTO_ERROR(H5E_PLUGIN, H5E_NOTFOUND, NULL, "can't find plugin. Check either HDF5_VOL_CONNECTOR, HDF5_PLUGIN_PATH, default location, " - "or path set by H5PLxxx functions") + "or path set by H5PLxxx functions"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -373,7 +373,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s /* Get the plugin info */ if (NULL == (filter_info = (const H5Z_class2_t *)(*get_plugin_info)())) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get filter info from plugin") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get filter info from plugin"); /* Setup temporary plugin key if one wasn't supplied */ if (!key) { @@ -397,7 +397,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s /* Get the plugin info */ if (NULL == (cls = (const void *)(*get_plugin_info)())) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VOL connector info from plugin") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VOL connector info from plugin"); /* Setup temporary plugin key if one wasn't supplied */ if (!key) { @@ -408,7 +408,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s /* Ask VOL interface if this class is the one we are looking for and is compatible, etc */ if (H5VL_check_plugin_load(cls, key, success) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VOL connector compatibility check failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VOL connector compatibility check failed"); /* Check for finding the correct plugin */ if (*success) { @@ -425,7 +425,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s /* Get the plugin info */ if (NULL == (cls = (const void *)(*get_plugin_info)())) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VFD info from plugin") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VFD info from plugin"); /* Setup temporary plugin key if one wasn't supplied */ if (!key) { @@ -436,7 +436,7 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s /* Ask VFD interface if this class is the one we are looking for and is compatible, etc */ if (H5FD_check_plugin_load(cls, key, success) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VFD compatibility check failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VFD compatibility check failed"); /* Check for finding the correct plugin */ if (*success) { @@ -451,13 +451,13 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s case H5PL_TYPE_ERROR: case H5PL_TYPE_NONE: default: - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "Invalid plugin type specified") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "Invalid plugin type specified"); } /* end switch */ /* If we found the correct plugin, store it in the cache */ if (*success) if (H5PL__add_plugin(loaded_plugin_type, key, handle)) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to add new plugin to plugin cache") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to add new plugin to plugin cache"); done: if (!(*success) && handle) diff --git a/src/H5PLpath.c b/src/H5PLpath.c index 5681c1f..82d5422 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -114,22 +114,22 @@ H5PL__insert_at(const char *path, unsigned int idx) /* Expand the table if it is full */ if (H5PL_num_paths_g == H5PL_path_capacity_g) if (H5PL__expand_path_table() < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't expand path table") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't expand path table"); /* Copy the path for storage so the caller can dispose of theirs */ if (NULL == (path_copy = H5MM_strdup(path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't make internal copy of path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't make internal copy of path"); #ifdef H5_HAVE_WIN32_API /* Clean up Microsoft Windows environment variables in the path string */ if (H5_expand_windows_env_vars(&path_copy)) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTCONVERT, FAIL, "can't expand environment variable string") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTCONVERT, FAIL, "can't expand environment variable string"); #endif /* H5_HAVE_WIN32_API */ /* If the table entry is in use, make some space */ if (H5PL_paths_g[idx]) if (H5PL__make_space_at(idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "unable to make space in the table for the new entry") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "unable to make space in the table for the new entry"); /* Insert the copy of the search path into the table at the specified index */ H5PL_paths_g[idx] = path_copy; @@ -194,16 +194,16 @@ H5PL__replace_at(const char *path, unsigned int idx) /* Check that the table entry is in use */ if (!H5PL_paths_g[idx]) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", idx) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTFREE, FAIL, "path entry at index %u in the table is NULL", idx); /* Copy the path for storage so the caller can dispose of theirs */ if (NULL == (path_copy = H5MM_strdup(path))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't make internal copy of path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't make internal copy of path"); #ifdef H5_HAVE_WIN32_API /* Clean up Microsoft Windows environment variables in the path string */ if (H5_expand_windows_env_vars(&path_copy)) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTCONVERT, FAIL, "can't expand environment variable string") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTCONVERT, FAIL, "can't expand environment variable string"); #endif /* H5_HAVE_WIN32_API */ /* Free the existing path entry */ @@ -243,7 +243,7 @@ H5PL__create_path_table(void) H5PL_num_paths_g = 0; H5PL_path_capacity_g = H5PL_INITIAL_PATH_CAPACITY; if (NULL == (H5PL_paths_g = (char **)H5MM_calloc((size_t)H5PL_path_capacity_g * sizeof(char *)))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path table") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path table"); /* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it * or from the default paths if it isn't set. @@ -255,7 +255,7 @@ H5PL__create_path_table(void) paths = H5MM_strdup(env_var); if (NULL == paths) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path copy") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path copy"); /* Separate the paths and store them */ next_path = HDstrtok_r(paths, H5PL_PATH_SEPARATOR, &lasts); @@ -263,7 +263,7 @@ H5PL__create_path_table(void) /* Insert the path into the table */ if (H5PL__append_path(next_path) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't insert path: %s", next_path) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't insert path: %s", next_path); /* Get the next path from the environment string */ next_path = HDstrtok_r(NULL, H5PL_PATH_SEPARATOR, &lasts); @@ -356,7 +356,7 @@ H5PL__expand_path_table(void) /* Resize the array */ if (NULL == (H5PL_paths_g = (char **)H5MM_realloc(H5PL_paths_g, (size_t)H5PL_path_capacity_g * sizeof(char *)))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for path table failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for path table failed"); /* Initialize the new memory */ memset(H5PL_paths_g + H5PL_num_paths_g, 0, (size_t)H5PL_PATH_CAPACITY_ADD * sizeof(char *)); @@ -391,7 +391,7 @@ H5PL__append_path(const char *path) /* Insert the path at the end of the table */ if (H5PL__insert_at(path, H5PL_num_paths_g) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to append search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to append search path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -419,7 +419,7 @@ H5PL__prepend_path(const char *path) /* Insert the path at the beginning of the table */ if (H5PL__insert_at(path, 0) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to prepend search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to prepend search path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -448,7 +448,7 @@ H5PL__replace_path(const char *path, unsigned int idx) /* Insert the path at the requested index */ if (H5PL__replace_at(path, idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to replace search path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -478,7 +478,7 @@ H5PL__insert_path(const char *path, unsigned int idx) /* Insert the path at the requested index */ if (H5PL__insert_at(path, idx) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTINSERT, FAIL, "unable to insert search path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -507,7 +507,7 @@ H5PL__remove_path(unsigned int idx) /* Check if the path at that index is set */ if (!H5PL_paths_g[idx]) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", idx) + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTDELETE, FAIL, "search path at index %u is NULL", idx); /* Delete the path */ H5PL_num_paths_g--; @@ -543,7 +543,7 @@ H5PL__get_path(unsigned int idx) /* Get the path at the requested index */ if (idx >= H5PL_num_paths_g) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", idx) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "path index %u is out of range in table", idx); return H5PL_paths_g[idx]; done: @@ -640,14 +640,14 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type 4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */ if (NULL == (path = (char *)H5MM_calloc(len))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path"); HDsnprintf(path, len, "%s/%s", plugin_path, dp->d_name); /* Get info for directory entry */ if (HDstat(path, &my_stat) == -1) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5_ITER_ERROR, "can't stat file %s -- error was: %s", path, - HDstrerror(errno)) + HDstrerror(errno)); /* If it is a directory, skip it */ if (S_ISDIR(my_stat.st_mode)) @@ -724,7 +724,7 @@ H5PL__path_table_iterate_process_path(const char *plugin_path, H5PL_iterate_type len = HDstrlen(plugin_path) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(fdFile.cFileName) + 1; if (NULL == (path = (char *)H5MM_calloc(len))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, H5_ITER_ERROR, "can't allocate memory for path"); HDsnprintf(path, len, "%s\\%s", plugin_path, fdFile.cFileName); @@ -806,7 +806,7 @@ H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool /* Break out if found */ if (*found) { if (!plugin_info) - HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, FAIL, "plugin info should not be NULL") + HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, FAIL, "plugin info should not be NULL"); break; } } @@ -854,7 +854,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo /* Open the directory */ if (!(dirp = HDopendir(dir))) HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory (%s). Please verify its existence", - dir) + dir); /* Iterate through all entries in the directory */ while (NULL != (dp = HDreaddir(dirp))) { @@ -877,14 +877,14 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo 4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */ if (NULL == (path = (char *)H5MM_calloc(len))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path"); HDsnprintf(path, len, "%s/%s", dir, dp->d_name); /* Get info for directory entry */ if (HDstat(path, &my_stat) == -1) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't stat file %s -- error was: %s", path, - HDstrerror(errno)) + HDstrerror(errno)); /* If it is a directory, skip it */ if (S_ISDIR(my_stat.st_mode)) { @@ -894,7 +894,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo /* attempt to open the dynamic library */ if (H5PL__open(path, search_params->type, search_params->key, found, NULL, plugin_info) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed"); if (*found) HGOTO_DONE(SUCCEED); @@ -936,7 +936,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo /* Specify a file mask. *.* = We want everything! */ HDsnprintf(service, sizeof(service), "%s\\*.dll", dir); if ((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE) - HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory") + HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory"); /* Loop over all the files */ do { @@ -951,7 +951,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(fdFile.cFileName) + 1; if (NULL == (path = (char *)H5MM_calloc(len))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path"); HDsnprintf(path, len, "%s\\%s", dir, fdFile.cFileName); @@ -961,7 +961,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo /* attempt to open the dynamic library */ if (H5PL__open(path, search_params->type, search_params->key, found, NULL, plugin_info) < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed"); if (*found) HGOTO_DONE(SUCCEED); diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c index 58b5b5b..e294dc7 100644 --- a/src/H5PLplugin_cache.c +++ b/src/H5PLplugin_cache.c @@ -109,7 +109,7 @@ H5PL__create_plugin_cache(void) if (NULL == (H5PL_cache_g = (H5PL_plugin_t *)H5MM_calloc((size_t)H5PL_cache_capacity_g * sizeof(H5PL_plugin_t)))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for plugin cache") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for plugin cache"); done: /* Try to clean up on errors */ @@ -183,7 +183,7 @@ H5PL__expand_cache(void) /* Resize the array */ if (NULL == (H5PL_cache_g = (H5PL_plugin_t *)H5MM_realloc(H5PL_cache_g, (size_t)H5PL_cache_capacity_g * sizeof(H5PL_plugin_t)))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for plugin cache failed") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "allocating additional memory for plugin cache failed"); /* Initialize the new memory */ memset(H5PL_cache_g + H5PL_num_plugins_g, 0, (size_t)H5PL_CACHE_CAPACITY_ADD * sizeof(H5PL_plugin_t)); @@ -215,7 +215,7 @@ H5PL__add_plugin(H5PL_type_t type, const H5PL_key_t *key, H5PL_HANDLE handle) /* Expand the cache if it is too small */ if (H5PL_num_plugins_g >= H5PL_cache_capacity_g) if (H5PL__expand_cache() < 0) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't expand plugin cache") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't expand plugin cache"); /* Store the plugin info and bump the # of plugins */ H5PL_cache_g[H5PL_num_plugins_g].type = type; @@ -329,7 +329,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f case H5PL_TYPE_ERROR: case H5PL_TYPE_NONE: default: - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "Invalid plugin type specified") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "Invalid plugin type specified"); } /* If the plugin type (filter, VOL connector, VFD plugin, etc.) and key match, @@ -342,11 +342,11 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f /* Get the "get plugin info" function from the plugin. */ if (NULL == (get_plugin_info_function = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC( H5PL_cache_g[u].handle, "H5PLget_plugin_info"))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info"); /* Call the "get plugin info" function */ if (NULL == (info = (*get_plugin_info_function)())) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get plugin info"); /* Set output parameters */ *found = TRUE; diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 2d3358b..1167fab 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -201,43 +201,43 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5D_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &rdcc_nslots, NULL, NULL, NULL, H5D_ACS_DATA_CACHE_NUM_SLOTS_ENC, H5D_ACS_DATA_CACHE_NUM_SLOTS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of raw data chunk cache(bytes) */ if (H5P__register_real(pclass, H5D_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5D_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &rdcc_nbytes, NULL, NULL, NULL, H5D_ACS_DATA_CACHE_BYTE_SIZE_ENC, H5D_ACS_DATA_CACHE_BYTE_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the preemption for reading chunks */ if (H5P__register_real(pclass, H5D_ACS_PREEMPT_READ_CHUNKS_NAME, H5D_ACS_PREEMPT_READ_CHUNKS_SIZE, &rdcc_w0, NULL, NULL, NULL, H5D_ACS_PREEMPT_READ_CHUNKS_ENC, H5D_ACS_PREEMPT_READ_CHUNKS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the VDS view option */ if (H5P__register_real(pclass, H5D_ACS_VDS_VIEW_NAME, H5D_ACS_VDS_VIEW_SIZE, &virtual_view, NULL, NULL, NULL, H5D_ACS_VDS_VIEW_ENC, H5D_ACS_VDS_VIEW_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the VDS printf gap */ if (H5P__register_real(pclass, H5D_ACS_VDS_PRINTF_GAP_NAME, H5D_ACS_VDS_PRINTF_GAP_SIZE, &printf_gap, NULL, NULL, NULL, H5D_ACS_VDS_PRINTF_GAP_ENC, H5D_ACS_VDS_PRINTF_GAP_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for vds prefix */ if (H5P__register_real(pclass, H5D_ACS_VDS_PREFIX_NAME, H5D_ACS_VDS_PREFIX_SIZE, &H5D_def_vds_prefix_g, NULL, H5D_ACS_VDS_PREFIX_SET, H5D_ACS_VDS_PREFIX_GET, H5D_ACS_VDS_PREFIX_ENC, H5D_ACS_VDS_PREFIX_DEC, H5D_ACS_VDS_PREFIX_DEL, H5D_ACS_VDS_PREFIX_COPY, H5D_ACS_VDS_PREFIX_CMP, H5D_ACS_VDS_PREFIX_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register info for append flush */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_ACS_APPEND_FLUSH_NAME, H5D_ACS_APPEND_FLUSH_SIZE, &H5D_def_append_flush_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for external file prefix */ if (H5P__register_real(pclass, H5D_ACS_EFILE_PREFIX_NAME, H5D_ACS_EFILE_PREFIX_SIZE, @@ -245,7 +245,7 @@ H5P__dacc_reg_prop(H5P_genclass_t *pclass) H5D_ACS_EFILE_PREFIX_ENC, H5D_ACS_EFILE_PREFIX_DEC, H5D_ACS_EFILE_PREFIX_DEL, H5D_ACS_EFILE_PREFIX_COPY, H5D_ACS_EFILE_PREFIX_CMP, H5D_ACS_EFILE_PREFIX_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -387,7 +387,7 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value) if (0 != len) { /* Make a copy of the user's prefix string */ if (NULL == (*vds_file_pref = (char *)H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix"); HDstrncpy(*vds_file_pref, *(const char **)pp, len); (*vds_file_pref)[len] = '\0'; @@ -627,7 +627,7 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value) if (0 != len) { /* Make a copy of the user's prefix string */ if (NULL == (*efile_pref = (char *)H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix"); HDstrncpy(*efile_pref, *(const char **)pp, len); (*efile_pref)[len] = '\0'; @@ -1076,15 +1076,15 @@ H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view) /* Check argument */ if ((view != H5D_VDS_FIRST_MISSING) && (view != H5D_VDS_LAST_AVAILABLE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ if (H5P_set(plist, H5D_ACS_VDS_VIEW_NAME, &view) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1112,12 +1112,12 @@ H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value from property list */ if (view) if (H5P_get(plist, H5D_ACS_VDS_VIEW_NAME, view) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1218,15 +1218,15 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) /* Check argument */ if (gap_size == HSIZE_UNDEF) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ if (H5P_set(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, &gap_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1255,12 +1255,12 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value from property list */ if (gap_size) if (H5P_get(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, gap_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1295,20 +1295,20 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D /* Check arguments */ if (0 == ndims) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality cannot be zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality cannot be zero"); if (ndims > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality is too large") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dimensionality is too large"); if (!boundary) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no boundary dimensions specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no boundary dimensions specified"); /* Check if the callback function is NULL and the user data is non-NULL. * This is almost certainly an error as the user data will not be used. */ if (!func && udata) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set up values */ info.ndims = ndims; @@ -1319,13 +1319,13 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D /* 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) */ - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all boundary dimensions must be less than 2^32") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all boundary dimensions must be less than 2^32"); info.boundary[u] = boundary[u]; /* Store user's boundary dimensions */ } /* end for */ /* Set values */ if (H5P_set(plist, H5D_ACS_APPEND_FLUSH_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set append flush") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set append flush"); done: FUNC_LEAVE_API(ret_value) @@ -1357,11 +1357,11 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve info for append flush */ if (H5P_get(plist, H5D_ACS_APPEND_FLUSH_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object flush callback") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object flush callback"); /* Assign return values */ if (boundary) { @@ -1407,11 +1407,11 @@ H5Pset_efile_prefix(hid_t plist_id, const char *prefix) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ if (H5P_set(plist, H5D_ACS_EFILE_PREFIX_NAME, &prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info"); done: FUNC_LEAVE_API(ret_value) @@ -1440,11 +1440,11 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ if (H5P_peek(plist, H5D_ACS_EFILE_PREFIX_NAME, &my_prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file prefix"); /* Check for prefix being set */ if (my_prefix) { @@ -1495,11 +1495,11 @@ H5Pset_virtual_prefix(hid_t plist_id, const char *prefix) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ if (H5P_set(plist, H5D_ACS_VDS_PREFIX_NAME, &prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info"); done: FUNC_LEAVE_API(ret_value) @@ -1530,11 +1530,11 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ if (H5P_peek(plist, H5D_ACS_VDS_PREFIX_NAME, &my_prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get vds file prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get vds file prefix"); /* Check for prefix being set */ if (my_prefix) { diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 2351a93..5254f6d 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -306,20 +306,20 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass) H5D_CRT_LAYOUT_SET, H5D_CRT_LAYOUT_GET, H5D_CRT_LAYOUT_ENC, H5D_CRT_LAYOUT_DEC, H5D_CRT_LAYOUT_DEL, H5D_CRT_LAYOUT_COPY, H5D_CRT_LAYOUT_CMP, H5D_CRT_LAYOUT_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the fill value property */ if (H5P__register_real(pclass, H5D_CRT_FILL_VALUE_NAME, H5D_CRT_FILL_VALUE_SIZE, &H5D_def_fill_g, NULL, H5D_CRT_FILL_VALUE_SET, H5D_CRT_FILL_VALUE_GET, H5D_CRT_FILL_VALUE_ENC, H5D_CRT_FILL_VALUE_DEC, H5D_CRT_FILL_VALUE_DEL, H5D_CRT_FILL_VALUE_COPY, H5D_CRT_FILL_VALUE_CMP, H5D_CRT_FILL_VALUE_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the space allocation time state property */ if (H5P__register_real(pclass, H5D_CRT_ALLOC_TIME_STATE_NAME, H5D_CRT_ALLOC_TIME_STATE_SIZE, &H5D_def_alloc_time_state_g, NULL, NULL, NULL, H5D_CRT_ALLOC_TIME_STATE_ENC, H5D_CRT_ALLOC_TIME_STATE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the external file list property */ if (H5P__register_real(pclass, H5D_CRT_EXT_FILE_LIST_NAME, H5D_CRT_EXT_FILE_LIST_SIZE, &H5D_def_efl_g, @@ -327,13 +327,13 @@ H5P__dcrt_reg_prop(H5P_genclass_t *pclass) H5D_CRT_EXT_FILE_LIST_ENC, H5D_CRT_EXT_FILE_LIST_DEC, H5D_CRT_EXT_FILE_LIST_DEL, H5D_CRT_EXT_FILE_LIST_COPY, H5D_CRT_EXT_FILE_LIST_CMP, H5D_CRT_EXT_FILE_LIST_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the object header minimization property */ if (H5P__register_real(pclass, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, H5D_CRT_MIN_DSET_HDR_SIZE_SIZE, &H5O_ohdr_min_g, NULL, NULL, NULL, H5D_CRT_MIN_DSET_HDR_SIZE_ENC, H5D_CRT_MIN_DSET_HDR_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -364,7 +364,7 @@ H5P__dcrt_layout_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout"); /* Copy new layout message over old one */ *layout = new_layout; @@ -398,7 +398,7 @@ H5P__dcrt_layout_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout"); /* Copy new layout message over old one */ *layout = new_layout; @@ -481,14 +481,14 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) tmp_size = (size_t)-1; tmp_p = *pp; if (H5S_encode(layout->storage.u.virt.list[u].source_select, pp, &tmp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection"); *size += (size_t)(*pp - tmp_p); /* Virtual dataset selection. Same notes as above apply. */ tmp_size = (size_t)-1; tmp_p = *pp; if (H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, pp, &tmp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection"); *size += (size_t)(*pp - tmp_p); } /* end for */ } /* end if */ @@ -521,7 +521,7 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) tmp_size = (size_t)0; tmp_p = NULL; if (H5S_encode(layout->storage.u.virt.list[u].source_select, &tmp_p, &tmp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize source selection"); *size += tmp_size; /* Virtual dataset selection */ @@ -529,7 +529,7 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size) tmp_p = NULL; if (H5S_encode(layout->storage.u.virt.list[u].source_dset.virtual_select, &tmp_p, &tmp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to serialize virtual selection"); *size += tmp_size; } /* end for */ } /* end if */ @@ -625,7 +625,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) /* Allocate entry list */ if (NULL == (tmp_layout.storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc( (size_t)nentries * sizeof(H5O_storage_virtual_ent_t)))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate heap block") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate heap block"); tmp_layout.storage.u.virt.list_nalloc = (size_t)nentries; tmp_layout.storage.u.virt.list_nused = (size_t)nentries; @@ -636,7 +636,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) if (NULL == (tmp_layout.storage.u.virt.list[u].source_file_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, - "unable to allocate memory for source file name") + "unable to allocate memory for source file name"); H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_file_name, *pp, tmp_size); *pp += tmp_size; @@ -645,19 +645,19 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) if (NULL == (tmp_layout.storage.u.virt.list[u].source_dset_name = (char *)H5MM_malloc(tmp_size))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, - "unable to allocate memory for source dataset name") + "unable to allocate memory for source dataset name"); H5MM_memcpy(tmp_layout.storage.u.virt.list[u].source_dset_name, *pp, tmp_size); *pp += tmp_size; /* Source selection */ if (NULL == (tmp_layout.storage.u.virt.list[u].source_select = H5S_decode(pp))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode source space selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode source space selection"); tmp_layout.storage.u.virt.list[u].source_space_status = H5O_VIRTUAL_STATUS_USER; /* Virtual selection */ if (NULL == (tmp_layout.storage.u.virt.list[u].source_dset.virtual_select = H5S_decode(pp))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode virtual space selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode virtual space selection"); tmp_layout.storage.u.virt.list[u].virtual_space_status = H5O_VIRTUAL_STATUS_USER; /* Parse source file and dataset names for "printf" @@ -667,13 +667,13 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) &tmp_layout.storage.u.virt.list[u].parsed_source_file_name, &tmp_layout.storage.u.virt.list[u].psfn_static_strlen, &tmp_layout.storage.u.virt.list[u].psfn_nsubs) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name"); if (H5D_virtual_parse_source_name( tmp_layout.storage.u.virt.list[u].source_dset_name, &tmp_layout.storage.u.virt.list[u].parsed_source_dset_name, &tmp_layout.storage.u.virt.list[u].psdn_static_strlen, &tmp_layout.storage.u.virt.list[u].psdn_nsubs) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name"); /* Set source names in source_dset struct */ if ((tmp_layout.storage.u.virt.list[u].psfn_nsubs == 0) && @@ -713,7 +713,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) /* Update min_dims */ if (H5D_virtual_update_min_dims(&tmp_layout, u) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, - "unable to update virtual dataset minimum dimensions") + "unable to update virtual dataset minimum dimensions"); } /* end for */ /* Point at the newly set up struct */ @@ -725,7 +725,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad layout type") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad layout type"); } /* end switch */ /* Set the value */ @@ -758,7 +758,7 @@ H5P__dcrt_layout_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *na /* Reset the old layout */ if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -787,7 +787,7 @@ H5P__dcrt_layout_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz /* Make copy of layout */ if (NULL == H5O_msg_copy(H5O_LAYOUT_ID, layout, &new_layout)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy layout"); /* Set new layout message directly into property list */ *layout = new_layout; @@ -948,7 +948,7 @@ H5P__dcrt_layout_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED si /* Reset the old layout */ if (H5O_msg_reset(H5O_LAYOUT_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -979,7 +979,7 @@ H5P__dcrt_fill_value_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED /* Make copy of fill value */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value"); /* Copy new fill value message over old one */ *fill = new_fill; @@ -1013,7 +1013,7 @@ H5P__dcrt_fill_value_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED /* Make copy of fill value */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value"); /* Copy new fill value message over old one */ *fill = new_fill; @@ -1070,7 +1070,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) assert(fill->type); if (H5T_encode(fill->type, NULL, &dt_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); /* Encode the size of a size_t */ enc_value = (uint64_t)dt_size; @@ -1084,7 +1084,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) UINT64ENCODE_VAR(*pp, enc_value, enc_size); if (H5T_encode(fill->type, *pp, &dt_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); *pp += dt_size; } /* end if */ } /* end if */ @@ -1101,7 +1101,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size) /* Get the size of the encoded datatype */ assert(fill->type); if (H5T_encode(fill->type, NULL, &dt_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); enc_value = (uint64_t)dt_size; enc_size = H5VM_limit_enc_size(enc_value); } @@ -1155,7 +1155,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value) /* Allocate fill buffer and copy the contents in it */ if (NULL == (fill->buf = H5MM_malloc((size_t)fill->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for fill value buffer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for fill value buffer"); H5MM_memcpy((uint8_t *)fill->buf, *pp, (size_t)fill->size); *pp += fill->size; @@ -1168,7 +1168,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value) /* Decode type */ if (NULL == (fill->type = H5T_decode(dt_size, *pp))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode fill value datatype") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode fill value datatype"); *pp += dt_size; } /* end if */ @@ -1199,7 +1199,7 @@ H5P__dcrt_fill_value_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED /* Reset the old fill value message */ if (H5O_msg_reset(H5O_FILL_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release fill value message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release fill value message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1228,7 +1228,7 @@ H5P__dcrt_fill_value_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED /* Make copy of fill value message */ if (NULL == H5O_msg_copy(H5O_FILL_ID, fill, &new_fill)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy fill value"); /* Set new fill value message directly into property list */ *fill = new_fill; @@ -1326,7 +1326,7 @@ H5P__dcrt_fill_value_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE /* Reset the old fill value message */ if (H5O_msg_reset(H5O_FILL_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release fill value message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release fill value message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1357,7 +1357,7 @@ H5P__dcrt_ext_file_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU /* Make copy of external file list */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list"); /* Copy new external file list message over old one */ *efl = new_efl; @@ -1391,7 +1391,7 @@ H5P__dcrt_ext_file_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU /* Make copy of external file list */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list"); /* Copy new external file list message over old one */ *efl = new_efl; @@ -1530,7 +1530,7 @@ H5P__dcrt_ext_file_list_dec(const void **_pp, void *_value) size_t na = efl->nalloc + H5O_EFL_ALLOC; H5O_efl_entry_t *x = (H5O_efl_entry_t *)H5MM_realloc(efl->slot, na * sizeof(H5O_efl_entry_t)); if (!x) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed"); efl->nalloc = na; efl->slot = x; @@ -1589,7 +1589,7 @@ H5P__dcrt_ext_file_list_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU /* Reset the old efl message */ if (H5O_msg_reset(H5O_EFL_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release external file list message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release external file list message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1618,7 +1618,7 @@ H5P__dcrt_ext_file_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU /* Make copy of efl message */ if (NULL == H5O_msg_copy(H5O_EFL_ID, efl, &new_efl)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy external file list"); /* Set new efl message directly into property list */ *efl = new_efl; @@ -1732,7 +1732,7 @@ H5P__dcrt_ext_file_list_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UN /* Reset the old efl message */ if (H5O_msg_reset(H5O_EFL_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release external file list message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release external file list message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1757,7 +1757,7 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) /* Get the allocation time state */ if (H5P_get(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get space allocation time state") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get space allocation time state"); /* If we still have the "default" allocation time, change it according to the new layout */ if (alloc_time_state) { @@ -1765,7 +1765,7 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) /* Get current fill value info */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Set the default based on layout */ switch (layout->type) { @@ -1785,17 +1785,17 @@ H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type"); } /* end switch */ /* Set updated fill value info */ if (H5P_poke(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set space allocation time") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set space allocation time"); } /* end if */ /* Set layout value */ if (H5P_set(plist, H5D_CRT_LAYOUT_NAME, layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1822,11 +1822,11 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type) /* Check arguments */ if (layout_type < 0 || layout_type >= H5D_NLAYOUTS) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "raw data layout method is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "raw data layout method is not valid"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get pointer to correct default layout */ switch (layout_type) { @@ -1849,12 +1849,12 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type"); } /* end switch */ /* Set value */ if (H5P__set_layout(plist, layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout"); done: FUNC_LEAVE_API(ret_value) @@ -1883,11 +1883,11 @@ H5Pget_layout(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5D_LAYOUT_ERROR, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5D_LAYOUT_ERROR, "can't find object for ID"); /* Peek at layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_LAYOUT_ERROR, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5D_LAYOUT_ERROR, "can't get layout"); /* Set return value */ ret_value = layout.type; @@ -1924,11 +1924,11 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) /* Check arguments */ if (ndims <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk dimensionality must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk dimensionality must be positive"); if (ndims > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk dimensionality is too large") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "chunk dimensionality is too large"); if (!dim) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no chunk dimensions specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no chunk dimensions specified"); /* Verify & initialize property's chunk dims */ H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g)); @@ -1936,23 +1936,23 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) chunk_nelmts = 1; for (u = 0; u < (unsigned)ndims; u++) { if (dim[u] == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all chunk dimensions must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all chunk dimensions must be positive"); if (dim[u] != (dim[u] & 0xffffffff)) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all chunk dimensions must be less than 2^32") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all chunk dimensions must be less than 2^32"); chunk_nelmts *= dim[u]; if (chunk_nelmts > (uint64_t)0xffffffff) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "number of elements in chunk must be < 4GB") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "number of elements in chunk must be < 4GB"); chunk_layout.u.chunk.dim[u] = (uint32_t)dim[u]; /* Store user's chunk dimensions */ } /* end for */ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set chunk information in property list */ chunk_layout.u.chunk.ndims = (unsigned)ndims; if (H5P__set_layout(plist, &chunk_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout"); done: FUNC_LEAVE_API(ret_value) @@ -1984,13 +1984,13 @@ H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Peek at the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_CHUNKED != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout"); if (dim) { unsigned u; /* Local index variable */ @@ -2043,25 +2043,25 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const /* Check arguments */ if (!src_file_name) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "source file name not provided") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "source file name not provided"); if (!src_dset_name) - HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "source dataset name not provided") + HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "source dataset name not provided"); if (NULL == (vspace = (H5S_t *)H5I_object_verify(vspace_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataspace"); /* Check selections for validity */ if (H5D_virtual_check_mapping_pre(vspace, src_space, H5O_VIRTUAL_STATUS_USER) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "invalid mapping selections") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "invalid mapping selections"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current layout */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout"); retrieved_layout = TRUE; /* If the layout was not already virtual, Start with default virtual layout. @@ -2072,7 +2072,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const else { /* Reset the old layout */ if (H5O_msg_reset(H5O_LAYOUT_ID, &virtual_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release layout message"); /* Copy the default virtual layout */ H5MM_memcpy(&virtual_layout, &H5D_def_layout_virtual_g, sizeof(H5D_def_layout_virtual_g)); @@ -2089,7 +2089,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const /* Expand size of entry list */ if (NULL == (x = (H5O_storage_virtual_ent_t *)H5MM_realloc( virtual_layout.storage.u.virt.list, new_alloc * sizeof(H5O_storage_virtual_ent_t)))) - HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't reallocate virtual dataset mapping list") + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't reallocate virtual dataset mapping list"); virtual_layout.storage.u.virt.list = x; virtual_layout.storage.u.virt.list_nalloc = new_alloc; } /* end if */ @@ -2098,19 +2098,19 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const ent = &virtual_layout.storage.u.virt.list[virtual_layout.storage.u.virt.list_nused]; 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); if (NULL == (ent->source_file_name = H5MM_xstrdup(src_file_name))) - HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name"); if (NULL == (ent->source_dset_name = H5MM_xstrdup(src_dset_name))) - HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name") + HGOTO_ERROR(H5E_PLIST, H5E_RESOURCE, FAIL, "can't duplicate source file name"); if (NULL == (ent->source_select = H5S_copy(src_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection"); if (H5D_virtual_parse_source_name(ent->source_file_name, &ent->parsed_source_file_name, &ent->psfn_static_strlen, &ent->psfn_nsubs) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source file name"); if (H5D_virtual_parse_source_name(ent->source_dset_name, &ent->parsed_source_dset_name, &ent->psdn_static_strlen, &ent->psdn_nsubs) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't parse source dataset name"); if ((ent->psfn_nsubs == 0) && (ent->psdn_nsubs == 0)) { if (ent->parsed_source_file_name) ent->source_dset.file_name = ent->parsed_source_file_name->name_segment; @@ -2136,11 +2136,11 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const /* Check entry for validity */ if (H5D_virtual_check_mapping_post(ent) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid mapping entry") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid mapping entry"); /* Update min_dims */ if (H5D_virtual_update_min_dims(&virtual_layout, virtual_layout.storage.u.virt.list_nused) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to update virtual dataset minimum dimensions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to update virtual dataset minimum dimensions"); /* Finish adding entry */ virtual_layout.storage.u.virt.list_nused++; @@ -2208,13 +2208,13 @@ H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/) if (count) { /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_VIRTUAL != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout"); /* Return the number of mappings */ *count = layout.storage.u.virt.list_nused; @@ -2250,24 +2250,24 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_VIRTUAL != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout"); /* Get the virtual space */ if (idx >= layout.storage.u.virt.list_nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)"); 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy virtual selection"); /* Register ID */ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace"); done: /* Free space on failure */ @@ -2304,17 +2304,17 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_VIRTUAL != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout"); /* Check index */ if (idx >= layout.storage.u.virt.list_nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)"); 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 @@ -2330,11 +2330,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) /* Get rank of source space */ if ((rank = H5S_GET_EXTENT_NDIMS(layout.storage.u.virt.list[idx].source_select)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get source space rank") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get source space rank"); /* Get bounds of selection */ if (H5S_SELECT_BOUNDS(layout.storage.u.virt.list[idx].source_select, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection bounds") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection bounds"); /* Adjust bounds to extent */ for (i = 0; i < rank; i++) @@ -2343,7 +2343,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) /* Set extent */ if (H5S_set_extent_simple(layout.storage.u.virt.list[idx].source_select, (unsigned)rank, bounds_end, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set source space extent") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set source space extent"); /* Update source space status */ layout.storage.u.virt.list[idx].source_space_status = H5O_VIRTUAL_STATUS_SEL_BOUNDS; @@ -2351,11 +2351,11 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx) /* Get the source space */ if (NULL == (space = H5S_copy(layout.storage.u.virt.list[idx].source_select, FALSE, TRUE))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy source selection"); /* Register ID */ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace"); done: /* Free space on failure */ @@ -2404,17 +2404,17 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_VIRTUAL != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout"); /* Get the virtual filename */ if (idx >= layout.storage.u.virt.list_nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)"); 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)) @@ -2462,17 +2462,17 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_VIRTUAL != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a virtual storage layout"); /* Get the virtual filename */ if (idx >= layout.storage.u.virt.list_nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid index (out of range)"); 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)) @@ -2506,17 +2506,17 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options) /* Check arguments */ if (options & ~(H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unknown chunk options") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unknown chunk options"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_CHUNKED != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout"); /* Translate options into flags that can be used with the layout message */ if (options & H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) @@ -2531,7 +2531,7 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options) /* Set layout value */ if (H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set layout"); done: FUNC_LEAVE_API(ret_value) @@ -2558,13 +2558,13 @@ H5Pget_chunk_opts(hid_t plist_id, unsigned *options /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the layout property */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't get layout"); if (H5D_CHUNKED != layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a chunked storage layout"); if (options) { /* Translate options from flags that can be used with the layout message @@ -2612,24 +2612,24 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); if (offset < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative external file offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative external file offset"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list"); if (efl.nused > 0 && H5O_EFL_UNLIMITED == efl.slot[efl.nused - 1].size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "previous file size is unlimited") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "previous file size is unlimited"); if (H5O_EFL_UNLIMITED != size) { for (idx = 0, total = size; idx < efl.nused; idx++, total = tmp) { tmp = total + efl.slot[idx].size; if (tmp <= total) - HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "total external data size overflowed") + HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "total external data size overflowed"); } /* end for */ } /* end if */ @@ -2639,7 +2639,7 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size) H5O_efl_entry_t *x = (H5O_efl_entry_t *)H5MM_realloc(efl.slot, na * sizeof(H5O_efl_entry_t)); if (!x) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed"); efl.nalloc = na; efl.slot = x; } /* end if */ @@ -2651,7 +2651,7 @@ H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size) efl.nused++; if (H5P_poke(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set external file list"); done: FUNC_LEAVE_API(ret_value) @@ -2680,11 +2680,11 @@ H5Pget_external_count(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list"); /* Set return value */ ret_value = (int)efl.nused; @@ -2727,14 +2727,14 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list"); if (idx >= efl.nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "external file index is out of range") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "external file index is out of range"); /* Return values */ if (name_size > 0 && name) @@ -2783,20 +2783,20 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block) H5TRACE3("e", "iIuIu", plist_id, options_mask, pixels_per_block); if (H5Z_get_filter_info(H5Z_FILTER_SZIP, &config_flags) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't get filter info") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't get filter info"); if (!(config_flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED)) - HGOTO_ERROR(H5E_PLINE, H5E_NOENCODER, FAIL, "Filter present but encoding is disabled.") + HGOTO_ERROR(H5E_PLINE, H5E_NOENCODER, FAIL, "Filter present but encoding is disabled."); /* Check arguments */ if ((pixels_per_block % 2) == 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is not even") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is not even"); if (pixels_per_block > H5_SZIP_MAX_PIXELS_PER_BLOCK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is too large") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is too large"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Always set K13 compression (and un-set CHIP compression) */ options_mask &= (unsigned)(~H5_SZIP_CHIP_OPTION_MASK); @@ -2815,11 +2815,11 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block) /* Add the filter */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); if (H5Z_append(&pline, H5Z_FILTER_SZIP, H5Z_FLAG_OPTIONAL, (size_t)2, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add szip filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add szip filter to pipeline"); if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -2848,19 +2848,19 @@ H5Pset_shuffle(hid_t plist_id) /* Check arguments */ if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Add the filter */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); if (H5Z_append(&pline, H5Z_FILTER_SHUFFLE, H5Z_FLAG_OPTIONAL, (size_t)0, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to shuffle the data") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to shuffle the data"); if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -2887,19 +2887,19 @@ H5Pset_nbit(hid_t plist_id) /* Check arguments */ if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Add the nbit filter */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); if (H5Z_append(&pline, H5Z_FILTER_NBIT, H5Z_FLAG_OPTIONAL, (size_t)0, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add nbit filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add nbit filter to pipeline"); if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -2943,16 +2943,16 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac /* Check arguments */ if (TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); if (scale_factor < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "scale factor must be >= 0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "scale factor must be >= 0"); if (scale_type != H5Z_SO_FLOAT_DSCALE && scale_type != H5Z_SO_FLOAT_ESCALE && scale_type != H5Z_SO_INT) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid scale type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid scale type"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set parameters for the filter * scale_type = 0: floating-point type, filter uses variable-minimum-bits method, @@ -2967,11 +2967,11 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac /* Add the scaleoffset filter */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); if (H5Z_append(&pline, H5Z_FILTER_SCALEOFFSET, H5Z_FLAG_OPTIONAL, (size_t)2, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add scaleoffset filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add scaleoffset filter to pipeline"); if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -3003,11 +3003,11 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current fill value */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Release the dynamic fill value components */ H5O_fill_reset_dyn(&fill); @@ -3018,20 +3018,20 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value) /* Retrieve pointer to datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Set the fill value */ if (NULL == (fill.type = H5T_copy(type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy datatype") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy datatype"); fill.size = (ssize_t)H5T_get_size(type); if (NULL == (fill.buf = H5MM_malloc((size_t)fill.size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for fill value") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for fill value"); H5MM_memcpy(fill.buf, value, (size_t)fill.size); /* Set up type conversion function */ if (NULL == (tpath = H5T_path_find(type, type))) HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dest data types") + "unable to convert between src and dest data types"); /* If necessary, convert fill value datatypes (which copies VL components, etc.) */ if (!H5T_path_noop(tpath)) { @@ -3039,14 +3039,14 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value) /* Allocate a background buffer */ if (H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)fill.size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Convert the fill value */ if (H5T_convert(tpath, type_id, type_id, (size_t)1, (size_t)0, (size_t)0, fill.buf, bkg_buf) < 0) { if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); - HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); } /* end if */ /* Release the background buffer */ @@ -3059,7 +3059,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value) /* Update fill value in property list */ if (H5P_poke(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set fill value"); done: FUNC_LEAVE_API(ret_value) @@ -3098,9 +3098,9 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ * is undefined, also return error. */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); if (fill.size == -1) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "fill value is undefined") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "fill value is undefined"); /* Check for "default" fill value */ if (fill.size == 0) { @@ -3112,9 +3112,9 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ * Can we convert between the source and destination datatypes? */ if (NULL == (tpath = H5T_path_find(fill.type, type))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes"); if ((src_id = H5I_register(H5I_DATATYPE, H5T_copy(fill.type, H5T_COPY_TRANSIENT), FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype"); /* * Data type conversions are always done in place, so we need a buffer @@ -3124,21 +3124,21 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ if (H5T_get_size(type) >= H5T_get_size(fill.type)) { buf = value; if (H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(type)))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion"); } /* end if */ else { if (NULL == (buf = H5MM_calloc(H5T_get_size(fill.type)))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion"); if (H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(fill.type)))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion"); } /* end else */ H5MM_memcpy(buf, fill.buf, H5T_get_size(fill.type)); /* Do the conversion */ if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(type, H5T_COPY_ALL), FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy/register datatype"); if (H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "datatype conversion failed"); if (buf != value) H5MM_memcpy(value, buf, H5T_get_size(type)); @@ -3180,17 +3180,17 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/) /* Check arguments */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (!value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no fill value output buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no fill value output buffer"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the fill value */ if (H5P_get_fill_value(plist, type, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); done: FUNC_LEAVE_API(ret_value) @@ -3226,7 +3226,7 @@ H5P_is_fill_value_defined(const H5O_fill_t *fill, H5D_fill_value_t *status) *status = H5D_FILL_VALUE_USER_DEFINED; else { *status = H5D_FILL_VALUE_ERROR; - HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "invalid combination of fill-value info") + HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "invalid combination of fill-value info"); } /* end else */ done: @@ -3254,11 +3254,11 @@ H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status) /* Get the fill value struct */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Get the fill-value status */ if (H5P_is_fill_value_defined(&fill, status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3286,11 +3286,11 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the fill-value status */ if (H5P_fill_value_defined(plist, status) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't check fill value status"); done: FUNC_LEAVE_API(ret_value) @@ -3320,11 +3320,11 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) /* Check arguments */ if (alloc_time < H5D_ALLOC_TIME_DEFAULT || alloc_time > H5D_ALLOC_TIME_INCR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid allocation time setting") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid allocation time setting"); /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Check for resetting to default for layout type */ if (alloc_time == H5D_ALLOC_TIME_DEFAULT) { @@ -3332,7 +3332,7 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) /* Peek at the storage layout */ if (H5P_peek(plist, H5D_CRT_LAYOUT_NAME, &layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get layout"); /* Set the default based on layout */ switch (layout.type) { @@ -3355,7 +3355,7 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unknown layout type"); } /* end switch */ /* Reset the "state" of the allocation time property back to the "default" */ @@ -3367,16 +3367,16 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time) /* Retrieve previous fill value settings */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Update property value */ fill.alloc_time = alloc_time; /* Set values */ if (H5P_poke(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value"); if (H5P_set(plist, H5D_CRT_ALLOC_TIME_STATE_NAME, &alloc_time_state) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set space allocation time") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set space allocation time"); done: FUNC_LEAVE_API(ret_value) @@ -3408,11 +3408,11 @@ H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/) /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve fill value settings */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Set user's value */ *alloc_time = fill.alloc_time; @@ -3444,22 +3444,22 @@ H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time) /* Check arguments */ if (fill_time < H5D_FILL_TIME_ALLOC || fill_time > H5D_FILL_TIME_IFSET) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fill time setting") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fill time setting"); /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve previous fill value settings */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Update property value */ fill.fill_time = fill_time; /* Set values */ if (H5P_poke(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fill value"); done: FUNC_LEAVE_API(ret_value) @@ -3490,11 +3490,11 @@ H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/) /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve fill value settings */ if (H5P_peek(plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value"); /* Set user's value */ *fill_time = fill.fill_time; @@ -3530,14 +3530,14 @@ H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize /*out*/) H5TRACE2("e", "ix", dcpl_id, minimize); if (NULL == minimize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "receiving pointer cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "receiving pointer cannot be NULL"); plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); if (NULL == plist) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &setting) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get dset oh minimize flag value"); *minimize = setting; @@ -3572,13 +3572,13 @@ H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize) plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE); if (NULL == plist) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &prev_set) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get extant dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get extant dset oh minimize flag value"); if (H5P_poke(plist, H5D_CRT_MIN_DSET_HDR_SIZE_NAME, &minimize) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't get dset oh minimize flag value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't get dset oh minimize flag value"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c index 64073666..5c4e962 100644 --- a/src/H5Pdeprec.c +++ b/src/H5Pdeprec.c @@ -240,13 +240,13 @@ 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID"); assert(old_pclass == orig_pclass); /* Close the previous class */ if (H5P__close_class(orig_pclass) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, - "unable to close original property class after substitution") + "unable to close original property class after substitution"); } /* end if */ done: @@ -406,16 +406,16 @@ H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_s /* Check arguments. */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid property name"); if (size > 0 && value == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "properties >0 size must have default"); /* Create the new property list class */ if ((ret_value = H5P_insert(plist, name, size, value, prp_set, prp_get, NULL, NULL, prp_delete, prp_copy, NULL, prp_close)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to register property in plist"); done: FUNC_LEAVE_API(ret_value) @@ -453,12 +453,12 @@ H5Pget_version(hid_t plist_id, unsigned *super /*out*/, unsigned *freelist /*out /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (super) if (H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, super) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version"); if (freelist) *freelist = HDF5_FREESPACE_VERSION; /* (hard-wired) */ if (stab) @@ -507,7 +507,7 @@ H5Pencode1(hid_t plist_id, void *buf, size_t *nalloc) /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Call the internal encode routine */ if ((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0) @@ -541,7 +541,7 @@ H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t thresh H5TRACE3("e", "iFth", plist_id, strategy, threshold); if ((unsigned)in_strategy >= H5F_FILE_SPACE_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy"); /* * For 1.10.0 H5Pset_file_space: * If strategy is zero, the property is not changed; @@ -577,11 +577,11 @@ H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t thresh case H5F_FILE_SPACE_NTYPES: case H5F_FILE_SPACE_DEFAULT: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file space strategy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file space strategy"); } if (H5Pset_file_space_strategy(plist_id, new_strategy, new_persist, new_threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file space strategy") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file space strategy"); done: FUNC_LEAVE_API(ret_value) @@ -609,7 +609,7 @@ H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy /*out*/, hsize /* Get current file space info */ if (H5Pget_file_space_strategy(plist_id, &new_strategy, &new_persist, &new_threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space strategy") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space strategy"); /* Get value(s) */ if (strategy) { @@ -633,7 +633,7 @@ H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy /*out*/, hsize case H5F_FSPACE_STRATEGY_PAGE: case H5F_FSPACE_STRATEGY_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file space strategy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file space strategy"); } } diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index acb5cd0..6babaf9 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -317,164 +317,164 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5D_XFER_MAX_TEMP_BUF_NAME, H5D_XFER_MAX_TEMP_BUF_SIZE, &H5D_def_max_temp_buf_g, NULL, NULL, NULL, H5D_XFER_MAX_TEMP_BUF_ENC, H5D_XFER_MAX_TEMP_BUF_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the type conversion buffer property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_TCONV_BUF_NAME, H5D_XFER_TCONV_BUF_SIZE, &H5D_def_tconv_buf_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the background buffer property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_BKGR_BUF_NAME, H5D_XFER_BKGR_BUF_SIZE, &H5D_def_bkgr_buf_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the background buffer type property */ if (H5P__register_real(pclass, H5D_XFER_BKGR_BUF_TYPE_NAME, H5D_XFER_BKGR_BUF_TYPE_SIZE, &H5D_def_bkgr_buf_type_g, NULL, NULL, NULL, H5D_XFER_BKGR_BUF_TYPE_ENC, H5D_XFER_BKGR_BUF_TYPE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the B-Tree node splitting ratios property */ if (H5P__register_real(pclass, H5D_XFER_BTREE_SPLIT_RATIO_NAME, H5D_XFER_BTREE_SPLIT_RATIO_SIZE, H5D_def_btree_split_ratio_g, NULL, NULL, NULL, H5D_XFER_BTREE_SPLIT_RATIO_ENC, H5D_XFER_BTREE_SPLIT_RATIO_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the vlen allocation function property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_NAME, H5D_XFER_VLEN_ALLOC_SIZE, &H5D_def_vlen_alloc_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the vlen allocation information property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_VLEN_ALLOC_INFO_NAME, H5D_XFER_VLEN_ALLOC_INFO_SIZE, &H5D_def_vlen_alloc_info_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the vlen free function property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_VLEN_FREE_NAME, H5D_XFER_VLEN_FREE_SIZE, &H5D_def_vlen_free_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the vlen free information property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_VLEN_FREE_INFO_NAME, H5D_XFER_VLEN_FREE_INFO_SIZE, &H5D_def_vlen_free_info_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the vector size property */ if (H5P__register_real(pclass, H5D_XFER_HYPER_VECTOR_SIZE_NAME, H5D_XFER_HYPER_VECTOR_SIZE_SIZE, &H5D_def_hyp_vec_size_g, NULL, NULL, NULL, H5D_XFER_HYPER_VECTOR_SIZE_ENC, H5D_XFER_HYPER_VECTOR_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the I/O transfer mode properties */ if (H5P__register_real(pclass, H5D_XFER_IO_XFER_MODE_NAME, H5D_XFER_IO_XFER_MODE_SIZE, &H5D_def_io_xfer_mode_g, NULL, NULL, NULL, H5D_XFER_IO_XFER_MODE_ENC, H5D_XFER_IO_XFER_MODE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME, H5D_XFER_MPIO_COLLECTIVE_OPT_SIZE, &H5D_def_mpio_collective_opt_mode_g, NULL, NULL, NULL, H5D_XFER_MPIO_COLLECTIVE_OPT_ENC, H5D_XFER_MPIO_COLLECTIVE_OPT_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME, H5D_XFER_MPIO_CHUNK_OPT_HARD_SIZE, &H5D_def_mpio_chunk_opt_mode_g, NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_HARD_ENC, H5D_XFER_MPIO_CHUNK_OPT_HARD_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME, H5D_XFER_MPIO_CHUNK_OPT_NUM_SIZE, &H5D_def_mpio_chunk_opt_num_g, NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_NUM_ENC, H5D_XFER_MPIO_CHUNK_OPT_NUM_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME, H5D_XFER_MPIO_CHUNK_OPT_RATIO_SIZE, &H5D_def_mpio_chunk_opt_ratio_g, NULL, NULL, NULL, H5D_XFER_MPIO_CHUNK_OPT_RATIO_ENC, H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the chunk optimization mode property. */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_SIZE, &H5D_def_mpio_actual_chunk_opt_mode_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the actual I/O mode property. */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, &H5D_def_mpio_actual_io_mode_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the local cause of broken collective I/O */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &H5D_def_mpio_no_collective_cause_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the global cause of broken collective I/O */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &H5D_def_mpio_no_collective_cause_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the EDC property */ if (H5P__register_real(pclass, H5D_XFER_EDC_NAME, H5D_XFER_EDC_SIZE, &H5D_def_enable_edc_g, NULL, NULL, NULL, H5D_XFER_EDC_ENC, H5D_XFER_EDC_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the filter callback property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_FILTER_CB_NAME, H5D_XFER_FILTER_CB_SIZE, &H5D_def_filter_cb_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the type conversion callback property */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5D_XFER_CONV_CB_NAME, H5D_XFER_CONV_CB_SIZE, &H5D_def_conv_cb_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the data transform property */ if (H5P__register_real(pclass, H5D_XFER_XFORM_NAME, H5D_XFER_XFORM_SIZE, &H5D_def_xfer_xform_g, NULL, H5D_XFER_XFORM_SET, H5D_XFER_XFORM_GET, H5D_XFER_XFORM_ENC, H5D_XFER_XFORM_DEC, H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, H5D_XFER_XFORM_CMP, H5D_XFER_XFORM_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the dataset I/O selection property */ if (H5P__register_real(pclass, H5D_XFER_DSET_IO_SEL_NAME, H5D_XFER_DSET_IO_SEL_SIZE, &H5D_def_dset_io_sel_g, NULL, NULL, NULL, NULL, NULL, NULL, H5D_XFER_DSET_IO_SEL_COPY, H5D_XFER_DSET_IO_SEL_CMP, H5D_XFER_DSET_IO_SEL_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5D_XFER_SELECTION_IO_MODE_NAME, H5D_XFER_SELECTION_IO_MODE_SIZE, &H5D_def_selection_io_mode_g, NULL, NULL, NULL, H5D_XFER_SELECTION_IO_MODE_ENC, H5D_XFER_SELECTION_IO_MODE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the cause of no selection I/O property */ /* (Note: this property should not have an encode/decode callback) */ if (H5P__register_real(pclass, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME, H5D_XFER_NO_SELECTION_IO_CAUSE_SIZE, &H5D_def_no_selection_io_cause_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the modify write buffer property */ if (H5P__register_real(pclass, H5D_XFER_MODIFY_WRITE_BUF_NAME, H5D_XFER_MODIFY_WRITE_BUF_SIZE, &H5D_def_modify_write_buf_g, NULL, NULL, NULL, H5D_XFER_MODIFY_WRITE_BUF_ENC, H5D_XFER_MODIFY_WRITE_BUF_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -621,7 +621,7 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(double)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded"); /* Decode the left, middle & left B-tree split ratios */ H5_DECODE_DOUBLE(*pp, btree_split_ratio[0]); @@ -655,7 +655,7 @@ H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam /* Make copy of data transform */ if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -684,7 +684,7 @@ H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam /* Make copy of data transform */ if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -722,7 +722,7 @@ H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) if (NULL != data_xform_prop) { /* Get the transform expression */ if (NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression"); /* Get the transform string expression size */ len = HDstrlen(pexp) + 1; @@ -797,7 +797,7 @@ H5P__dxfr_xform_dec(const void **_pp, void *_value) if (0 != len) { if (NULL == (*data_xform_prop = H5Z_xform_create((const char *)*pp))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create data transform info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create data transform info"); *pp += len; } /* end if */ else @@ -827,7 +827,7 @@ H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *nam assert(value); if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -855,7 +855,7 @@ H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size /* Make copy of data transform */ if (H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -936,7 +936,7 @@ H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED siz assert(value); if (H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -963,27 +963,27 @@ H5Pset_data_transform(hid_t plist_id, const char *expression) /* Check arguments */ if (expression == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* See if a data transform is already set, and free it if it is */ if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression"); /* Destroy previous data transform property */ if (H5Z_xform_destroy(data_xform_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release data transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release data transform expression"); /* Create data transform info from expression */ if (NULL == (data_xform_prop = H5Z_xform_create(expression))) - HGOTO_ERROR(H5E_PLIST, H5E_NOSPACE, FAIL, "unable to create data transform info") + HGOTO_ERROR(H5E_PLIST, H5E_NOSPACE, FAIL, "unable to create data transform info"); /* Update property list (takes ownership of transform) */ if (H5P_poke(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Error setting data transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Error setting data transform expression"); done: if (ret_value < 0) @@ -1026,17 +1026,17 @@ H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression"); if (NULL == data_xform_prop) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "data transform has not been set") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "data transform has not been set"); /* Get the data transform string */ if (NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression"); /* Copy into application buffer */ len = HDstrlen(pexp); @@ -1081,19 +1081,19 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg) /* Check arguments */ if (size == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ if (H5P_set(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer buffer size"); if (H5P_set(plist, H5D_XFER_TCONV_BUF_NAME, &tconv) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer type conversion buffer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer type conversion buffer"); if (H5P_set(plist, H5D_XFER_BKGR_BUF_NAME, &bkg) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set background type conversion buffer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set background type conversion buffer"); done: FUNC_LEAVE_API(ret_value) @@ -1122,19 +1122,19 @@ H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, 0, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, 0, "can't find object for ID"); /* Return values */ if (tconv) if (H5P_get(plist, H5D_XFER_TCONV_BUF_NAME, tconv) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get transfer type conversion buffer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get transfer type conversion buffer"); if (bkg) if (H5P_get(plist, H5D_XFER_BKGR_BUF_NAME, bkg) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get background type conversion buffer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get background type conversion buffer"); /* Get the size */ if (H5P_get(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, 0, "Can't set transfer buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, 0, "Can't set transfer buffer size"); /* Set the return value */ ret_value = size; @@ -1168,12 +1168,12 @@ H5Pset_preserve(hid_t plist_id, hbool_t status) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ need_bkg = status ? H5T_BKG_YES : H5T_BKG_NO; if (H5P_set(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1202,11 +1202,11 @@ H5Pget_preserve(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (H5P_get(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); /* Set return value */ ret_value = need_bkg ? TRUE : FALSE; @@ -1238,15 +1238,15 @@ H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check) /* Check argument */ if (check != H5Z_ENABLE_EDC && check != H5Z_DISABLE_EDC) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ if (H5P_set(plist, H5D_XFER_EDC_NAME, &check) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1275,11 +1275,11 @@ H5Pget_edc_check(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_ERROR_EDC, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_ERROR_EDC, "can't find object for ID"); /* Update property list */ if (H5P_get(plist, H5D_XFER_EDC_NAME, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5Z_ERROR_EDC, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5Z_ERROR_EDC, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1308,14 +1308,14 @@ H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ cb_struct.func = func; cb_struct.op_data = op_data; if (H5P_set(plist, H5D_XFER_FILTER_CB_NAME, &cb_struct) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1344,14 +1344,14 @@ H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_dat /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ cb_struct.func = op; cb_struct.user_data = operate_data; if (H5P_set(plist, H5D_XFER_CONV_CB_NAME, &cb_struct) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1380,11 +1380,11 @@ H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op /*out*/, void **o /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get property */ if (H5P_get(plist, H5D_XFER_CONV_CB_NAME, &cb_struct) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); /* Assign return value */ *op = cb_struct.func; @@ -1418,11 +1418,11 @@ H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the split ratios */ if (H5P_get(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &btree_split_ratio) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); /* Get values */ if (left) @@ -1465,11 +1465,11 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right) /* Check arguments */ if (left < 0.0 || left > 1.0 || middle < 0.0 || middle > 1.0 || right < 0.0 || right > 1.0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ split_ratio[0] = left; @@ -1478,7 +1478,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right) /* Set the split ratios */ if (H5P_set(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratio) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1512,13 +1512,13 @@ H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void /* Update property list */ if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); if (H5P_set(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, &alloc_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); if (H5P_set(plist, H5D_XFER_VLEN_FREE_NAME, &free_func) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); if (H5P_set(plist, H5D_XFER_VLEN_FREE_INFO_NAME, &free_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1552,11 +1552,11 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_ /* Check arguments */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ if (H5P_set_vlen_mem_manager(plist, alloc_func, alloc_info, free_func, free_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set values") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set values"); done: FUNC_LEAVE_API(ret_value) @@ -1583,20 +1583,20 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func /*out*/, voi /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (alloc_func) if (H5P_get(plist, H5D_XFER_VLEN_ALLOC_NAME, alloc_func) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); if (alloc_info) if (H5P_get(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, alloc_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); if (free_func) if (H5P_get(plist, H5D_XFER_VLEN_FREE_NAME, free_func) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); if (free_info) if (H5P_get(plist, H5D_XFER_VLEN_FREE_INFO_NAME, free_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1631,15 +1631,15 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) /* Check arguments */ if (vector_size < 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ if (H5P_set(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &vector_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -1665,12 +1665,12 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ if (vector_size) if (H5P_get(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vector_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1897,12 +1897,12 @@ H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ if (actual_chunk_opt_mode) if (H5P_get(plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, actual_chunk_opt_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1929,12 +1929,12 @@ H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ if (actual_io_mode) if (H5P_get(plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, actual_io_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -1961,15 +1961,15 @@ H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_ca /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ if (local_no_collective_cause) if (H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value"); if (global_no_collective_cause) if (H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value"); done: FUNC_LEAVE_API(ret_value) @@ -2063,7 +2063,7 @@ H5P__dxfr_dset_io_hyp_sel_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U if (orig_space) { /* Make copy of dataspace */ if (NULL == (new_space = H5S_copy(orig_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the dataset I/O selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the dataset I/O selection"); /* Set new value for property */ *(void **)value = new_space; @@ -2073,7 +2073,7 @@ done: /* Cleanup on error */ if (ret_value < 0) if (new_space && H5S_close(new_space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing dataset I/O selection dataspace") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing dataset I/O selection dataspace"); FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_dset_io_hyp_sel_copy() */ @@ -2153,7 +2153,7 @@ H5P__dxfr_dset_io_hyp_sel_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ /* Release any dataspace */ if (space && H5S_close(space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing dataset I/O selection dataspace") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing dataset I/O selection dataspace"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2263,30 +2263,30 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper /* Check arguments */ if (rank < 1 || rank > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid rank value: %u", rank) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid rank value: %u", rank); if (!(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); if (start == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'count' pointer is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'count' pointer is NULL"); if (stride != NULL) { unsigned u; /* Local index variable */ /* Check for 0-sized strides */ for (u = 0; u < rank; u++) if (stride[u] == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value - stride[%u]==0", u) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid value - stride[%u]==0", u); } /* end if */ if (count == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'start' pointer is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'start' pointer is NULL"); /* block is allowed to be NULL, and will be assumed to be all '1's when NULL */ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* See if a dataset I/O selection is already set, and free it if it is */ if (H5P_peek(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting dataset I/O selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting dataset I/O selection"); /* Check for operation on existing dataspace selection */ if (NULL != space) { @@ -2294,7 +2294,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper /* Get dimensions from current dataspace for selection */ if ((sndims = H5S_GET_EXTENT_NDIMS(space)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection's dataspace rank") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get selection's dataspace rank"); /* Check for different # of dimensions */ if ((unsigned)sndims != rank) { @@ -2302,7 +2302,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper if (op == H5S_SELECT_SET) { /* Close previous dataspace */ if (H5S_close(space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release dataspace") + HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release dataspace"); /* Reset 'space' pointer, so it's re-created */ space = NULL; @@ -2311,7 +2311,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper reset_prop_on_error = TRUE; } /* end if */ else - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "different rank for previous and new selections") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "different rank for previous and new selections"); } /* end if */ } /* end if */ @@ -2326,17 +2326,17 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper /* Create dataspace of the correct dimensionality, with maximum dimensions */ if (NULL == (space = H5S_create_simple(rank, dims, NULL))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create dataspace for selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create dataspace for selection"); space_created = TRUE; } /* end if */ /* Set selection for dataspace */ if (H5S_select_hyperslab(space, op, start, stride, count, block) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSELECT, FAIL, "can't create selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSELECT, FAIL, "can't create selection"); /* Update property list (takes ownership of dataspace, if new) */ if (H5P_poke(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "error setting dataset I/O selection") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "error setting dataset I/O selection"); space_created = FALSE; /* Reset now that property owns the dataspace */ done: @@ -2376,14 +2376,14 @@ H5Pset_selection_io(hid_t plist_id, H5D_selection_io_mode_t selection_io_mode) /* Check arguments */ if (plist_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the selection I/O mode */ if (H5P_set(plist, H5D_XFER_SELECTION_IO_MODE_NAME, &selection_io_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -2414,12 +2414,12 @@ H5Pget_selection_io(hid_t plist_id, H5D_selection_io_mode_t *selection_io_mode / /* Check arguments */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Get the selection I/O mode */ if (selection_io_mode) if (H5P_get(plist, H5D_XFER_SELECTION_IO_MODE_NAME, selection_io_mode) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) @@ -2445,12 +2445,12 @@ H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause /*o /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Return values */ if (no_selection_io_cause) if (H5P_get(plist, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME, no_selection_io_cause) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get no_selection_io_cause value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get no_selection_io_cause value"); done: FUNC_LEAVE_API(ret_value) @@ -2543,14 +2543,14 @@ H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf) /* Check arguments */ if (plist_id == H5P_DEFAULT) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list"); if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Set the selection I/O mode */ if (H5P_set(plist, H5D_XFER_MODIFY_WRITE_BUF_NAME, &modify_write_buf) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value"); done: FUNC_LEAVE_API(ret_value) @@ -2577,12 +2577,12 @@ H5Pget_modify_write_buf(hid_t plist_id, hbool_t *modify_write_buf /*out*/) /* Check arguments */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl"); /* Get the selection I/O mode */ if (modify_write_buf) if (H5P_get(plist, H5D_XFER_MODIFY_WRITE_BUF_NAME, modify_write_buf) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c index 653f155..69396f4 100644 --- a/src/H5Pencdec.c +++ b/src/H5Pencdec.c @@ -321,7 +321,7 @@ H5P__encode_cb(H5P_genprop_t *prop, void *_udata) /* Encode (or not, if *(udata->pp) is NULL) the property value */ prop_value_len = 0; if ((prop->encode)(prop->value, udata->pp, &prop_value_len) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, H5_ITER_ERROR, "property encoding routine failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, H5_ITER_ERROR, "property encoding routine failed"); *(udata->enc_size_ptr) += prop_value_len; } /* end if */ @@ -366,7 +366,7 @@ H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, size_t /* Sanity check */ if (NULL == nalloc) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad allocation size pointer") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad allocation size pointer"); /* If the buffer is NULL, then this call to H5P__encode will return how much * space is needed to encode a property. @@ -392,7 +392,7 @@ H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, void *buf, size_t /* Iterate over all properties in property list, encoding them */ idx = 0; if (H5P__iterate_plist(plist, enc_all_prop, &idx, H5P__encode_cb, &udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADITER, FAIL, "can't iterate over properties") + HGOTO_ERROR(H5E_PLIST, H5E_BADITER, FAIL, "can't iterate over properties"); /* Encode a terminator for list of properties */ if (encode) @@ -508,7 +508,7 @@ H5P__decode_unsigned(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); H5_DECODE_UNSIGNED(*pp, *value); @@ -604,7 +604,7 @@ H5P__decode_double(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(double)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded"); H5_DECODE_DOUBLE(*pp, *value); @@ -651,18 +651,18 @@ H5P__decode(const void *buf) /* Sanity check */ if (NULL == p) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "decode buffer is NULL") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "decode buffer is NULL"); /* Get the version number of the encoded property list */ vers = (uint8_t)*p++; if ((uint8_t)H5P_ENCODE_VERS != vers) HGOTO_ERROR(H5E_PLIST, H5E_VERSION, FAIL, "bad version # of encoded information, expected %u, got %u", - (unsigned)H5P_ENCODE_VERS, (unsigned)vers) + (unsigned)H5P_ENCODE_VERS, (unsigned)vers); /* Get the type of the property list */ type = (H5P_plist_type_t)*p++; if (type <= H5P_TYPE_USER || type >= H5P_TYPE_MAX_TYPE) - HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "bad type of encoded information: %u", (unsigned)type) + HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "bad type of encoded information: %u", (unsigned)type); /* Create new property list of the specified type */ if ((plist_id = H5P__new_plist_of_type(type)) < 0) @@ -670,7 +670,7 @@ H5P__decode(const void *buf) /* Get the property list object */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property class") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property class"); /* Loop over encoded properties, deserializing their values */ while (p) { @@ -687,12 +687,12 @@ H5P__decode(const void *buf) /* Find property with name */ if (NULL == (prop = H5P__find_prop_plist(plist, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist: '%s'", name) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist: '%s'", name); /* Check if we should increase the size of the value buffer */ if (prop->size > value_buf_size) { if (NULL == (value_buf = H5MM_realloc(value_buf, prop->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "decoding buffer allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "decoding buffer allocation failed"); value_buf_size = prop->size; } /* end if */ @@ -700,14 +700,14 @@ H5P__decode(const void *buf) if (prop->decode) { if ((prop->decode)((const void **)&p, value_buf) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, - "property decoding routine failed, property: '%s'", name) + "property decoding routine failed, property: '%s'", name); } /* end if */ else - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "no decode callback for property: '%s'", name) + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "no decode callback for property: '%s'", name); /* Set the value for the property */ if (H5P_poke(plist, name, value_buf) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value for property: '%s'", name) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value for property: '%s'", name); } /* end while */ /* Set return value */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 40889a5..0aca611 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -556,60 +556,60 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) &H5F_def_mdc_initCacheCfg_g, NULL, NULL, NULL, H5F_ACS_META_CACHE_INIT_CONFIG_ENC, H5F_ACS_META_CACHE_INIT_CONFIG_DEC, NULL, NULL, H5F_ACS_META_CACHE_INIT_CONFIG_CMP, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of raw data chunk cache (elements) */ if (H5P__register_real(pclass, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, H5F_ACS_DATA_CACHE_NUM_SLOTS_SIZE, &H5F_def_rdcc_nslots_g, NULL, NULL, NULL, H5F_ACS_DATA_CACHE_NUM_SLOTS_ENC, H5F_ACS_DATA_CACHE_NUM_SLOTS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of raw data chunk cache(bytes) */ if (H5P__register_real(pclass, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, H5F_ACS_DATA_CACHE_BYTE_SIZE_SIZE, &H5F_def_rdcc_nbytes_g, NULL, NULL, NULL, H5F_ACS_DATA_CACHE_BYTE_SIZE_ENC, H5F_ACS_DATA_CACHE_BYTE_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the preemption for reading chunks */ if (H5P__register_real(pclass, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, H5F_ACS_PREEMPT_READ_CHUNKS_SIZE, &H5F_def_rdcc_w0_g, NULL, NULL, NULL, H5F_ACS_PREEMPT_READ_CHUNKS_ENC, H5F_ACS_PREEMPT_READ_CHUNKS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the threshold for alignment */ if (H5P__register_real(pclass, H5F_ACS_ALIGN_THRHD_NAME, H5F_ACS_ALIGN_THRHD_SIZE, &H5F_def_threshold_g, NULL, NULL, NULL, H5F_ACS_ALIGN_THRHD_ENC, H5F_ACS_ALIGN_THRHD_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the alignment */ if (H5P__register_real(pclass, H5F_ACS_ALIGN_NAME, H5F_ACS_ALIGN_SIZE, &H5F_def_alignment_g, NULL, NULL, NULL, H5F_ACS_ALIGN_ENC, H5F_ACS_ALIGN_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the minimum metadata allocation block size */ if (H5P__register_real(pclass, H5F_ACS_META_BLOCK_SIZE_NAME, H5F_ACS_META_BLOCK_SIZE_SIZE, &H5F_def_meta_block_size_g, NULL, NULL, NULL, H5F_ACS_META_BLOCK_SIZE_ENC, H5F_ACS_META_BLOCK_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the maximum sieve buffer size */ if (H5P__register_real(pclass, H5F_ACS_SIEVE_BUF_SIZE_NAME, H5F_ACS_SIEVE_BUF_SIZE_SIZE, &H5F_def_sieve_buf_size_g, NULL, NULL, NULL, H5F_ACS_SIEVE_BUF_SIZE_ENC, H5F_ACS_SIEVE_BUF_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the minimum "small data" allocation block size */ if (H5P__register_real(pclass, H5F_ACS_SDATA_BLOCK_SIZE_NAME, H5F_ACS_SDATA_BLOCK_SIZE_SIZE, &H5F_def_sdata_block_size_g, NULL, NULL, NULL, H5F_ACS_SDATA_BLOCK_SIZE_ENC, H5F_ACS_SDATA_BLOCK_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the garbage collection reference */ if (H5P__register_real(pclass, H5F_ACS_GARBG_COLCT_REF_NAME, H5F_ACS_GARBG_COLCT_REF_SIZE, &H5F_def_gc_ref_g, NULL, NULL, NULL, H5F_ACS_GARBG_COLCT_REF_ENC, H5F_ACS_GARBG_COLCT_REF_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the file driver ID & info */ /* (Note: this property should not have an encode/decode callback -QAK) */ @@ -617,26 +617,26 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_FILE_DRV_CRT, H5F_ACS_FILE_DRV_SET, H5F_ACS_FILE_DRV_GET, NULL, NULL, H5F_ACS_FILE_DRV_DEL, H5F_ACS_FILE_DRV_COPY, H5F_ACS_FILE_DRV_CMP, H5F_ACS_FILE_DRV_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the file close degree */ if (H5P__register_real(pclass, H5F_ACS_CLOSE_DEGREE_NAME, H5F_CLOSE_DEGREE_SIZE, &H5F_def_close_degree_g, NULL, NULL, NULL, H5F_CLOSE_DEGREE_ENC, H5F_CLOSE_DEGREE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the offset of family driver info */ if (H5P__register_real(pclass, H5F_ACS_FAMILY_OFFSET_NAME, H5F_ACS_FAMILY_OFFSET_SIZE, &H5F_def_family_offset_g, NULL, NULL, NULL, H5F_ACS_FAMILY_OFFSET_ENC, H5F_ACS_FAMILY_OFFSET_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of new family file size. It's used by h5repart only. */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5F_ACS_FAMILY_NEWSIZE_NAME, H5F_ACS_FAMILY_NEWSIZE_SIZE, &H5F_def_family_newsize_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of whether convert family to a single-file driver. It's used by h5repart * only. */ @@ -644,25 +644,25 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5F_ACS_FAMILY_TO_SINGLE_NAME, H5F_ACS_FAMILY_TO_SINGLE_SIZE, &H5F_def_family_to_single_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the data type of multi driver info */ if (H5P__register_real(pclass, H5F_ACS_MULTI_TYPE_NAME, H5F_ACS_MULTI_TYPE_SIZE, &H5F_def_mem_type_g, NULL, NULL, NULL, H5F_ACS_MULTI_TYPE_ENC, H5F_ACS_MULTI_TYPE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the 'low' bound of library format versions */ if (H5P__register_real(pclass, H5F_ACS_LIBVER_LOW_BOUND_NAME, H5F_ACS_LIBVER_LOW_BOUND_SIZE, &H5F_def_libver_low_bound_g, NULL, NULL, NULL, H5F_ACS_LIBVER_LOW_BOUND_ENC, H5F_ACS_LIBVER_LOW_BOUND_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the 'high' bound of library format versions */ if (H5P__register_real(pclass, H5F_ACS_LIBVER_HIGH_BOUND_NAME, H5F_ACS_LIBVER_HIGH_BOUND_SIZE, &H5F_def_libver_high_bound_g, NULL, NULL, NULL, H5F_ACS_LIBVER_HIGH_BOUND_ENC, H5F_ACS_LIBVER_HIGH_BOUND_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of whether to retrieve the file descriptor from the core VFD */ /* (used internally to the library only) */ @@ -670,13 +670,13 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5F_ACS_WANT_POSIX_FD_NAME, H5F_ACS_WANT_POSIX_FD_SIZE, &H5F_def_want_posix_fd_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the external file cache size */ if (H5P__register_real(pclass, H5F_ACS_EFC_SIZE_NAME, H5F_ACS_EFC_SIZE_SIZE, &H5F_def_efc_size_g, NULL, NULL, NULL, H5F_ACS_EFC_SIZE_ENC, H5F_ACS_EFC_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the initial file image info */ /* (Note: this property should not have an encode/decode callback -QAK) */ @@ -685,46 +685,46 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_FILE_IMAGE_INFO_GET, NULL, NULL, H5F_ACS_FILE_IMAGE_INFO_DEL, H5F_ACS_FILE_IMAGE_INFO_COPY, H5F_ACS_FILE_IMAGE_INFO_CMP, H5F_ACS_FILE_IMAGE_INFO_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the # of read attempts */ if (H5P__register_real(pclass, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, H5F_ACS_METADATA_READ_ATTEMPTS_SIZE, &H5F_def_metadata_read_attempts_g, NULL, NULL, NULL, H5F_ACS_METADATA_READ_ATTEMPTS_ENC, H5F_ACS_METADATA_READ_ATTEMPTS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register object flush callback */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5F_ACS_OBJECT_FLUSH_CB_NAME, H5F_ACS_OBJECT_FLUSH_CB_SIZE, &H5F_def_object_flush_cb_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of whether to clear the superblock status_flags. It's used by h5clear * only. */ if (H5P__register_real(pclass, H5F_ACS_CLEAR_STATUS_FLAGS_NAME, H5F_ACS_CLEAR_STATUS_FLAGS_SIZE, &H5F_def_clear_status_flags_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of whether to skip EOF check. It's used by h5clear only. */ if (H5P__register_real(pclass, H5F_ACS_SKIP_EOF_CHECK_NAME, H5F_ACS_SKIP_EOF_CHECK_SIZE, &H5F_def_skip_eof_check_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the private property of whether to drop free-space to the floor. It's used by h5clear only. */ if (H5P__register_real(pclass, H5F_ACS_NULL_FSM_ADDR_NAME, H5F_ACS_NULL_FSM_ADDR_SIZE, &H5F_def_null_fsm_addr_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the metadata cache logging flag. */ if (H5P__register_real(pclass, H5F_ACS_USE_MDC_LOGGING_NAME, H5F_ACS_USE_MDC_LOGGING_SIZE, &H5F_def_use_mdc_logging_g, NULL, NULL, NULL, H5F_ACS_USE_MDC_LOGGING_ENC, H5F_ACS_USE_MDC_LOGGING_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the metadata cache log location. */ if (H5P__register_real(pclass, H5F_ACS_MDC_LOG_LOCATION_NAME, H5F_ACS_MDC_LOG_LOCATION_SIZE, @@ -732,33 +732,33 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_MDC_LOG_LOCATION_DEC, H5F_ACS_MDC_LOG_LOCATION_DEL, H5F_ACS_MDC_LOG_LOCATION_COPY, H5F_ACS_MDC_LOG_LOCATION_CMP, H5F_ACS_MDC_LOG_LOCATION_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the flag that indicates whether mdc logging starts on file access. */ if (H5P__register_real(pclass, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE, &H5F_def_start_mdc_log_on_access_g, NULL, NULL, NULL, H5F_ACS_START_MDC_LOG_ON_ACCESS_ENC, H5F_ACS_START_MDC_LOG_ON_ACCESS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the evict on close flag */ if (H5P__register_real(pclass, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, H5F_ACS_EVICT_ON_CLOSE_FLAG_SIZE, &H5F_def_evict_on_close_flag_g, NULL, NULL, NULL, H5F_ACS_EVICT_ON_CLOSE_FLAG_ENC, H5F_ACS_EVICT_ON_CLOSE_FLAG_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); #ifdef H5_HAVE_PARALLEL /* Register the metadata collective read flag */ if (H5P__register_real(pclass, H5_COLL_MD_READ_FLAG_NAME, H5F_ACS_COLL_MD_READ_FLAG_SIZE, &H5F_def_coll_md_read_flag_g, NULL, NULL, NULL, H5F_ACS_COLL_MD_READ_FLAG_ENC, H5F_ACS_COLL_MD_READ_FLAG_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the metadata collective write flag */ if (H5P__register_real(pclass, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, H5F_ACS_COLL_MD_WRITE_FLAG_SIZE, &H5F_def_coll_md_write_flag_g, NULL, NULL, NULL, H5F_ACS_COLL_MD_WRITE_FLAG_ENC, H5F_ACS_COLL_MD_WRITE_FLAG_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the MPI communicator */ if (H5P__register_real(pclass, H5F_ACS_MPI_PARAMS_COMM_NAME, H5F_ACS_MPI_PARAMS_COMM_SIZE, @@ -766,7 +766,7 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_MPI_PARAMS_COMM_GET, NULL, NULL, H5F_ACS_MPI_PARAMS_COMM_DEL, H5F_ACS_MPI_PARAMS_COMM_COPY, H5F_ACS_MPI_PARAMS_COMM_CMP, H5F_ACS_MPI_PARAMS_COMM_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the MPI info struct */ if (H5P__register_real(pclass, H5F_ACS_MPI_PARAMS_INFO_NAME, H5F_ACS_MPI_PARAMS_INFO_SIZE, @@ -774,7 +774,7 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_MPI_PARAMS_INFO_GET, NULL, NULL, H5F_ACS_MPI_PARAMS_INFO_DEL, H5F_ACS_MPI_PARAMS_INFO_COPY, H5F_ACS_MPI_PARAMS_INFO_CMP, H5F_ACS_MPI_PARAMS_INFO_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); #endif /* H5_HAVE_PARALLEL */ @@ -784,27 +784,27 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) NULL, NULL, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_ENC, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_DEC, NULL, NULL, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_CMP, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of the page buffer size */ if (H5P__register_real(pclass, H5F_ACS_PAGE_BUFFER_SIZE_NAME, H5F_ACS_PAGE_BUFFER_SIZE_SIZE, &H5F_def_page_buf_size_g, NULL, NULL, NULL, H5F_ACS_PAGE_BUFFER_SIZE_ENC, H5F_ACS_PAGE_BUFFER_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of the page buffer minimum metadata size */ if (H5P__register_real(pclass, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_NAME, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_SIZE, &H5F_def_page_buf_min_meta_perc_g, NULL, NULL, NULL, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_ENC, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the size of the page buffer minimum raw data size */ if (H5P__register_real(pclass, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_NAME, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_SIZE, &H5F_def_page_buf_min_raw_perc_g, NULL, NULL, NULL, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_ENC, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the file VOL connector ID & info */ /* (Note: this property should not have an encode/decode callback -QAK) */ @@ -812,20 +812,20 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_VOL_CONN_CRT, H5F_ACS_VOL_CONN_SET, H5F_ACS_VOL_CONN_GET, NULL, NULL, H5F_ACS_VOL_CONN_DEL, H5F_ACS_VOL_CONN_COPY, H5F_ACS_VOL_CONN_CMP, H5F_ACS_VOL_CONN_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the use file locking flag */ if (H5P__register_real(pclass, H5F_ACS_USE_FILE_LOCKING_NAME, H5F_ACS_USE_FILE_LOCKING_SIZE, &H5F_def_use_file_locking_g, NULL, NULL, NULL, H5F_ACS_USE_FILE_LOCKING_ENC, H5F_ACS_USE_FILE_LOCKING_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the ignore disabled file locks flag */ if (H5P__register_real(pclass, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_SIZE, &H5F_def_ignore_disabled_file_locks_g, NULL, NULL, NULL, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_ENC, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -864,27 +864,27 @@ H5P__facc_set_def_driver(void) /* Check to see if the driver is already registered */ 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check if VFL driver is already registered"); if (driver_is_registered) { 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") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "unable to increment ref count on VFD"); driver_ref_inc = TRUE; } /* end else-if */ else { /* Check for VFL drivers that ship with the library */ if (H5P__facc_set_def_driver_check_predefined(driver_env_var, &driver_id) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check for predefined VFL driver name") + HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't check for predefined VFL driver name"); else if (driver_id > 0) { if (H5I_inc_ref(driver_id, TRUE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "can't increment VFL driver refcount") + HGOTO_ERROR(H5E_VFL, H5E_CANTINC, FAIL, "can't increment VFL driver refcount"); driver_ref_inc = TRUE; } else { /* Register the VFL driver */ if ((driver_id = H5FD_register_driver_by_name(driver_env_var, TRUE)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't register VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't register VFL driver"); driver_ref_inc = TRUE; } /* end else */ } /* end else */ @@ -899,21 +899,21 @@ H5P__facc_set_def_driver(void) /* Get default file access pclass */ if (NULL == (def_fapclass = (H5P_genclass_t *)H5I_object(H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, - "can't find object for default file access property class ID") + "can't find object for default file access property class ID"); /* Set new default VFL driver for default file access pclass */ if (H5P__class_set(def_fapclass, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, - "can't set default VFL driver for default file access property list class") + "can't set default VFL driver for default file access property list class"); /* Get default file access plist */ if (NULL == (def_fapl = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, "can't find object for default fapl ID") + HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, "can't find object for default fapl ID"); /* Set new default VFL driver for default FAPL */ if (H5P_set_driver(def_fapl, driver_prop.driver_id, driver_prop.driver_info, driver_prop.driver_config_str) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default VFL driver for default FAPL") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set default VFL driver for default FAPL"); } done: @@ -951,86 +951,86 @@ H5P__facc_set_def_driver_check_predefined(const char *driver_name, hid_t *driver if (!HDstrcmp(driver_name, "sec2")) { if ((*driver_id = H5FD_SEC2) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize sec2 VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize sec2 VFD"); } else if (!HDstrcmp(driver_name, "core") || !HDstrcmp(driver_name, "core_paged")) { if ((*driver_id = H5FD_CORE) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize core VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize core VFD"); } else if (!HDstrcmp(driver_name, "log")) { if ((*driver_id = H5FD_LOG) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize log VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize log VFD"); } else if (!HDstrcmp(driver_name, "family")) { if ((*driver_id = H5FD_FAMILY) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize family VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize family VFD"); } else if (!HDstrcmp(driver_name, "multi") || !HDstrcmp(driver_name, "split")) { if ((*driver_id = H5FD_MULTI) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize multi VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize multi VFD"); } else if (!HDstrcmp(driver_name, "stdio")) { if ((*driver_id = H5FD_STDIO) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize stdio VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize stdio VFD"); } else if (!HDstrcmp(driver_name, "splitter")) { if ((*driver_id = H5FD_SPLITTER) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize splitter VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize splitter VFD"); } else if (!HDstrcmp(driver_name, "mpio")) { #ifdef H5_HAVE_PARALLEL if ((*driver_id = H5FD_MPIO) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize MPI I/O VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize MPI I/O VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "MPI-I/O VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "MPI-I/O VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "direct")) { #ifdef H5_HAVE_DIRECT if ((*driver_id = H5FD_DIRECT) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Direct I/O VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Direct I/O VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Direct I/O VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Direct I/O VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "mirror")) { #ifdef H5_HAVE_MIRROR_VFD if ((*driver_id = H5FD_MIRROR) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize mirror VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize mirror VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Mirror VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Mirror VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "hdfs")) { #ifdef H5_HAVE_LIBHDFS if ((*driver_id = H5FD_HDFS) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize HDFS VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize HDFS VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "HDFS VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "HDFS VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "ros3")) { #ifdef H5_HAVE_ROS3_VFD if ((*driver_id = H5FD_ROS3) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize ROS3 VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize ROS3 VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "ROS3 VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "ROS3 VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "subfiling")) { #ifdef H5_HAVE_SUBFILING_VFD if ((*driver_id = H5FD_SUBFILING) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Subfiling VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Subfiling VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Subfiling VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Subfiling VFD is not enabled"); #endif } else if (!HDstrcmp(driver_name, "windows")) { #ifdef H5_HAVE_WINDOWS if ((*driver_id = H5FD_WINDOWS) < 0) - HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Windows VFD") + HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "couldn't initialize Windows VFD"); #else - HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Windows VFD is not enabled") + HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "Windows VFD is not enabled"); #endif } else { @@ -1073,17 +1073,17 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment) /* Check args */ if (alignment < 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_ALIGN_THRHD_NAME, &threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold"); if (H5P_set(plist, H5F_ACS_ALIGN_NAME, &alignment) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment"); done: FUNC_LEAVE_API(ret_value) @@ -1111,15 +1111,15 @@ H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment / /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (threshold) if (H5P_get(plist, H5F_ACS_ALIGN_THRHD_NAME, threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get threshold"); if (alignment) if (H5P_get(plist, H5F_ACS_ALIGN_NAME, alignment) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get alignment") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get alignment"); done: FUNC_LEAVE_API(ret_value) @@ -1158,7 +1158,7 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID"); if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & config. string */ @@ -1170,10 +1170,10 @@ H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_drive /* Set the driver ID, info & config. string property */ if (H5P_set(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver ID & info"); } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1206,13 +1206,13 @@ H5Pset_driver(hid_t plist_id, hid_t new_driver_id, const void *new_driver_info) /* Check arguments */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (NULL == H5I_object_verify(new_driver_id, H5I_VFL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file driver ID"); /* Set the driver */ if (H5P_set_driver(plist, new_driver_id, new_driver_info, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: FUNC_LEAVE_API(ret_value) @@ -1249,11 +1249,11 @@ H5P_set_driver_by_name(H5P_genplist_t *plist, const char *driver_name, const cha /* Register the driver */ if ((new_driver_id = H5FD_register_driver_by_name(driver_name, app_ref)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register VFD") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register VFD"); /* Set the driver */ if (H5P_set_driver(plist, new_driver_id, NULL, driver_config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: if (ret_value < 0) { @@ -1292,15 +1292,15 @@ H5Pset_driver_by_name(hid_t plist_id, const char *driver_name, const char *drive /* Check arguments */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (!driver_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be NULL"); if (!*driver_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "driver_name parameter cannot be an empty string"); /* Set the driver */ if (H5P_set_driver_by_name(plist, driver_name, driver_config, TRUE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: FUNC_LEAVE_API(ret_value) @@ -1337,11 +1337,11 @@ H5P_set_driver_by_value(H5P_genplist_t *plist, H5FD_class_value_t driver_value, /* Register the driver */ if ((new_driver_id = H5FD_register_driver_by_value(driver_value, app_ref)) < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register VFD") + HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register VFD"); /* Set the driver */ if (H5P_set_driver(plist, new_driver_id, NULL, driver_config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: if (ret_value < 0) { @@ -1380,13 +1380,13 @@ H5Pset_driver_by_value(hid_t plist_id, H5FD_class_value_t driver_value, const ch /* Check arguments */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (driver_value < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative VFD value is disallowed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative VFD value is disallowed"); /* Set the driver */ if (H5P_set_driver_by_value(plist, driver_value, driver_config, TRUE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set driver info"); done: FUNC_LEAVE_API(ret_value) @@ -1419,11 +1419,11 @@ H5P_peek_driver(H5P_genplist_t *plist) H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID"); ret_value = driver_prop.driver_id; } /* end if */ else - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5FD_VFD_DEFAULT == ret_value) ret_value = H5_DEFAULT_VFD; @@ -1459,11 +1459,11 @@ H5Pget_driver(hid_t plist_id) H5TRACE1("i", "i", plist_id); if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the driver */ if ((ret_value = H5P_peek_driver(plist)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver"); done: FUNC_LEAVE_API(ret_value) @@ -1497,11 +1497,11 @@ H5P_peek_driver_info(H5P_genplist_t *plist) H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info"); ret_value = driver_prop.driver_info; } /* end if */ else - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1533,11 +1533,11 @@ H5Pget_driver_info(hid_t plist_id) H5TRACE1("*x", "i", plist_id); if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list"); /* Get the driver info */ if (NULL == (ret_value = (const void *)H5P_peek_driver_info(plist))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver info"); done: FUNC_LEAVE_API(ret_value) @@ -1569,11 +1569,11 @@ H5P_peek_driver_config_str(H5P_genplist_t *plist) H5FD_driver_prop_t driver_prop; /* Property for driver ID, info & configuration string */ if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver configuration string") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get driver configuration string"); ret_value = driver_prop.driver_config_str; } /* end if */ else - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a file access property list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1609,11 +1609,11 @@ H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size) /* Check arguments */ if (!config_buf && buf_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "config_buf cannot be NULL if buf_size is non-zero") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "config_buf cannot be NULL if buf_size is non-zero"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't find object for ID"); /* Retrieve configuration string property */ if ((config_str = H5P_peek_driver_config_str(plist))) { @@ -1662,7 +1662,7 @@ H5P__file_driver_copy(void *value) if (info->driver_id > 0) { /* Increment the reference count on driver and copy driver info */ if (H5I_inc_ref(info->driver_id, FALSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VFL driver"); /* Copy driver info, if it exists */ if (info->driver_info) { @@ -1671,20 +1671,20 @@ H5P__file_driver_copy(void *value) /* Retrieve the driver for the ID */ if (NULL == (driver = (H5FD_class_t *)H5I_object(info->driver_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a driver ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a driver ID"); /* Allow the driver to copy or do it ourselves */ if (driver->fapl_copy) { if (NULL == (new_pl = (driver->fapl_copy)(info->driver_info))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "driver info copy failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "driver info copy failed"); } /* end if */ else if (driver->fapl_size > 0) { if (NULL == (new_pl = H5MM_malloc(driver->fapl_size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "driver info allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "driver info allocation failed"); H5MM_memcpy(new_pl, info->driver_info, driver->fapl_size); } /* end else-if */ else - HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "no way to copy driver info") + HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "no way to copy driver info"); /* Set the driver info for the copy */ info->driver_info = new_pl; @@ -1695,7 +1695,7 @@ H5P__file_driver_copy(void *value) char *new_config_str = NULL; if (NULL == (new_config_str = H5MM_strdup(info->driver_config_str))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "driver configuration string copy failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "driver configuration string copy failed"); info->driver_config_str = new_config_str; } /* end if */ } /* end if */ @@ -1730,14 +1730,14 @@ H5P__file_driver_free(void *value) /* Free the driver info, if it exists */ if (info->driver_info) if (H5FD_free_driver_info(info->driver_id, info->driver_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "driver info free request failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "driver info free request failed"); /* Free the driver configuration string, if it exists */ H5MM_xfree_const(info->driver_config_str); /* Decrement reference count for driver */ if (H5I_dec_ref(info->driver_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't decrement reference count for driver ID") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDEC, FAIL, "can't decrement reference count for driver ID"); } } @@ -1764,7 +1764,7 @@ H5P__facc_file_driver_create(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNU /* Make copy of file driver */ if (H5P__file_driver_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1793,7 +1793,7 @@ H5P__facc_file_driver_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE /* Make copy of file driver ID & info */ if (H5P__file_driver_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1822,7 +1822,7 @@ H5P__facc_file_driver_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE /* Make copy of file driver */ if (H5P__file_driver_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1848,7 +1848,7 @@ H5P__facc_file_driver_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSE /* Free the file driver ID & info */ if (H5P__file_driver_free(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1873,7 +1873,7 @@ H5P__facc_file_driver_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE /* Make copy of file driver */ if (H5P__file_driver_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1969,7 +1969,7 @@ H5P__facc_file_driver_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUS /* Free the file driver */ if (H5P__file_driver_free(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1998,13 +1998,13 @@ H5Pset_family_offset(hid_t fapl_id, hsize_t offset) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (H5P_set(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set offset for family file") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set offset for family file"); done: FUNC_LEAVE_API(ret_value) @@ -2033,14 +2033,14 @@ H5Pget_family_offset(hid_t fapl_id, hsize_t *offset /*out*/) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (offset) { if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, offset) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set offset for family file") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set offset for family file"); } /* end if */ done: @@ -2070,13 +2070,13 @@ H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (H5P_set(plist, H5F_ACS_MULTI_TYPE_NAME, &type) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set type for multi driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set type for multi driver"); done: FUNC_LEAVE_API(ret_value) @@ -2105,14 +2105,14 @@ H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type /*out*/) /* Get the plist structure */ if (H5P_DEFAULT == fapl_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (type) { if (H5P_get(plist, H5F_ACS_MULTI_TYPE_NAME, type) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get type for multi driver") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get type for multi driver"); } /* end if */ done: @@ -2151,19 +2151,19 @@ H5Pset_cache(hid_t plist_id, int H5_ATTR_UNUSED mdc_nelmts, size_t rdcc_nslots, /* Check arguments */ if (rdcc_w0 < 0.0 || rdcc_w0 > 1.0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "raw data cache w0 value must be between 0.0 and 1.0 inclusive") + "raw data cache w0 value must be between 0.0 and 1.0 inclusive"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set sizes */ if (H5P_set(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc_nslots) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache number of slots"); if (H5P_set(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc_nbytes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache byte size"); if (H5P_set(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc_w0) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set preempt read chunks"); done: FUNC_LEAVE_API(ret_value) @@ -2194,7 +2194,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots /*out*/, size_ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get sizes */ @@ -2204,13 +2204,13 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots /*out*/, size_ if (rdcc_nslots) if (H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, rdcc_nslots) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache number of slots") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache number of slots"); if (rdcc_nbytes) if (H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, rdcc_nbytes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache byte size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get data cache byte size"); if (rdcc_w0) if (H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, rdcc_w0) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get preempt read chunks") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get preempt read chunks"); done: FUNC_LEAVE_API(ret_value) @@ -2237,11 +2237,11 @@ H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the new configuration */ if (H5AC_validate_cache_image_config(config_ptr) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid metadata cache image configuration") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid metadata cache image configuration"); /* set the modified metadata cache image config */ @@ -2250,7 +2250,7 @@ H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr) */ if (H5P_set(plist, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME, config_ptr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache image initial config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache image initial config"); done: FUNC_LEAVE_API(ret_value) @@ -2281,13 +2281,13 @@ H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config /*out* /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the config ptr */ if (config == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config ptr on entry.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config ptr on entry."); if (config->version != H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown image config version.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown image config version."); /* If we ever support multiple versions of H5AC_cache_config_t, we * will have to get the canonical version here, and then translate @@ -2296,7 +2296,7 @@ H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config /*out* /* Get the current initial metadata cache resize configuration */ if (H5P_get(plist, H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_NAME, config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get metadata cache initial image config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get metadata cache initial image config"); done: FUNC_LEAVE_API(ret_value) @@ -2323,11 +2323,11 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the new configuration */ if (H5AC_validate_config(config_ptr) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid metadata cache configuration") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid metadata cache configuration"); /* set the modified config */ @@ -2336,7 +2336,7 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr) */ if (H5P_set(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, config_ptr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache initial config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set metadata cache initial config"); done: FUNC_LEAVE_API(ret_value) @@ -2367,13 +2367,13 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* validate the config ptr */ if (config == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config ptr on entry.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config ptr on entry."); if (config->version != H5AC__CURR_CACHE_CONFIG_VERSION) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version."); /* If we ever support multiple versions of H5AC_cache_config_t, we * will have to get the canonical version here, and then translate @@ -2382,7 +2382,7 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config /*out*/) /* Get the current initial metadata cache resize configuration */ if (H5P_get(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get metadata cache initial resize config") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get metadata cache initial resize config"); done: FUNC_LEAVE_API(ret_value) @@ -2420,11 +2420,11 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_GARBG_COLCT_REF_NAME, &gc_ref) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference"); done: FUNC_LEAVE_API(ret_value) @@ -2451,12 +2451,12 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (gc_ref) if (H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, gc_ref) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference"); done: FUNC_LEAVE_API(ret_value) @@ -2482,11 +2482,11 @@ H5Pset_fclose_degree(hid_t plist_id, H5F_close_degree_t degree) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_CLOSE_DEGREE_NAME, °ree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree"); done: FUNC_LEAVE_API(ret_value) @@ -2512,10 +2512,10 @@ H5Pget_fclose_degree(hid_t plist_id, H5F_close_degree_t *degree /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (degree && H5P_get(plist, H5F_ACS_CLOSE_DEGREE_NAME, degree) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file close degree"); done: FUNC_LEAVE_API(ret_value) @@ -2551,11 +2551,11 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size"); done: FUNC_LEAVE_API(ret_value) @@ -2582,12 +2582,12 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (size) { if (H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size"); } /* end if */ done: @@ -2624,11 +2624,11 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size"); done: FUNC_LEAVE_API(ret_value) @@ -2655,12 +2655,12 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (size) if (H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size"); done: FUNC_LEAVE_API(ret_value) @@ -2696,11 +2696,11 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size"); done: FUNC_LEAVE_API(ret_value) @@ -2727,12 +2727,12 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (size) { if (H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size"); } /* end if */ done: @@ -2851,27 +2851,27 @@ H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high) /* Check args */ if (low < 0 || low > H5F_LIBVER_LATEST) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "low bound is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "low bound is not valid"); if (high < 0 || high > H5F_LIBVER_LATEST) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "high bound is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "high bound is not valid"); /* (earliest, earliest), (latest, earliest), (v18, earliest) are not valid combinations */ if (high == H5F_LIBVER_EARLIEST) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound"); /* (latest, v18) is not valid combination */ if (high < low) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, &low) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set low bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set low bound for library format versions"); if (H5P_set(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, &high) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set high bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set high bound for library format versions"); done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_libver_bounds() */ @@ -2897,16 +2897,16 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low /*out*/, H5F_libver_t *hi /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (low) if (H5P_get(plist, H5F_ACS_LIBVER_LOW_BOUND_NAME, low) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get low bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get low bound for library format versions"); if (high) if (H5P_get(plist, H5F_ACS_LIBVER_HIGH_BOUND_NAME, high) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get high bound for library format versions") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get high bound for library format versions"); done: FUNC_LEAVE_API(ret_value) @@ -2936,11 +2936,11 @@ H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (H5P_set(plist, H5F_ACS_EFC_SIZE_NAME, &efc_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set elink file cache size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set elink file cache size"); done: FUNC_LEAVE_API(ret_value) @@ -2970,12 +2970,12 @@ H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (efc_size) if (H5P_get(plist, H5F_ACS_EFC_SIZE_NAME, efc_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get elink file cache size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get elink file cache size"); done: FUNC_LEAVE_API(ret_value) @@ -3003,15 +3003,15 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) /* validate parameters */ if (!(((buf_ptr == NULL) && (buf_len == 0)) || ((buf_ptr != NULL) && (buf_len > 0)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistent buf_ptr and buf_len") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistent buf_ptr and buf_len"); /* Get the plist structure */ if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old image info */ if (H5P_peek(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &image_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image pointer") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image pointer"); /* Release previous buffer, if it exists */ if (image_info.buffer != NULL) { @@ -3019,7 +3019,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) if (SUCCEED != image_info.callbacks.image_free(image_info.buffer, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET, image_info.callbacks.udata)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "image_free callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "image_free callback failed"); } /* end if */ else H5MM_xfree(image_info.buffer); @@ -3031,17 +3031,17 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) if (image_info.callbacks.image_malloc) { if (NULL == (image_info.buffer = image_info.callbacks.image_malloc( buf_len, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET, image_info.callbacks.udata))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "image malloc callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "image malloc callback failed"); } /* end if */ else if (NULL == (image_info.buffer = H5MM_malloc(buf_len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block"); /* Copy data */ if (image_info.callbacks.image_memcpy) { if (image_info.buffer != image_info.callbacks.image_memcpy(image_info.buffer, buf_ptr, buf_len, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET, image_info.callbacks.udata)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "image_memcpy callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "image_memcpy callback failed"); } /* end if */ else H5MM_memcpy(image_info.buffer, buf_ptr, buf_len); @@ -3053,7 +3053,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len) /* Set values */ if (H5P_poke(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &image_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file image info"); done: FUNC_LEAVE_API(ret_value) @@ -3097,11 +3097,11 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/) /* Get the plist structure */ if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (H5P_peek(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &image_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info"); /* verify file image field consistency */ assert(((image_info.buffer != NULL) && (image_info.size > 0)) || @@ -3121,17 +3121,17 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/) if (NULL == (copy_ptr = image_info.callbacks.image_malloc( image_info.size, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET, image_info.callbacks.udata))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "image malloc callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "image malloc callback failed"); } /* end if */ else if (NULL == (copy_ptr = H5MM_malloc(image_info.size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate copy") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate copy"); /* Copy data */ if (image_info.callbacks.image_memcpy) { if (copy_ptr != image_info.callbacks.image_memcpy( copy_ptr, image_info.buffer, image_info.size, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET, image_info.callbacks.udata)) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "image_memcpy callback failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCOPY, FAIL, "image_memcpy callback failed"); } /* end if */ else H5MM_memcpy(copy_ptr, image_info.buffer, image_info.size); @@ -3169,11 +3169,11 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback /* Get the plist structure */ if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old info */ if (H5P_peek(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get old file image info"); /* verify file image field consistency */ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0))); @@ -3182,22 +3182,22 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback if (info.buffer != NULL || info.size > 0) HGOTO_ERROR( H5E_PLIST, H5E_SETDISALLOWED, FAIL, - "setting callbacks when an image is already set is forbidden. It could cause memory leaks.") + "setting callbacks when an image is already set is forbidden. It could cause memory leaks."); /* verify that callbacks_ptr is not NULL */ if (NULL == callbacks_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL callbacks_ptr") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL callbacks_ptr"); /* Make sure udata callbacks are going to be set if udata is going to be set */ if (callbacks_ptr->udata) if (callbacks_ptr->udata_copy == NULL || callbacks_ptr->udata_free == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_SETDISALLOWED, FAIL, "udata callbacks must be set if udata is set") + HGOTO_ERROR(H5E_PLIST, H5E_SETDISALLOWED, FAIL, "udata callbacks must be set if udata is set"); /* Release old udata if it exists */ if (info.callbacks.udata != NULL) { 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "udata_free callback failed"); } /* end if */ /* Update struct */ @@ -3207,12 +3207,12 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy the supplied udata"); } /* end if */ /* Set values */ if (H5P_poke(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file image info"); done: FUNC_LEAVE_API(ret_value) @@ -3242,18 +3242,18 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback /* Get the plist structure */ if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get old info */ if (H5P_peek(fapl, H5F_ACS_FILE_IMAGE_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file image info"); /* verify file image field consistency */ assert(((info.buffer != NULL) && (info.size > 0)) || ((info.buffer == NULL) && (info.size == 0))); /* verify that callbacks is not NULL */ if (NULL == callbacks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL callbacks ptr") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL callbacks ptr"); /* Transfer values to parameters */ *callbacks = info.callbacks; @@ -3262,7 +3262,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback if (info.callbacks.udata != NULL) { 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't copy udata"); } /* end if */ done: @@ -3310,11 +3310,11 @@ H5P__file_image_info_copy(void *value) if (info->callbacks.image_malloc) { if (NULL == (info->buffer = info->callbacks.image_malloc( info->size, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY, info->callbacks.udata))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "image malloc callback failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "image malloc callback failed"); } /* end if */ else { if (NULL == (info->buffer = H5MM_malloc(info->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory block") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "unable to allocate memory block"); } /* end else */ /* Copy data to new buffer */ @@ -3322,7 +3322,7 @@ H5P__file_image_info_copy(void *value) if (info->buffer != info->callbacks.image_memcpy(info->buffer, old_buffer, info->size, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY, info->callbacks.udata)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "image_memcpy callback failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "image_memcpy callback failed"); } /* end if */ else H5MM_memcpy(info->buffer, old_buffer, info->size); @@ -3333,7 +3333,7 @@ H5P__file_image_info_copy(void *value) void *old_udata = info->callbacks.udata; if (NULL == info->callbacks.udata_copy) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "udata_copy not defined") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "udata_copy not defined"); info->callbacks.udata = info->callbacks.udata_copy(old_udata); } /* end if */ @@ -3375,7 +3375,7 @@ H5P__file_image_info_free(void *value) if (info->callbacks.image_free) { if ((*info->callbacks.image_free)(info->buffer, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE, info->callbacks.udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "image_free callback failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "image_free callback failed"); } /* end if */ else H5MM_xfree(info->buffer); @@ -3384,9 +3384,9 @@ H5P__file_image_info_free(void *value) /* Free udata if it exists */ if (info->callbacks.udata) { if (NULL == info->callbacks.udata_free) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "udata_free not defined") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "udata_free not defined"); if ((*info->callbacks.udata_free)(info->callbacks.udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "udata_free callback failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "udata_free callback failed"); } /* end if */ } /* end if */ @@ -3522,7 +3522,7 @@ H5P__facc_cache_image_config_dec(const void **_pp, void *_value) /* Decode type sizes */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); INT32DECODE(*pp, config->version); @@ -3559,7 +3559,7 @@ H5P__facc_file_image_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U /* Make copy of file image info */ if (H5P__file_image_info_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3588,7 +3588,7 @@ H5P__facc_file_image_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U /* Make copy of file image info */ if (H5P__file_image_info_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3616,7 +3616,7 @@ H5P__facc_file_image_info_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U /* Free the file image info */ if (H5P__file_image_info_free(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file image info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3642,7 +3642,7 @@ H5P__facc_file_image_info_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U /* Make copy of file image info */ if (H5P__file_image_info_copy(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy file image info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3735,7 +3735,7 @@ H5P__facc_file_image_info_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ /* Free the file image info */ if (H5P__file_image_info_free(value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file image info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release file image info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4084,10 +4084,10 @@ H5P__facc_cache_config_dec(const void **_pp, void *_value) /* Decode type sizes */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); enc_size = *(*pp)++; if (enc_size != sizeof(double)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded"); /* int */ INT32DECODE(*pp, config->version); @@ -4407,11 +4407,11 @@ H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, &attempts) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set # of metadata read attempts") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set # of metadata read attempts"); done: FUNC_LEAVE_API(ret_value) @@ -4440,11 +4440,11 @@ H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the # of read attempts set */ if (H5P_get(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, attempts) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get the number of metadata read attempts") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get the number of metadata read attempts"); /* If not set, return the default value */ if (*attempts == H5F_ACS_METADATA_READ_ATTEMPTS_DEF) /* 0 */ @@ -4478,11 +4478,11 @@ H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata) /* Check if the callback function is NULL and the user data is non-NULL. * This is almost certainly an error as the user data will not be used. */ if (!func && udata) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Update property list */ flush_info.func = func; @@ -4490,7 +4490,7 @@ H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata) /* Set values */ if (H5P_set(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &flush_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object flush callback") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object flush callback"); done: FUNC_LEAVE_API(ret_value) @@ -4518,11 +4518,11 @@ H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func /*out*/, void **udat /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Retrieve the callback function and user data */ if (H5P_get(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &flush_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object flush callback") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object flush callback"); /* Assign return value */ if (func) @@ -4555,25 +4555,25 @@ H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, /* Check arguments */ if (H5P_DEFAULT == plist_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list"); if (!location) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "location cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "location cannot be NULL"); /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Make a copy of the passed-in location */ if (NULL == (new_location = H5MM_xstrdup(location))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy passed-in log location") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy passed-in log location"); /* Set values */ if (H5P_set(plist, H5F_ACS_USE_MDC_LOGGING_NAME, &is_enabled) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set is_enabled flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set is_enabled flag"); if (H5P_set(plist, H5F_ACS_MDC_LOG_LOCATION_NAME, &new_location) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set log location") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set log location"); if (H5P_set(plist, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, &start_on_access) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set start_on_access flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set start_on_access flag"); done: FUNC_LEAVE_API(ret_value) @@ -4601,20 +4601,20 @@ H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled /*out*/, char *locati /* Get the property list structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list"); /* Get simple values */ if (is_enabled) if (H5P_get(plist, H5F_ACS_USE_MDC_LOGGING_NAME, is_enabled) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get log location") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get log location"); if (start_on_access) if (H5P_get(plist, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, start_on_access) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get start_on_access flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get start_on_access flag"); /* Get the location */ if (location || location_size) if (H5P_get(plist, H5F_ACS_MDC_LOG_LOCATION_NAME, &location_ptr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get log location") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get log location"); /* Copy log location to output buffer */ if (location_ptr && location) @@ -4724,7 +4724,7 @@ H5P__facc_mdc_log_location_dec(const void **_pp, void *_value) if (0 != len) { /* Make a copy of the user's prefix string */ if (NULL == (*log_location = (char *)H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix"); HDstrncpy(*log_location, *(const char **)pp, len); (*log_location)[len] = '\0'; @@ -4859,19 +4859,19 @@ H5Pset_evict_on_close(hid_t fapl_id, hbool_t H5_ATTR_PARALLEL_UNUSED evict_on_cl /* Compare the property list's class against the other class */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); #ifndef H5_HAVE_PARALLEL /* Set value */ if (H5P_set(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, &evict_on_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set evict on close property"); #else HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, - "evict on close is currently not supported in parallel HDF5") + "evict on close is currently not supported in parallel HDF5"); #endif /* H5_HAVE_PARALLEL */ done: @@ -4904,14 +4904,14 @@ H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close /*out*/) /* Compare the property list's class against the other class */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5F_ACS_EVICT_ON_CLOSE_FLAG_NAME, evict_on_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get evict on close property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get evict on close property"); done: FUNC_LEAVE_API(ret_value) @@ -4946,17 +4946,17 @@ H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when /* Make sure this is a fapl */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_USE_FILE_LOCKING_NAME, &use_file_locking) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set use file locking property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set use file locking property"); if (H5P_set(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, &ignore_when_disabled) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set ignore disabled file locks property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set ignore disabled file locks property"); done: FUNC_LEAVE_API(ret_value) @@ -4985,17 +4985,17 @@ H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking /*out*/, hbool_t *i /* Make sure this is a fapl */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (H5P_get(plist, H5F_ACS_USE_FILE_LOCKING_NAME, use_file_locking) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get use file locking property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get use file locking property"); if (H5P_get(plist, H5F_ACS_IGNORE_DISABLED_FILE_LOCKS_NAME, ignore_when_disabled) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get ignore disabled file locks property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get ignore disabled file locks property"); done: FUNC_LEAVE_API(ret_value) @@ -5099,7 +5099,7 @@ H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective) * are sub-classes of link access property lists -QAK) */ if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* set property to either TRUE if > 0, or FALSE otherwise */ if (is_collective) @@ -5109,11 +5109,11 @@ H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective) /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5_COLL_MD_READ_FLAG_NAME, &coll_meta_read) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set collective metadata read flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set collective metadata read flag"); done: FUNC_LEAVE_API(ret_value) @@ -5146,7 +5146,7 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/) * are sub-classes of link access property lists -QAK) */ if (TRUE != H5P_isa_class(plist_id, H5P_LINK_ACCESS) && TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get value */ if (is_collective) { @@ -5156,10 +5156,10 @@ H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective /*out*/) /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5_COLL_MD_READ_FLAG_NAME, &internal_flag) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag"); if (internal_flag < 0) *is_collective = FALSE; @@ -5192,15 +5192,15 @@ H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective) /* Compare the property list's class against the other class */ if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, &is_collective) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set collective metadata write flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set collective metadata write flag"); done: FUNC_LEAVE_API(ret_value) @@ -5226,17 +5226,17 @@ H5Pget_mpi_params(hid_t plist_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/ /* Make sure that the property list is a fapl */ if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the properties */ if (H5P_get(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI communicator from plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI communicator from plist"); if (H5P_get(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI info from plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get MPI info from plist"); done: FUNC_LEAVE_API(ret_value) @@ -5262,21 +5262,21 @@ H5Pset_mpi_params(hid_t plist_id, MPI_Comm comm, MPI_Info info) /* Make sure the MPI communicator is valid */ if (MPI_COMM_NULL == comm) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "not a valid argument") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "not a valid argument"); /* Make sure that the property list is a fapl */ if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not a file access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set values */ if (H5P_set(plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI communicator"); if (H5P_set(plist, H5F_ACS_MPI_PARAMS_INFO_NAME, &info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI info object"); done: FUNC_LEAVE_API(ret_value) @@ -5304,7 +5304,7 @@ H5P__facc_mpi_comm_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make a copy of the MPI communicator */ if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator"); done: /* Copy the communicator to the in/out parameter */ @@ -5338,7 +5338,7 @@ H5P__facc_mpi_comm_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make a copy of the MPI communicator */ if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator"); done: /* Copy the communicator to the out parameter */ @@ -5371,7 +5371,7 @@ H5P__facc_mpi_comm_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Free the MPI communicator */ if (H5_mpi_comm_free(comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI communicator"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5398,7 +5398,7 @@ H5P__facc_mpi_comm_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s /* Make a copy of the MPI communicator */ if (H5_mpi_comm_dup(*comm, &comm_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI communicator"); done: /* Copy the communicator to the in/out parameter */ @@ -5434,7 +5434,7 @@ H5P__facc_mpi_comm_cmp(const void *_comm1, const void *_comm2, size_t H5_ATTR_UN /* Compare the MPI communicators */ if (H5_mpi_comm_cmp(*comm1, *comm2, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, 0, "unable to compare MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, 0, "unable to compare MPI communicator"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5460,7 +5460,7 @@ H5P__facc_mpi_comm_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED /* Free the MPI communicator */ if (H5_mpi_comm_free(comm) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI communicator") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI communicator"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5488,7 +5488,7 @@ H5P__facc_mpi_info_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make a copy of the MPI info object */ if (H5_mpi_info_dup(*info, &info_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object"); done: /* Copy the info object to the in/out parameter */ @@ -5522,7 +5522,7 @@ H5P__facc_mpi_info_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make a copy of the MPI communicator */ if (H5_mpi_info_dup(*info, &info_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object"); done: /* Copy the info object to the out parameter */ @@ -5555,7 +5555,7 @@ H5P__facc_mpi_info_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Free the MPI info object */ if (H5_mpi_info_free(info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI info object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5582,7 +5582,7 @@ H5P__facc_mpi_info_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s /* Make a copy of the MPI info object */ if (H5_mpi_info_dup(*info, &info_tmp) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to duplicate MPI info object"); done: /* Copy the info object to the in/out parameter */ @@ -5618,7 +5618,7 @@ H5P__facc_mpi_info_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UN /* Compare the MPI info objects */ if (H5_mpi_info_cmp(*info1, *info2, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, 0, "unable to compare MPI info objects") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, 0, "unable to compare MPI info objects"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5644,7 +5644,7 @@ H5P__facc_mpi_info_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED /* Free the MPI info object */ if (H5_mpi_info_free(info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI info object") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "unable to free MPI info object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5670,14 +5670,14 @@ H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective /*out*/) /* Compare the property list's class against the other class */ if (TRUE != H5P_isa_class(plist_id, H5P_FILE_ACCESS)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "property list is not an access plist"); /* Get the plist structure */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5F_ACS_COLL_MD_WRITE_FLAG_NAME, is_collective) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get collective metadata write flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get collective metadata write flag"); done: FUNC_LEAVE_API(ret_value) @@ -5706,14 +5706,14 @@ H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_perc, /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (min_meta_perc > 100) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Minimum metadata fractions must be between 0 and 100 inclusive") + "Minimum metadata fractions must be between 0 and 100 inclusive"); if (min_raw_perc > 100) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "Minimum raw data fractions must be between 0 and 100 inclusive") + "Minimum raw data fractions must be between 0 and 100 inclusive"); if (min_meta_perc + min_raw_perc > 100) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, @@ -5721,11 +5721,11 @@ H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_perc, /* Set size */ if (H5P_set(plist, H5F_ACS_PAGE_BUFFER_SIZE_NAME, &buf_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set page buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set page buffer size"); if (H5P_set(plist, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_NAME, &min_meta_perc) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set percentage of min metadata entries") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set percentage of min metadata entries"); if (H5P_set(plist, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_NAME, &min_raw_perc) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set percentage of min raw data entries") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set percentage of min raw data entries"); done: FUNC_LEAVE_API(ret_value) @@ -5752,19 +5752,19 @@ H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size /*out*/, unsigned *min_ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get size */ if (buf_size) if (H5P_get(plist, H5F_ACS_PAGE_BUFFER_SIZE_NAME, buf_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer size"); if (min_meta_perc) if (H5P_get(plist, H5F_ACS_PAGE_BUFFER_MIN_META_PERC_NAME, min_meta_perc) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer minimum metadata percent") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer minimum metadata percent"); if (min_raw_perc) if (H5P_get(plist, H5F_ACS_PAGE_BUFFER_MIN_RAW_PERC_NAME, min_raw_perc) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer minimum raw data percent") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get page buffer minimum raw data percent"); done: FUNC_LEAVE_API(ret_value) @@ -5790,7 +5790,7 @@ H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info) FUNC_ENTER_NOAPI(FAIL) if (NULL == H5I_object_verify(vol_id, H5I_VOL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { H5VL_connector_prop_t vol_prop; /* Property for VOL ID & info */ @@ -5801,7 +5801,7 @@ H5P_set_vol(H5P_genplist_t *plist, hid_t vol_id, const void *vol_info) /* Set the connector ID & info property */ if (H5P_set(plist, H5F_ACS_VOL_CONN_NAME, &vol_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL connector ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL connector ID & info"); } /* end if */ else HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); @@ -5833,11 +5833,11 @@ H5P_reset_vol_class(const H5P_genclass_t *pclass, const H5VL_connector_prop_t *v /* Get the connector ID & info property */ if (H5P__class_get(pclass, H5F_ACS_VOL_CONN_NAME, &old_vol_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector ID & info"); /* Set the new connector ID & info property */ if (H5P__class_set(pclass, H5F_ACS_VOL_CONN_NAME, vol_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL connector ID & info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL connector ID & info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5865,13 +5865,13 @@ H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info) /* Check arguments */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (NULL == H5I_object_verify(new_vol_id, H5I_VOL)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file VOL ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file VOL ID"); /* Set the VOL */ if (H5P_set_vol(plist, new_vol_id, new_vol_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL"); done: FUNC_LEAVE_API(ret_value) @@ -5902,7 +5902,7 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/) /* Get property list for ID */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the current VOL ID */ if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { @@ -5910,17 +5910,17 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/) /* Get the connector property */ if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector info"); /* Increment the VOL ID's ref count */ if (H5I_inc_ref(connector_prop.connector_id, TRUE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VOL connector ID") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VOL connector ID"); /* Set the connector ID to return */ *vol_id = connector_prop.connector_id; } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); done: FUNC_LEAVE_API(ret_value) @@ -5948,7 +5948,7 @@ H5Pget_vol_info(hid_t plist_id, void **vol_info /*out*/) /* Get property list for ID */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the current VOL info */ if (TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) { @@ -5957,7 +5957,7 @@ H5Pget_vol_info(hid_t plist_id, void **vol_info /*out*/) /* Get the connector property */ if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector property"); /* Copy connector info, if it exists */ if (connector_prop.connector_info) { @@ -5965,18 +5965,18 @@ H5Pget_vol_info(hid_t plist_id, void **vol_info /*out*/) /* Retrieve the connector for the ID */ if (NULL == (connector = (H5VL_class_t *)H5I_object(connector_prop.connector_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allocate and copy connector info */ if (H5VL_copy_connector_info(connector, &new_connector_info, connector_prop.connector_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "connector info copy failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "connector info copy failed"); } /* end if */ /* Set the connector info */ *vol_info = new_connector_info; } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); done: FUNC_LEAVE_API(ret_value) @@ -6025,18 +6025,18 @@ H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags) /* Get property list for ID */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get the connector property */ if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector property"); /* Query the capability flags */ if (H5VL_get_cap_flags(&connector_prop, cap_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector capability flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector capability flags"); } else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); } done: @@ -6062,7 +6062,7 @@ H5P__facc_vol_create(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size /* Make copy of the VOL connector */ if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6091,7 +6091,7 @@ H5P__facc_vol_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, /* Make copy of VOL connector ID & info */ if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6120,7 +6120,7 @@ H5P__facc_vol_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, /* Make copy of VOL connector */ if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6146,7 +6146,7 @@ H5P__facc_vol_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, /* Free the VOL connector ID & info */ if (H5VL_conn_free((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6171,7 +6171,7 @@ H5P__facc_vol_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, /* Make copy of VOL connector */ if (H5VL_conn_copy((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6255,7 +6255,7 @@ H5P__facc_vol_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, /* Free the VOL connector */ if (H5VL_conn_free((H5VL_connector_prop_t *)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release VOL connector") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "can't release VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index 82a0543..9c14add 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -213,88 +213,88 @@ H5P__fcrt_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE, &H5F_def_userblock_size_g, NULL, NULL, NULL, H5F_CRT_USER_BLOCK_ENC, H5F_CRT_USER_BLOCK_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the 1/2 rank for symbol table leaf nodes */ if (H5P__register_real(pclass, H5F_CRT_SYM_LEAF_NAME, H5F_CRT_SYM_LEAF_SIZE, &H5F_def_sym_leaf_k_g, NULL, NULL, NULL, H5F_CRT_SYM_LEAF_ENC, H5F_CRT_SYM_LEAF_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the 1/2 rank for btree internal nodes */ if (H5P__register_real(pclass, H5F_CRT_BTREE_RANK_NAME, H5F_CRT_BTREE_RANK_SIZE, H5F_def_btree_k_g, NULL, NULL, NULL, H5F_CRT_BTREE_RANK_ENC, H5F_CRT_BTREE_RANK_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the byte number for an address */ if (H5P__register_real(pclass, H5F_CRT_ADDR_BYTE_NUM_NAME, H5F_CRT_ADDR_BYTE_NUM_SIZE, &H5F_def_sizeof_addr_g, NULL, NULL, NULL, H5F_CRT_ADDR_BYTE_NUM_ENC, H5F_CRT_ADDR_BYTE_NUM_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the byte number for object size */ if (H5P__register_real(pclass, H5F_CRT_OBJ_BYTE_NUM_NAME, H5F_CRT_OBJ_BYTE_NUM_SIZE, &H5F_def_sizeof_size_g, NULL, NULL, NULL, H5F_CRT_OBJ_BYTE_NUM_ENC, H5F_CRT_OBJ_BYTE_NUM_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the superblock version number */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5F_CRT_SUPER_VERS_NAME, H5F_CRT_SUPER_VERS_SIZE, &H5F_def_superblock_ver_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the shared OH message information */ if (H5P__register_real(pclass, H5F_CRT_SHMSG_NINDEXES_NAME, H5F_CRT_SHMSG_NINDEXES_SIZE, &H5F_def_num_sohm_indexes_g, NULL, NULL, NULL, H5F_CRT_SHMSG_NINDEXES_ENC, H5F_CRT_SHMSG_NINDEXES_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5F_CRT_SHMSG_INDEX_TYPES_NAME, H5F_CRT_SHMSG_INDEX_TYPES_SIZE, &H5F_def_sohm_index_flags_g, NULL, NULL, NULL, H5F_CRT_SHMSG_INDEX_TYPES_ENC, H5F_CRT_SHMSG_INDEX_TYPES_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, H5F_CRT_SHMSG_INDEX_MINSIZE_SIZE, &H5F_def_sohm_index_minsizes_g, NULL, NULL, NULL, H5F_CRT_SHMSG_INDEX_MINSIZE_ENC, H5F_CRT_SHMSG_INDEX_MINSIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the shared OH cutoff size information */ if (H5P__register_real(pclass, H5F_CRT_SHMSG_LIST_MAX_NAME, H5F_CRT_SHMSG_LIST_MAX_SIZE, &H5F_def_sohm_list_max_g, NULL, NULL, NULL, H5F_CRT_SHMSG_LIST_MAX_ENC, H5F_CRT_SHMSG_LIST_MAX_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); if (H5P__register_real(pclass, H5F_CRT_SHMSG_BTREE_MIN_NAME, H5F_CRT_SHMSG_BTREE_MIN_SIZE, &H5F_def_sohm_btree_min_g, NULL, NULL, NULL, H5F_CRT_SHMSG_BTREE_MIN_ENC, H5F_CRT_SHMSG_BTREE_MIN_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the file space handling strategy */ if (H5P__register_real(pclass, H5F_CRT_FILE_SPACE_STRATEGY_NAME, H5F_CRT_FILE_SPACE_STRATEGY_SIZE, &H5F_def_file_space_strategy_g, NULL, NULL, NULL, H5F_CRT_FILE_SPACE_STRATEGY_ENC, H5F_CRT_FILE_SPACE_STRATEGY_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the free-space persist flag */ if (H5P__register_real(pclass, H5F_CRT_FREE_SPACE_PERSIST_NAME, H5F_CRT_FREE_SPACE_PERSIST_SIZE, &H5F_def_free_space_persist_g, NULL, NULL, NULL, H5F_CRT_FREE_SPACE_PERSIST_ENC, H5F_CRT_FREE_SPACE_PERSIST_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the free space section threshold */ if (H5P__register_real(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &H5F_def_free_space_threshold_g, NULL, NULL, NULL, H5F_CRT_FREE_SPACE_THRESHOLD_ENC, H5F_CRT_FREE_SPACE_THRESHOLD_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the file space page size */ if (H5P__register_real(pclass, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, H5F_CRT_FILE_SPACE_PAGE_SIZE_SIZE, &H5F_def_file_space_page_size_g, NULL, NULL, NULL, H5F_CRT_FILE_SPACE_PAGE_SIZE_ENC, H5F_CRT_FILE_SPACE_PAGE_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -323,20 +323,20 @@ H5Pset_userblock(hid_t plist_id, hsize_t size) if (size > 0) { /* Check that the userblock size is >=512 */ if (size < 512) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "userblock size is non-zero and less than 512") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "userblock size is non-zero and less than 512"); /* Check that the userblock size is a power of two */ if (!POWER_OF_TWO(size)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "userblock size is non-zero and not a power of two") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "userblock size is non-zero and not a power of two"); } /* end if */ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (H5P_set(plist, H5F_CRT_USER_BLOCK_NAME, &size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set user block") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set user block"); done: FUNC_LEAVE_API(ret_value) @@ -399,29 +399,29 @@ H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size) /* Check arguments */ if (sizeof_addr) { if (sizeof_addr != 2 && sizeof_addr != 4 && sizeof_addr != 8 && sizeof_addr != 16) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file haddr_t size is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file haddr_t size is not valid"); } /* end if */ if (sizeof_size) { if (sizeof_size != 2 && sizeof_size != 4 && sizeof_size != 8 && sizeof_size != 16) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file size_t size is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file size_t size is not valid"); } /* end if */ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (sizeof_addr) { uint8_t tmp_sizeof_addr = (uint8_t)sizeof_addr; if (H5P_set(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &tmp_sizeof_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set byte number for an address") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set byte number for an address"); } /* end if */ if (sizeof_size) { uint8_t tmp_sizeof_size = (uint8_t)sizeof_size; if (H5P_set(plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &tmp_sizeof_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set byte number for object ") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set byte number for object "); } /* end if */ done: @@ -451,21 +451,21 @@ H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /* /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (sizeof_addr) { uint8_t tmp_sizeof_addr; if (H5P_get(plist, H5F_CRT_ADDR_BYTE_NUM_NAME, &tmp_sizeof_addr) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for an address") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for an address"); *sizeof_addr = tmp_sizeof_addr; } /* end if */ if (sizeof_size) { uint8_t tmp_sizeof_size; if (H5P_get(plist, H5F_CRT_OBJ_BYTE_NUM_NAME, &tmp_sizeof_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for object ") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get byte number for object "); *sizeof_size = tmp_sizeof_size; } /* end if */ @@ -722,7 +722,7 @@ H5P__fcrt_btree_rank_dec(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); /* Decode all the type flags */ for (u = 0; u < H5B_NUM_BTREE_ID; u++) @@ -831,15 +831,15 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_ /* Check arguments */ if (mesg_type_flags > H5O_SHMESG_ALL_FLAG) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unrecognized flags in mesg_type_flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unrecognized flags in mesg_type_flags"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Read the current number of indexes */ if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &nindexes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of indexes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of indexes"); /* Range check */ if (index_num >= nindexes) @@ -847,9 +847,9 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_ /* Get arrays of type flags and message sizes */ if (H5P_get(plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, type_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current index type flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current index type flags"); if (H5P_get(plist, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, minsizes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current min sizes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current min sizes"); /* Set values in arrays */ type_flags[index_num] = mesg_type_flags; @@ -857,9 +857,9 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_ /* Write arrays back to plist */ if (H5P_set(plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, type_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set index type flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set index type flags"); if (H5P_set(plist, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, minsizes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set min mesg sizes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set min mesg sizes"); done: FUNC_LEAVE_API(ret_value) @@ -891,21 +891,21 @@ H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Read the current number of indexes */ if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &nindexes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of indexes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of indexes"); if (index_num >= nindexes) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, - "index_num is greater than number of indexes in property list") + "index_num is greater than number of indexes in property list"); /* Get arrays of type flags and message sizes */ if (H5P_get(plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, type_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current index type flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current index type flags"); if (H5P_get(plist, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, minsizes) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current min sizes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get current min sizes"); /* Get values from arrays */ if (mesg_type_flags) @@ -992,7 +992,7 @@ H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); /* Decode all the type flags */ for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++) @@ -1077,7 +1077,7 @@ H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *_value) /* Decode the size */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); /* Decode all the minsize values */ for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++) @@ -1118,11 +1118,11 @@ H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_ * Range check to make certain they will fit into encoded form. */ if (max_list + 1 < min_btree) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "minimum B-tree value is greater than maximum list value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "minimum B-tree value is greater than maximum list value"); if (max_list > H5O_SHMESG_MAX_LIST_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max list value is larger than H5O_SHMESG_MAX_LIST_SIZE") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max list value is larger than H5O_SHMESG_MAX_LIST_SIZE"); if (min_btree > H5O_SHMESG_MAX_LIST_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min btree value is larger than H5O_SHMESG_MAX_LIST_SIZE") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min btree value is larger than H5O_SHMESG_MAX_LIST_SIZE"); /* Avoid the strange case where max_list == 0 and min_btree == 1, so deleting the * last message in a B-tree makes it become an empty list. @@ -1201,23 +1201,23 @@ H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool /* Check arguments */ if (strategy >= H5F_FSPACE_STRATEGY_NTYPES) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value(s), if non-zero */ if (H5P_set(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &strategy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file space strategy") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file space strategy"); /* Ignore persist and threshold settings for strategies that do not use FSM */ if (strategy == H5F_FSPACE_STRATEGY_FSM_AGGR || strategy == H5F_FSPACE_STRATEGY_PAGE) { if (H5P_set(plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, &persist) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set free-space persisting status") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set free-space persisting status"); if (H5P_set(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set free-space threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set free-space threshold"); } /* end if */ done: @@ -1246,18 +1246,18 @@ H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy /*out /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value(s) */ if (strategy) if (H5P_get(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, strategy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space strategy") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space strategy"); if (persist) if (H5P_get(plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, persist) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space persisting status") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space persisting status"); if (threshold) if (H5P_get(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, threshold) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space threshold") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space threshold"); done: FUNC_LEAVE_API(ret_value) @@ -1349,17 +1349,17 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "cannot set file space page size to less than 512") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "cannot set file space page size to less than 512"); if (fsp_size > H5F_FILE_SPACE_PAGE_SIZE_MAX) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "cannot set file space page size to more than 1GB") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "cannot set file space page size to more than 1GB"); /* Set the value*/ if (H5P_set(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size"); done: FUNC_LEAVE_API(ret_value) @@ -1386,12 +1386,12 @@ H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (fsp_size) if (H5P_get(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, fsp_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space page size") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space page size"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c index 806fcac..9dac659 100644 --- a/src/H5Pfmpl.c +++ b/src/H5Pfmpl.c @@ -111,7 +111,7 @@ H5P__fmnt_reg_prop(H5P_genclass_t *pclass) /* Register property of whether symlinks is local to file */ if (H5P__register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &H5F_def_local_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index c126ee3..cf60f43 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -121,13 +121,13 @@ H5P__gcrt_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &H5G_def_ginfo_g, NULL, NULL, NULL, H5G_CRT_GROUP_INFO_ENC, H5G_CRT_GROUP_INFO_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register link info property */ if (H5P__register_real(pclass, H5G_CRT_LINK_INFO_NAME, H5G_CRT_LINK_INFO_SIZE, &H5G_def_linfo_g, NULL, NULL, NULL, H5G_CRT_LINK_INFO_ENC, H5G_CRT_LINK_INFO_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -154,18 +154,18 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); /* Update field */ H5_CHECKED_ASSIGN(ginfo.lheap_size_hint, uint32_t, size_hint, size_t); /* Set value */ if (H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info"); done: FUNC_LEAVE_API(ret_value) @@ -195,11 +195,11 @@ H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); /* Update field */ *size_hint = ginfo.lheap_size_hint; @@ -236,19 +236,19 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens /* Range check values */ if (max_compact < min_dense) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be >= min dense value") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be >= min dense value"); if (max_compact > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be < 65536"); if (min_dense > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); /* Update fields */ if (max_compact != H5G_CRT_GINFO_MAX_COMPACT || min_dense != H5G_CRT_GINFO_MIN_DENSE) @@ -260,7 +260,7 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens /* Set group info */ if (H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info"); done: FUNC_LEAVE_API(ret_value) @@ -291,11 +291,11 @@ H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); if (max_compact) *max_compact = ginfo.max_compact; @@ -336,17 +336,17 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name /* Range check values */ if (est_num_entries > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. number of entries must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. number of entries must be < 65536"); if (est_name_len > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. name length must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. name length must be < 65536"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); /* Update fields */ if (est_num_entries != H5G_CRT_GINFO_EST_NUM_ENTRIES || est_name_len != H5G_CRT_GINFO_EST_NAME_LEN) @@ -358,7 +358,7 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name /* Set group info */ if (H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info"); done: FUNC_LEAVE_API(ret_value) @@ -389,11 +389,11 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get group info */ if (H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info"); if (est_num_entries) *est_num_entries = ginfo.est_num_entries; @@ -426,15 +426,15 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags) /* Check for bad combination of flags */ if (!(crt_order_flags & H5P_CRT_ORDER_TRACKED) && (crt_order_flags & H5P_CRT_ORDER_INDEXED)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get link info */ if (H5P_get(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info"); /* Update fields */ linfo.track_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE); @@ -442,7 +442,7 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags) /* Set link info */ if (H5P_set(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set link info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set link info"); done: FUNC_LEAVE_API(ret_value) @@ -476,11 +476,11 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get link info */ if (H5P_get(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info"); *crt_order_flags |= linfo.track_corder ? H5P_CRT_ORDER_TRACKED : 0; *crt_order_flags |= linfo.index_corder ? H5P_CRT_ORDER_INDEXED : 0; @@ -632,7 +632,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value) enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); /* Set property to default value */ memset(linfo, 0, sizeof(H5O_linfo_t)); diff --git a/src/H5Pint.c b/src/H5Pint.c index 40d90bc..b9db915 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -439,9 +439,9 @@ H5P_init_phase1(void) * Initialize the Generic Property class & object groups. */ if (H5I_register_type(H5I_GENPROPCLS_CLS) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group"); if (H5I_register_type(H5I_GENPROPLST_CLS) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group") + HGOTO_ERROR(H5E_ID, H5E_CANTINIT, FAIL, "unable to initialize ID group"); /* Repeatedly pass over the list of property list classes for the library, * initializing each class if its parent class is initialized, until no @@ -469,22 +469,22 @@ H5P_init_phase1(void) lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed"); /* Call routine to register properties for class */ if (lib_class->reg_prop_func && (*lib_class->reg_prop_func)(*lib_class->pclass) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register properties"); /* Register the new class */ if ((*lib_class->class_id = H5I_register(H5I_GENPROP_CLS, *lib_class->pclass, FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class"); /* Only register the default property list if it hasn't been created yet */ if (lib_class->def_plist_id && *lib_class->def_plist_id == (-1)) { /* Register the default property list for the new class*/ if ((*lib_class->def_plist_id = H5P_create_id(*lib_class->pclass, FALSE)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, - "can't register default property list for class") + "can't register default property list for class"); } /* end if */ /* Increment class initialization counters */ @@ -546,7 +546,7 @@ H5P_init_phase2(void) /* Set up the default VFL driver */ if (H5P__facc_set_def_driver() < 0) - HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "unable to set default VFL driver") + HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "unable to set default VFL driver"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -776,23 +776,23 @@ H5P__do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb) /* Allocate space for a temporary copy of the property value */ if (NULL == (tmp_value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary property value"); H5MM_memcpy(tmp_value, prop->value, prop->size); /* Call "type 1" callback ('create', 'copy' or 'close') */ if (cb(prop->name, prop->size, tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Property callback failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Property callback failed"); /* Make a copy of the class's property */ if (NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); /* Copy the changed value into the new property */ H5MM_memcpy(pcopy->value, tmp_value, prop->size); /* Insert the changed property into the property list */ if (H5P__add_prop(slist, pcopy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into skip list"); done: /* Release the temporary value buffer */ @@ -846,7 +846,7 @@ H5P__copy_pclass(H5P_genclass_t *pclass) if (NULL == (new_pclass = H5P__create_class(pclass->parent, pclass->name, pclass->type, pclass->create_func, pclass->create_data, pclass->copy_func, pclass->copy_data, pclass->close_func, pclass->close_data))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "unable to create property list class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "unable to create property list class"); /* Copy the properties registered for this class */ if (pclass->nprops > 0) { @@ -857,11 +857,11 @@ H5P__copy_pclass(H5P_genclass_t *pclass) while (curr_node != NULL) { /* Make a copy of the class's property */ if (NULL == (pcopy = H5P__dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "Can't copy property"); /* Insert the initialized property into the property list */ if (H5P__add_prop(new_pclass->props, pcopy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, NULL, "Can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, NULL, "Can't insert property into class"); /* Increment property count for class */ new_pclass->nprops++; @@ -926,7 +926,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Allocate room for the property list */ if (NULL == (new_plist = H5FL_CALLOC(H5P_genplist_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed"); /* Set class state */ new_plist->pclass = old_plist->pclass; @@ -936,12 +936,12 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Initialize the skip list to hold the changed properties */ if ((new_plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, - "can't create skip list for changed properties") + "can't create skip list for changed properties"); /* Create the skip list for deleted properties */ if ((new_plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, - "can't create skip list for deleted properties") + "can't create skip list for deleted properties"); /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -949,7 +949,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) * already been seen) */ if ((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "can't create skip list for seen properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "can't create skip list for seen properties"); nseen = 0; /* Cycle through the deleted properties & copy them into the new list's deleted section */ @@ -960,17 +960,17 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Duplicate string for insertion into new deleted property skip list */ if ((new_name = H5MM_xstrdup((char *)H5SL_item(curr_node))) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed"); /* Insert property name into deleted list */ if (H5SL_insert(new_plist->del, new_name, new_name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, - "can't insert property into deleted skip list") + "can't insert property into deleted skip list"); /* Add property name to "seen" list */ if (H5SL_insert(seen, new_name, new_name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, - "can't insert property into seen skip list") + "can't insert property into seen skip list"); nseen++; /* Get the next property node in the skip list */ @@ -987,26 +987,26 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Make a copy of the list's property */ if (NULL == (new_prop = H5P__dup_prop(tmp, H5P_PROP_WITHIN_LIST))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property"); /* Call property copy callback, if it exists */ if (new_prop->copy) { if ((new_prop->copy)(new_prop->name, new_prop->size, new_prop->value) < 0) { H5P__free_prop(new_prop); - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property"); } /* end if */ } /* end if */ /* Insert the initialized property into the property list */ if (H5P__add_prop(new_plist->props, new_prop) < 0) { H5P__free_prop(new_prop); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "Can't insert property into list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "Can't insert property into list"); } /* end if */ /* Add property name to "seen" list */ if (H5SL_insert(seen, new_prop->name, new_prop->name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, - "can't insert property into seen skip list") + "can't insert property into seen skip list"); nseen++; /* Increment the number of properties in list */ @@ -1037,14 +1037,14 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) if (tmp->copy) { /* Call the callback & insert changed value into skip list (if necessary) */ if (H5P__do_prop_cb1(new_plist->props, tmp, tmp->copy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't create property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't create property"); } /* end if */ /* Add property name to "seen" list, if we have other classes to work on */ if (has_parent_class) { if (H5SL_insert(seen, tmp->name, tmp->name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, - "can't insert property into seen skip list") + "can't insert property into seen skip list"); nseen++; } /* end if */ @@ -1063,11 +1063,11 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) /* Increment the number of property lists derived from class */ if (H5P__access_class(new_plist->pclass, H5P_MOD_INC_LST) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ref count") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ref count"); /* Get an ID for the property list */ if ((new_plist_id = H5I_register(H5I_GENPROP_LST, new_plist, app_ref)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list"); /* Save the property list ID in the property list struct, for use in the property class's 'close' callback */ @@ -1082,7 +1082,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref) if ((tclass->copy_func)(new_plist_id, old_plist->plist_id, old_plist->pclass->copy_data) < 0) { /* Delete ID, ignore return value */ H5I_remove(new_plist_id); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property"); } /* end if */ } /* end if */ @@ -1139,7 +1139,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type) /* Allocate the new property */ if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy basic property information */ H5MM_memcpy(prop, oprop, sizeof(H5P_genprop_t)); @@ -1181,7 +1181,7 @@ H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type) if (oprop->value != NULL) { assert(prop->size > 0); if (NULL == (prop->value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(prop->value, oprop->value, prop->size); } /* end if */ @@ -1254,7 +1254,7 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo /* Allocate the new property */ if (NULL == (prop = H5FL_MALLOC(H5P_genprop_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set the property initial values */ prop->name = H5MM_xstrdup(name); /* Duplicate name */ @@ -1265,7 +1265,7 @@ H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type, const vo /* Duplicate value, if it exists */ if (value != NULL) { if (NULL == (prop->value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5MM_memcpy(prop->value, value, prop->size); } /* end if */ else @@ -1335,7 +1335,7 @@ H5P__add_prop(H5SL_t *slist, H5P_genprop_t *prop) /* Insert property into skip list */ if (H5SL_insert(slist, prop, prop->name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1371,7 +1371,7 @@ H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name) /* Check if the property has been deleted from list */ if (H5SL_search(plist->del, name) != NULL) { - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "property deleted from skip list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "property deleted from skip list"); } /* end if */ else { /* Get the property data from the skip list */ @@ -1392,7 +1392,7 @@ H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name) /* Check if we haven't found the property */ if (ret_value == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't find property in skip list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't find property in skip list"); } /* end else */ } /* end else */ @@ -1430,7 +1430,7 @@ H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name) /* Get the property from the skip list */ if (NULL == (ret_value = (H5P_genprop_t *)H5SL_search(pclass->props, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't find property in skip list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't find property in skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1737,12 +1737,12 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t /* Allocate room for the class */ if (NULL == (pclass = H5FL_CALLOC(H5P_genclass_t))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "property list class allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "property list class allocation failed"); /* Set class state */ pclass->parent = par_class; if (NULL == (pclass->name = H5MM_xstrdup(name))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "property list class name allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, NULL, "property list class name allocation failed"); pclass->type = type; pclass->nprops = 0; /* Classes are created without properties initially */ pclass->plists = 0; /* No properties lists of this class yet */ @@ -1753,7 +1753,7 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t /* Create the skip list for properties */ if (NULL == (pclass->props = H5SL_create(H5SL_TYPE_STR, NULL))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for properties"); /* Set callback functions and pass-along data */ pclass->create_func = cls_create; @@ -1766,7 +1766,7 @@ H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t /* Increment parent class's derived class value */ if (par_class != NULL) { if (H5P__access_class(par_class, H5P_MOD_INC_CLS) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment parent class ref count") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment parent class ref count"); } /* end if */ /* Set return value */ @@ -1833,7 +1833,7 @@ H5P__create(H5P_genclass_t *pclass) /* Allocate room for the property list */ if (NULL == (plist = H5FL_CALLOC(H5P_genplist_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set class state */ plist->pclass = pclass; @@ -1842,11 +1842,11 @@ H5P__create(H5P_genclass_t *pclass) /* Create the skip list for changed properties */ if ((plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for changed properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for changed properties"); /* Create the skip list for deleted properties */ if ((plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for deleted properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for deleted properties"); /* Create the skip list to hold names of properties already seen * (This prevents a property in the class hierarchy from having it's @@ -1854,7 +1854,7 @@ H5P__create(H5P_genclass_t *pclass) * already been seen) */ if ((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for seen properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "can't create skip list for seen properties"); /* * Check if we should copy class properties (up through list of parent classes also), @@ -1877,13 +1877,13 @@ H5P__create(H5P_genclass_t *pclass) if (tmp->create) { /* Call the callback & insert changed value into skip list (if necessary) */ if (H5P__do_prop_cb1(plist->props, tmp, tmp->create) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "Can't create property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "Can't create property"); } /* end if */ /* Add property name to "seen" list */ if (H5SL_insert(seen, tmp->name, tmp->name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, NULL, - "can't insert property into seen skip list") + "can't insert property into seen skip list"); /* Increment the number of properties in list */ plist->nprops++; @@ -1900,7 +1900,7 @@ H5P__create(H5P_genclass_t *pclass) /* Increment the number of property lists derived from class */ if (H5P__access_class(plist->pclass, H5P_MOD_INC_LST) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment class ref count") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment class ref count"); /* Set return value */ ret_value = plist; @@ -1968,11 +1968,11 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref) /* Create the new property list */ if ((plist = H5P__create(pclass)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list"); /* Get an ID for the property list */ if ((plist_id = H5I_register(H5I_GENPROP_LST, plist, app_ref)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register property list"); /* Save the property list ID in the property list struct, for use in the property class's 'close' callback */ @@ -1987,7 +1987,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref) if ((tclass->create_func)(plist_id, tclass->create_data) < 0) { /* Delete ID, ignore return value */ H5I_remove(plist_id); - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property"); } /* end if */ } /* end if */ @@ -2212,17 +2212,17 @@ H5P__register_real(H5P_genclass_t *pclass, const char *name, size_t size, const /* Check for duplicate named properties */ if (NULL != H5SL_search(pclass->props, name)) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); /* Create property object from parameters */ if (NULL == (new_prop = H5P__create_prop(name, size, H5P_PROP_WITHIN_CLASS, def_value, prp_create, prp_set, prp_get, prp_encode, prp_decode, prp_delete, prp_copy, prp_cmp, prp_close))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property"); /* Insert property into property list class */ if (H5P__add_prop(pclass->props, new_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class"); /* Increment property count for class */ pclass->nprops++; @@ -2445,7 +2445,7 @@ H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size, const voi if (NULL == (new_class = H5P__create_class( pclass->parent, pclass->name, pclass->type, pclass->create_func, pclass->create_data, pclass->copy_func, pclass->copy_data, pclass->close_func, pclass->close_data))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy class"); /* Walk through the skip list of the old class and copy properties */ if (pclass->nprops > 0) { @@ -2459,11 +2459,11 @@ H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size, const voi /* Make a copy of the class's property */ if (NULL == (pcopy = H5P__dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); /* Insert the initialized property into the property class */ if (H5P__add_prop(new_class->props, pcopy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class"); /* Increment property count for class */ new_class->nprops++; @@ -2480,7 +2480,7 @@ H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size, const voi /* Really register the property in the class */ if (H5P__register_real(pclass, name, size, def_value, prp_create, prp_set, prp_get, prp_encode, prp_decode, prp_delete, prp_copy, prp_cmp, prp_close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't register property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't register property"); /* Update pointer to pointer to class, if a new one was generated */ if (new_class) @@ -2680,7 +2680,7 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5 /* Check for duplicate named properties */ if (NULL != H5SL_search(plist->props, name)) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); /* Check if the property has been deleted */ if (NULL != H5SL_search(plist->del, name)) { @@ -2688,7 +2688,7 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5 /* Remove the property name from the deleted property skip list */ if (NULL == (temp_name = (char *)H5SL_remove(plist->del, name))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from deleted skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from deleted skip list"); /* free the name of the removed property */ H5MM_xfree(temp_name); @@ -2702,7 +2702,7 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5 if (tclass->nprops > 0) { /* Find the property in the class */ if (NULL != H5SL_search(tclass->props, name)) - HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists") + HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists"); } /* end if */ /* Go up to parent class */ @@ -2716,11 +2716,11 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, H5 if (NULL == (new_prop = H5P__create_prop(name, size, H5P_PROP_WITHIN_LIST, value, NULL, prp_set, prp_get, prp_encode, prp_decode, prp_delete, prp_copy, prp_cmp, prp_close))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property"); /* Insert property into property list class */ if (H5P__add_prop(plist->props, new_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class"); /* Increment property count for class */ plist->nprops++; @@ -2774,13 +2774,13 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op /* Check if the property has been deleted */ if (NULL != H5SL_search(plist->del, name)) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Find property in changed list */ if (NULL != (prop = (H5P_genprop_t *)H5SL_search(plist->props, name))) { /* Call the 'found in property list' callback */ if ((*plist_op)(plist, name, prop, udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on property"); } /* end if */ else { /* @@ -2794,7 +2794,7 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op if (NULL != (prop = (H5P_genprop_t *)H5SL_search(tclass->props, name))) { /* Call the 'found in class' callback */ if ((*pclass_op)(plist, name, prop, udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on property"); /* Leave */ break; @@ -2809,7 +2809,7 @@ H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op * nor in the properties in the class hierarchy, indicate an error */ if (NULL == tclass) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't find property in skip list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't find property in skip list"); } /* end else */ done: @@ -2853,7 +2853,7 @@ H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_AT /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Overwrite value in property */ H5MM_memcpy(prop->value, udata->value, prop->size); @@ -2901,17 +2901,17 @@ H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *nam /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Make a copy of the class's property */ if (NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); H5MM_memcpy(pcopy->value, udata->value, pcopy->size); /* Insert the changed property into the property list */ if (H5P__add_prop(plist->props, pcopy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert changed property into skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert changed property into skip list"); done: /* Cleanup on failure */ @@ -2962,7 +2962,7 @@ H5P_poke(H5P_genplist_t *plist, const char *name, const void *value) /* Find the property and set the value */ udata.value = value; if (H5P__do_prop(plist, name, H5P__poke_plist_cb, H5P__poke_pclass_cb, &udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to overwrite value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to overwrite value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3006,18 +3006,18 @@ H5P__set_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Make a copy of the value and pass to 'set' callback */ if (NULL != prop->set) { /* Make a copy of the current value, in case the callback fails */ if (NULL == (tmp_value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value"); H5MM_memcpy(tmp_value, udata->value, prop->size); /* Call user's callback */ if ((*(prop->set))(plist->plist_id, name, prop->size, tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); /* Set the pointer for copying */ prp_value = tmp_value; @@ -3030,7 +3030,7 @@ H5P__set_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, if (NULL != prop->del) { /* Call user's 'delete' callback */ if ((*(prop->del))(plist->plist_id, name, prop->size, prop->value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release property value"); } /* end if */ /* Copy new [possibly unchanged] value into property value */ @@ -3084,18 +3084,18 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Make a copy of the value and pass to 'set' callback */ if (NULL != prop->set) { /* Make a copy of the current value, in case the callback fails */ if (NULL == (tmp_value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value"); H5MM_memcpy(tmp_value, udata->value, prop->size); /* Call user's callback */ if ((*(prop->set))(plist->plist_id, name, prop->size, tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); /* Set the pointer for copying */ prp_value = tmp_value; @@ -3106,13 +3106,13 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, /* Make a copy of the class's property */ if (NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); H5MM_memcpy(pcopy->value, prp_value, pcopy->size); /* Insert the changed property into the property list */ if (H5P__add_prop(plist->props, pcopy) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert changed property into skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert changed property into skip list"); done: /* Free the temporary value buffer */ @@ -3174,7 +3174,7 @@ H5P_set(H5P_genplist_t *plist, const char *name, const void *value) /* Find the property and set the value */ udata.value = value; if (H5P__do_prop(plist, name, H5P__set_plist_cb, H5P__set_pclass_cb, &udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to set value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to set value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3220,11 +3220,11 @@ H5P__class_get(const H5P_genclass_t *pclass, const char *name, void *value) /* Find property in list */ if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Copy the property value */ H5MM_memcpy(value, prop->value, prop->size); @@ -3275,11 +3275,11 @@ H5P__class_set(const H5P_genclass_t *pclass, const char *name, const void *value /* Find property in list */ if (NULL == (prop = (H5P_genprop_t *)H5SL_search(pclass->props, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Copy the property value */ H5MM_memcpy(prop->value, value, prop->size); @@ -3437,7 +3437,7 @@ H5P__get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size) /* Find property */ if (NULL == (prop = H5P__find_prop_plist(plist, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Get property size */ *size = prop->size; @@ -3482,7 +3482,7 @@ H5P__get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size) /* Find property */ if ((prop = H5P__find_prop_pclass(pclass, name)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Get property size */ *size = prop->size; @@ -3866,13 +3866,13 @@ H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata) /* Check if the property exists in the second property list */ if ((prop2_exist = H5P_exist_plist(udata->plist2, prop->name)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "can't lookup existence of property?") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "can't lookup existence of property?"); if (prop2_exist) { const H5P_genprop_t *prop2; /* Pointer to property in second plist */ /* Look up same property in second property list */ if (NULL == (prop2 = H5P__find_prop_plist(udata->plist2, prop->name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "property doesn't exist"); /* Compare the two properties */ if ((udata->cmp_value = H5P__cmp_prop(prop, prop2)) != 0) @@ -3951,7 +3951,7 @@ H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2, int * /* Iterate over properties in first property list */ if ((ret_value = H5P__iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list"); if (ret_value != 0) { *cmp_ret = udata.cmp_value; HGOTO_DONE(SUCCEED); @@ -4053,13 +4053,13 @@ H5P_isa_class(hid_t plist_id, hid_t pclass_id) /* Check arguments. */ if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); if (NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property class"); /* Compare the property list's class against the other class */ if ((ret_value = H5P_class_isa(plist->pclass, pclass)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to compare property list classes"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4102,11 +4102,11 @@ H5P_object_verify(hid_t plist_id, hid_t pclass_id) /* Compare the property list's class against the other class */ if (H5P_isa_class(plist_id, pclass_id) != TRUE) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, NULL, "property list is not a member of the class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, NULL, "property list is not a member of the class"); /* Get the plist structure */ if (NULL == (ret_value = (H5P_genplist_t *)H5I_object(plist_id))) - HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4159,7 +4159,7 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata) /* Add property name to 'seen' list */ if (H5SL_insert(udata->seen, key, key) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert property into 'seen' skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert property into 'seen' skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4281,7 +4281,7 @@ H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx, /* Create the skip list to hold names of properties already seen */ if (NULL == (seen = H5SL_create(H5SL_TYPE_STR, NULL))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't create skip list for seen properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't create skip list for seen properties"); /* Set up iterator callback info */ udata_int.plist = plist; @@ -4493,7 +4493,7 @@ H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDE /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Make a (shallow) copy of the value */ H5MM_memcpy(udata->value, prop->value, prop->size); @@ -4542,7 +4542,7 @@ H5P_peek(H5P_genplist_t *plist, const char *name, void *value) /* Find the property and peek at the value */ udata.value = value; if (H5P__do_prop(plist, name, H5P__peek_cb, H5P__peek_cb, &udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to peek at value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to peek at value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4586,18 +4586,18 @@ H5P__get_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, void * /* Check for property size >0 */ if (0 == prop->size) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size"); /* Call the 'get' callback, if there is one */ if (NULL != prop->get) { /* Make a copy of the current value, in case the callback fails */ if (NULL == (tmp_value = H5MM_malloc(prop->size))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed temporary property value"); H5MM_memcpy(tmp_value, prop->value, prop->size); /* Call user's callback */ if ((*(prop->get))(plist->plist_id, name, prop->size, tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set property value"); /* Copy new [possibly unchanged] value into return value */ H5MM_memcpy(udata->value, tmp_value, prop->size); @@ -4658,7 +4658,7 @@ H5P_get(H5P_genplist_t *plist, const char *name, void *value) /* Find the property and get the value */ udata.value = value; if (H5P__do_prop(plist, name, H5P__get_cb, H5P__get_cb, &udata) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to get value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to get value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4702,20 +4702,20 @@ H5P__del_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, if (NULL != prop->del) { /* Call user's callback */ if ((*(prop->del))(plist->plist_id, name, prop->size, prop->value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't release property value"); } /* end if */ /* Duplicate string for insertion into new deleted property skip list */ if (NULL == (del_name = H5MM_xstrdup(name))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Insert property name into deleted list */ if (H5SL_insert(plist->del, del_name, del_name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into deleted skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into deleted skip list"); /* Remove the property from the skip list */ if (NULL == H5SL_remove(plist->props, prop->name)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from skip list"); /* Free the property, ignoring return value, nothing we can do */ H5P__free_prop(prop); @@ -4772,21 +4772,21 @@ H5P__del_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, /* Allocate space for a temporary copy of the property value */ if (NULL == (tmp_value = H5MM_malloc(prop->size))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, - "memory allocation failed for temporary property value") + "memory allocation failed for temporary property value"); H5MM_memcpy(tmp_value, prop->value, prop->size); /* Call user's callback */ if ((*(prop->del))(plist->plist_id, name, prop->size, tmp_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't close property value"); } /* end if */ /* Duplicate string for insertion into new deleted property skip list */ if (NULL == (del_name = H5MM_xstrdup(name))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Insert property name into deleted list */ if (H5SL_insert(plist->del, del_name, del_name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into deleted skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into deleted skip list"); /* Decrement the number of properties in list */ plist->nprops--; @@ -4843,7 +4843,7 @@ H5P_remove(H5P_genplist_t *plist, const char *name) /* Find the property and get the value */ if (H5P__do_prop(plist, name, H5P__del_plist_cb, H5P__del_pclass_cb, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to remove value") + HGOTO_ERROR(H5E_PLIST, H5E_CANTOPERATE, FAIL, "can't operate on plist to remove value"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4896,30 +4896,30 @@ H5P__copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name) /* Get the objects to operate on */ if (NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_id)) || NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property object doesn't exist"); /* If the property exists in the destination already */ if (NULL != H5P__find_prop_plist(dst_plist, name)) { /* Delete the property from the destination list, calling the 'close' callback if necessary */ if (H5P_remove(dst_plist, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); /* Get the pointer to the source property */ prop = H5P__find_prop_plist(src_plist, name); /* Make a copy of the source property */ if ((new_prop = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); /* Call property copy callback, if it exists */ if (new_prop->copy) { if ((new_prop->copy)(new_prop->name, new_prop->size, new_prop->value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property"); } /* end if */ /* Insert the initialized property into the property list */ if (H5P__add_prop(dst_plist->props, new_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into list"); /* Increment the number of properties in list */ dst_plist->nprops++; @@ -4928,24 +4928,24 @@ H5P__copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name) else { /* Get the pointer to the source property */ if (NULL == (prop = H5P__find_prop_plist(src_plist, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist"); /* Create property object from parameters */ if (NULL == (new_prop = H5P__create_prop(prop->name, prop->size, H5P_PROP_WITHIN_LIST, prop->value, prop->create, prop->set, prop->get, prop->encode, prop->decode, prop->del, prop->copy, prop->cmp, prop->close))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property"); /* Call property creation callback, if it exists */ if (new_prop->create) { if ((new_prop->create)(new_prop->name, new_prop->size, new_prop->value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't initialize property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't initialize property"); } /* end if */ /* Insert property into property list class */ if (H5P__add_prop(dst_plist->props, new_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class"); /* Increment property count for class */ dst_plist->nprops++; @@ -5006,26 +5006,26 @@ H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name) /* Get property list classes */ if (NULL == (src_pclass = (H5P_genclass_t *)H5I_object(src_id))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "source property class object doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "source property class object doesn't exist"); if (NULL == (dst_pclass = (H5P_genclass_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "destination property class object doesn't exist") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "destination property class object doesn't exist"); /* Get the property from the source */ if (NULL == (prop = H5P__find_prop_pclass(src_pclass, name))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to locate property") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to locate property"); /* If the property exists in the destination already */ if (H5P__exist_pclass(dst_pclass, name)) { /* Delete the old property from the destination class */ if (H5P__unregister(dst_pclass, name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); } /* end if */ /* Register the property into the destination */ orig_dst_pclass = dst_pclass; if (H5P__register(&dst_pclass, name, prop->size, prop->value, prop->create, prop->set, prop->get, prop->encode, prop->decode, prop->del, prop->copy, prop->cmp, prop->close) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property"); /* Check if the property class changed and needs to be substituted in the ID */ if (dst_pclass != orig_dst_pclass) { @@ -5033,13 +5033,13 @@ 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") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to substitute property class in ID"); assert(old_dst_pclass == orig_dst_pclass); /* Close the previous class */ if (H5P__close_class(old_dst_pclass) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, - "unable to close original property class after substitution") + "unable to close original property class after substitution"); } /* end if */ done: @@ -5082,11 +5082,11 @@ H5P__unregister(H5P_genclass_t *pclass, const char *name) /* Get the property node from the skip list */ if ((prop = (H5P_genprop_t *)H5SL_search(pclass->props, name)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't find property in skip list") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't find property in skip list"); /* Remove the property from the skip list */ if (H5SL_remove(pclass->props, prop->name) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from skip list"); /* Free the property, ignoring return value, nothing we can do */ H5P__free_prop(prop); @@ -5164,7 +5164,7 @@ H5P_close(H5P_genplist_t *plist) * already been seen) */ if ((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't create skip list for seen properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't create skip list for seen properties"); nseen = 0; /* Walk through the changed properties in the list */ @@ -5182,7 +5182,7 @@ H5P_close(H5P_genplist_t *plist) /* Add property name to "seen" list */ if (H5SL_insert(seen, tmp->name, tmp->name) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into seen skip list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into seen skip list"); nseen++; /* Get the next property node in the skip list */ @@ -5220,7 +5220,7 @@ H5P_close(H5P_genplist_t *plist) /* Allocate space for a temporary copy of the property value */ if (NULL == (tmp_value = H5MM_malloc(tmp->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for temporary property value") + "memory allocation failed for temporary property value"); H5MM_memcpy(tmp_value, tmp->value, tmp->size); /* Call the 'close' callback */ @@ -5234,7 +5234,7 @@ H5P_close(H5P_genplist_t *plist) if (has_parent_class) { if (H5SL_insert(seen, tmp->name, tmp->name) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, - "can't insert property into seen skip list") + "can't insert property into seen skip list"); nseen++; } /* end if */ } /* end if */ @@ -5250,7 +5250,7 @@ H5P_close(H5P_genplist_t *plist) /* Decrement class's dependent property list value! */ if (H5P__access_class(plist->pclass, H5P_MOD_DEC_LST) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count"); /* Free the list of 'seen' properties */ H5SL_close(seen); @@ -5353,7 +5353,7 @@ H5P__get_class_path(H5P_genclass_t *pclass) ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */ if (NULL == (ret_value = (char *)H5MM_malloc(ret_str_len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name"); /* Build the full path for this class */ HDsnprintf(ret_value, ret_str_len, "%s/%s", par_path, pclass->name); @@ -5422,9 +5422,9 @@ H5P__open_class_path(const char *path) /* Find the class with this name & parent by iterating over the open classes */ if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes") + HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes"); else if (NULL == check_info.new_class) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class"); /* Advance the pointer in the path to the start of the next component */ curr_class = check_info.new_class; @@ -5440,13 +5440,13 @@ H5P__open_class_path(const char *path) /* Find the class with this name & parent by iterating over the open classes */ if (H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes") + HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes"); else if (NULL == check_info.new_class) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class"); /* Copy it */ if (NULL == (ret_value = H5P__copy_pclass(check_info.new_class))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "can't copy property class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "can't copy property class"); done: /* Free the duplicated path */ @@ -5517,7 +5517,7 @@ H5P__close_class(H5P_genclass_t *pclass) /* Decrement the reference count & check if the object should go away */ if (H5P__access_class(pclass, H5P_MOD_DEC_REF) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't decrement ID ref count") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't decrement ID ref count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5648,11 +5648,11 @@ H5P__new_plist_of_type(H5P_plist_type_t type) /* Get the class object */ if (NULL == (pclass = (H5P_genclass_t *)H5I_object(class_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property class") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property class"); /* Create the new property list */ if ((ret_value = H5P_create_id(pclass, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 1c573dc..19a63bc 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -189,7 +189,7 @@ H5P__lacc_reg_prop(H5P_genclass_t *pclass) /* Register property for number of links traversed */ if (H5P__register_real(pclass, H5L_ACS_NLINKS_NAME, H5L_ACS_NLINKS_SIZE, &H5L_def_nlinks_g, NULL, NULL, NULL, H5L_ACS_NLINKS_ENC, H5L_ACS_NLINKS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for external link prefix */ if (H5P__register_real(pclass, H5L_ACS_ELINK_PREFIX_NAME, H5L_ACS_ELINK_PREFIX_SIZE, @@ -197,33 +197,33 @@ H5P__lacc_reg_prop(H5P_genclass_t *pclass) H5L_ACS_ELINK_PREFIX_ENC, H5L_ACS_ELINK_PREFIX_DEC, H5L_ACS_ELINK_PREFIX_DEL, H5L_ACS_ELINK_PREFIX_COPY, H5L_ACS_ELINK_PREFIX_CMP, H5L_ACS_ELINK_PREFIX_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register fapl for link access */ if (H5P__register_real(pclass, H5L_ACS_ELINK_FAPL_NAME, H5L_ACS_ELINK_FAPL_SIZE, &H5L_def_fapl_id_g, NULL, H5L_ACS_ELINK_FAPL_SET, H5L_ACS_ELINK_FAPL_GET, H5L_ACS_ELINK_FAPL_ENC, H5L_ACS_ELINK_FAPL_DEC, H5L_ACS_ELINK_FAPL_DEL, H5L_ACS_ELINK_FAPL_COPY, H5L_ACS_ELINK_FAPL_CMP, H5L_ACS_ELINK_FAPL_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for external link file access flags */ if (H5P__register_real(pclass, H5L_ACS_ELINK_FLAGS_NAME, H5L_ACS_ELINK_FLAGS_SIZE, &H5L_def_elink_flags_g, NULL, NULL, NULL, H5L_ACS_ELINK_FLAGS_ENC, H5L_ACS_ELINK_FLAGS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for external link file traversal callback */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5L_ACS_ELINK_CB_NAME, H5L_ACS_ELINK_CB_SIZE, &H5L_def_elink_cb_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); #ifdef H5_HAVE_PARALLEL /* Register the metadata collective read flag */ if (H5P__register_real(pclass, H5_COLL_MD_READ_FLAG_NAME, H5L_ACS_COLL_MD_READ_SIZE, &H5L_def_coll_md_read_g, NULL, NULL, NULL, H5L_ACS_COLL_MD_READ_ENC, H5L_ACS_COLL_MD_READ_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); #endif /* H5_HAVE_PARALLEL */ done: @@ -260,9 +260,9 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED H5P_genplist_t *l_fapl_plist; if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); } /* end if */ done: @@ -299,9 +299,9 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED H5P_genplist_t *l_fapl_plist; if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); } /* end if */ done: @@ -335,7 +335,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* Check for non-default FAPL */ if (*elink_fapl != H5P_DEFAULT) { if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list"); non_default_fapl = TRUE; } /* end if */ @@ -348,7 +348,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* (if *pp == NULL, will only compute the size) */ if (non_default_fapl) { if (H5P__encode(fapl_plist, TRUE, NULL, &fapl_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list"); if (*pp) { uint64_t enc_value; @@ -363,7 +363,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size) /* encode the plist */ if (H5P__encode(fapl_plist, TRUE, *pp, &fapl_size) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "can't encode property list"); *pp += fapl_size; } @@ -420,7 +420,7 @@ H5P__lacc_elink_fapl_dec(const void **_pp, void *_value) /* Decode the property list */ if ((*elink_fapl = H5P__decode(*pp)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode property") + HGOTO_ERROR(H5E_PLIST, H5E_CANTDECODE, FAIL, "can't decode property"); *pp += fapl_size; } /* end if */ @@ -458,7 +458,7 @@ H5P__lacc_elink_fapl_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED /* Close the FAPL */ if (l_fapl_id != H5P_DEFAULT && H5I_dec_ref(l_fapl_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close ID for file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close ID for file access property list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -493,9 +493,9 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED H5P_genplist_t *l_fapl_plist; if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list"); if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list"); } /* end if */ done: @@ -575,7 +575,7 @@ H5P__lacc_elink_fapl_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSE /* Close the FAPL */ if ((l_fapl_id > H5P_DEFAULT) && (H5I_dec_ref(l_fapl_id) < 0)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close ID for file access property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close ID for file access property list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -723,7 +723,7 @@ H5P__lacc_elink_pref_dec(const void **_pp, void *_value) if (0 != len) { /* Make a copy of the user's prefix string */ if (NULL == (*elink_pref = (char *)H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "memory allocation failed for prefix"); HDstrncpy(*elink_pref, *(const char **)pp, len); (*elink_pref)[len] = '\0'; @@ -863,11 +863,11 @@ H5Pset_nlinks(hid_t plist_id, size_t nlinks) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set number of links */ if (H5P_set(plist, H5L_ACS_NLINKS_NAME, &nlinks) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set nlink info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set nlink info"); done: FUNC_LEAVE_API(ret_value) @@ -900,11 +900,11 @@ H5Pget_nlinks(hid_t plist_id, size_t *nlinks /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current number of links */ if (H5P_get(plist, H5L_ACS_NLINKS_NAME, nlinks) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of links") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of links"); done: FUNC_LEAVE_API(ret_value) @@ -932,11 +932,11 @@ H5Pset_elink_prefix(hid_t plist_id, const char *prefix) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set prefix */ if (H5P_set(plist, H5L_ACS_ELINK_PREFIX_NAME, &prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set prefix info"); done: FUNC_LEAVE_API(ret_value) @@ -968,11 +968,11 @@ H5Pget_elink_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the current prefix */ if (H5P_peek(plist, H5L_ACS_ELINK_PREFIX_NAME, &my_prefix) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external link prefix") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external link prefix"); /* Check for prefix being set */ if (my_prefix) { @@ -1018,7 +1018,7 @@ H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id) /* Set the file access property list for the link access */ if (H5P_set(plist, H5L_ACS_ELINK_FAPL_NAME, &fapl_id) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fapl for link") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set fapl for link"); done: FUNC_LEAVE_API(ret_value) @@ -1045,10 +1045,10 @@ H5Pget_elink_fapl(hid_t lapl_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); if (H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &ret_value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fapl for links"); done: FUNC_LEAVE_API(ret_value) @@ -1078,15 +1078,15 @@ H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags) if ((flags != H5F_ACC_RDWR) && (flags != (H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE)) && (flags != H5F_ACC_RDONLY) && (flags != (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ)) && (flags != H5F_ACC_DEFAULT)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set flags */ if (H5P_set(plist, H5L_ACS_ELINK_FLAGS_NAME, &flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set access flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set access flags"); done: FUNC_LEAVE_API(ret_value) @@ -1113,12 +1113,12 @@ H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get flags */ if (flags) if (H5P_get(plist, H5L_ACS_ELINK_FLAGS_NAME, flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get access flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "can't get access flags"); done: FUNC_LEAVE_API(ret_value) @@ -1148,11 +1148,11 @@ H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data) /* Check if the callback function is NULL and the user data is non-NULL. * This is almost certainly an error as the user data will not be used. */ if (!func && op_data) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Populate the callback info struct */ cb_info.func = func; @@ -1160,7 +1160,7 @@ H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data) /* Set callback info */ if (H5P_set(plist, H5L_ACS_ELINK_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set callback info"); done: FUNC_LEAVE_API(ret_value) @@ -1188,11 +1188,11 @@ H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func /*out*/, void **op_dat /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get callback_info */ if (H5P_get(plist, H5L_ACS_ELINK_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info"); if (func) *func = cb_info.func; diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index 9707ed8..536172e 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -115,7 +115,7 @@ H5P__lcrt_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &H5L_def_intmd_group_g, NULL, NULL, NULL, H5L_CRT_INTERMEDIATE_GROUP_ENC, H5L_CRT_INTERMEDIATE_GROUP_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -144,12 +144,12 @@ H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ crt_intmd_group = (unsigned)(crt_intmd_group > 0 ? 1 : 0); if (H5P_set(plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set intermediate group creation flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set intermediate group creation flag"); done: FUNC_LEAVE_API(ret_value) @@ -176,12 +176,12 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (crt_intmd_group) if (H5P_get(plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, crt_intmd_group) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get intermediate group creation flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get intermediate group creation flag"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c index 567f03a..351bc73 100644 --- a/src/H5Pmapl.c +++ b/src/H5Pmapl.c @@ -117,13 +117,13 @@ H5P__macc_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5M_ACS_KEY_PREFETCH_SIZE_NAME, H5M_ACS_KEY_PREFETCH_SIZE_SIZE, &key_prefetch_size, NULL, NULL, NULL, H5M_ACS_KEY_PREFETCH_SIZE_ENC, H5M_ACS_KEY_PREFETCH_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the key prefetch allocation size for iteration */ if (H5P__register_real(pclass, H5M_ACS_KEY_ALLOC_SIZE_NAME, H5M_ACS_KEY_ALLOC_SIZE_SIZE, &key_alloc_size, NULL, NULL, NULL, H5M_ACS_KEY_ALLOC_SIZE_ENC, H5M_ACS_KEY_ALLOC_SIZE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 773ed64..b164711 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -155,26 +155,26 @@ H5P__ocrt_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &H5O_def_attr_max_compact_g, NULL, NULL, NULL, H5O_CRT_ATTR_MAX_COMPACT_ENC, H5O_CRT_ATTR_MAX_COMPACT_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register min. dense attribute storage property */ if (H5P__register_real(pclass, H5O_CRT_ATTR_MIN_DENSE_NAME, H5O_CRT_ATTR_MIN_DENSE_SIZE, &H5O_def_attr_min_dense_g, NULL, NULL, NULL, H5O_CRT_ATTR_MIN_DENSE_ENC, H5O_CRT_ATTR_MIN_DENSE_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register object header flags property */ if (H5P__register_real(pclass, H5O_CRT_OHDR_FLAGS_NAME, H5O_CRT_OHDR_FLAGS_SIZE, &H5O_def_ohdr_flags_g, NULL, NULL, NULL, H5O_CRT_OHDR_FLAGS_ENC, H5O_CRT_OHDR_FLAGS_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register the pipeline property */ if (H5P__register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &H5O_def_pline_g, NULL, H5O_CRT_PIPELINE_SET, H5O_CRT_PIPELINE_GET, H5O_CRT_PIPELINE_ENC, H5O_CRT_PIPELINE_DEC, H5O_CRT_PIPELINE_DEL, H5O_CRT_PIPELINE_COPY, H5O_CRT_PIPELINE_CMP, H5O_CRT_PIPELINE_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -210,21 +210,21 @@ H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens /* Range check values */ if (max_compact < min_dense) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be >= min dense value") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be >= min dense value"); if (max_compact > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max compact value must be < 65536"); if (min_dense > 65535) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set property values */ if (H5P_set(plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, &max_compact) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set max. # of compact attributes in property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set max. # of compact attributes in property list"); if (H5P_set(plist, H5O_CRT_ATTR_MIN_DENSE_NAME, &min_dense) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list"); done: FUNC_LEAVE_API(ret_value) @@ -250,16 +250,16 @@ H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (max_compact) { if (H5P_get(plist, H5O_CRT_ATTR_MAX_COMPACT_NAME, max_compact) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get max. # of compact attributes"); } /* end if */ if (min_dense) { if (H5P_get(plist, H5O_CRT_ATTR_MIN_DENSE_NAME, min_dense) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get min. # of dense attributes"); } /* end if */ done: @@ -287,15 +287,15 @@ H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags) /* Check for bad combination of flags */ if (!(crt_order_flags & H5P_CRT_ORDER_TRACKED) && (crt_order_flags & H5P_CRT_ORDER_INDEXED)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ if (H5P_get(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags"); /* Mask off previous attribute creation order flag settings */ ohdr_flags &= (uint8_t) ~(H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED); @@ -308,7 +308,7 @@ H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags) /* Set object header flags */ if (H5P_set(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags"); done: FUNC_LEAVE_API(ret_value) @@ -342,11 +342,11 @@ H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ if (H5P_get(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags"); /* Set creation order flags to return */ *crt_order_flags |= (ohdr_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? H5P_CRT_ORDER_TRACKED : 0; @@ -392,11 +392,11 @@ H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ if (H5P_get(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags"); /* Mask off previous time tracking flag settings */ ohdr_flags &= (uint8_t)~H5O_HDR_STORE_TIMES; @@ -406,7 +406,7 @@ H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times) /* Set object header flags */ if (H5P_set(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set object header flags"); done: FUNC_LEAVE_API(ret_value) @@ -436,11 +436,11 @@ H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get object header flags */ if (H5P_get(plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object header flags"); /* Set track times flag to return */ *track_times = (hbool_t)((ohdr_flags & H5O_HDR_STORE_TIMES) ? TRUE : FALSE); @@ -494,15 +494,15 @@ H5P_modify_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned flags, si /* Get the pipeline property to modify */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Modify the filter parameters of the I/O pipeline */ if (H5Z_modify(&pline, filter, flags, cd_nelmts, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline"); /* Put the I/O pipeline information back into the property list */ if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -553,19 +553,19 @@ H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t /* Check args */ if (filter < 0 || filter > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identifier"); if (flags & ~((unsigned)H5Z_FLAG_DEFMASK)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags"); if (cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Modify the filter parameters of the I/O pipeline */ if (H5P_modify_filter(plist, filter, flags, cd_nelmts, cd_values) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't modify filter") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't modify filter"); done: FUNC_LEAVE_API(ret_value) @@ -612,19 +612,19 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd /* Check args */ if (filter < 0 || filter > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identifier"); if (flags & ~((unsigned)H5Z_FLAG_DEFMASK)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags"); if (cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Call the private function */ if (H5P__set_filter(plist, filter, flags, cd_nelmts, cd_values) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "failed to call private function") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "failed to call private function"); done: FUNC_LEAVE_API(ret_value) @@ -674,19 +674,19 @@ H5P__set_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned int flags, /* Check if filter is already available */ if ((filter_avail = H5Z_filter_avail(filter)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't check filter availability") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't check filter availability"); /* Get the pipeline property to append to */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Add the filter to the I/O pipeline */ if (H5Z_append(&pline, filter, flags, cd_nelmts, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline"); /* Put the I/O pipeline information back into the property list */ if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -721,11 +721,11 @@ H5Pget_nfilters(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to query */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Set return value */ ret_value = (int)(pline.nused); @@ -778,9 +778,9 @@ H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t */ if (cd_nelmts && *cd_nelmts > 256) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, - "probable uninitialized *cd_nelmts argument") + "probable uninitialized *cd_nelmts argument"); if (cd_nelmts && *cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "client data values not supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "client data values not supplied"); /* * If cd_nelmts is null but cd_values is non-null then just ignore @@ -792,22 +792,22 @@ H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID"); /* Get the pipeline property to query */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get pipeline"); /* Check index */ if (idx >= pline.nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "filter number is invalid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "filter number is invalid"); /* Set pointer to particular filter to query */ filter = &pline.filter[idx]; /* Get filter information */ if (H5P__get_filter(filter, flags, cd_nelmts, cd_values, namelen, name, filter_config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get filter info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get filter info"); /* Set return value */ ret_value = filter->id; @@ -848,15 +848,15 @@ H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, unsigned int *flags /* Get pipeline info */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Get pointer to filter in pipeline */ if (NULL == (filter = H5Z_filter_info(&pline, id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID is invalid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID is invalid"); /* Get filter information */ if (H5P__get_filter(filter, flags, cd_nelmts, cd_values, namelen, name, filter_config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -894,7 +894,7 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* /* Check args */ if (id < 0 || id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID value out of range") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID value out of range"); if (cd_nelmts || cd_values) { /* * It's likely that users forget to initialize this on input, so @@ -903,9 +903,9 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* * is too large. */ if (cd_nelmts && *cd_nelmts > 256) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "probable uninitialized *cd_nelmts argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "probable uninitialized *cd_nelmts argument"); if (cd_nelmts && *cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "client data values not supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "client data values not supplied"); /* * If cd_nelmts is null but cd_values is non-null then just ignore @@ -917,11 +917,11 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get filter information */ if (H5P_get_filter_by_id(plist, id, flags, cd_nelmts, cd_values, namelen, name, filter_config) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info"); done: FUNC_LEAVE_API(ret_value) @@ -951,15 +951,15 @@ H5Pall_filters_avail(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to query */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Check if all filters are available */ if ((ret_value = H5Z_all_filters_avail(&pline)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't check pipeline information") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't check pipeline information"); done: FUNC_LEAVE_API(ret_value) @@ -987,11 +987,11 @@ H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id) /* Get pipeline info */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Check if the file is in the pipeline */ if ((ret_value = H5Z_filter_in_pline(&pline, id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTCOMPARE, FAIL, "can't find filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTCOMPARE, FAIL, "can't find filter"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1019,21 +1019,21 @@ H5Premove_filter(hid_t plist_id, H5Z_filter_t filter) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to modify */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Check if there are any filters */ if (pline.filter) { /* Delete filter */ if (H5Z_delete(&pline, filter) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't delete filter") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't delete filter"); /* Put the I/O pipeline information back into the property list */ if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline"); } /* end if */ done: @@ -1067,23 +1067,23 @@ H5Pset_deflate(hid_t plist_id, unsigned level) /* Check arguments */ if (level > 9) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid deflate level") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid deflate level"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to append to */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Add the filter */ if (H5Z_append(&pline, H5Z_FILTER_DEFLATE, H5Z_FLAG_OPTIONAL, (size_t)1, &level) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add deflate filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add deflate filter to pipeline"); /* Put the I/O pipeline information back into the property list */ if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -1111,19 +1111,19 @@ H5Pset_fletcher32(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the pipeline property to append to */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get pipeline"); /* Add the Fletcher32 checksum as a filter */ if (H5Z_append(&pline, H5Z_FILTER_FLETCHER32, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add fletcher32 filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add fletcher32 filter to pipeline"); /* Put the I/O pipeline information back into the property list */ if (H5P_poke(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set pipeline"); done: FUNC_LEAVE_API(ret_value) @@ -1225,7 +1225,7 @@ H5P__ocrt_pipeline_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make copy of I/O pipeline */ if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline"); /* Copy new I/O pipeline message over old one */ *pline = new_pline; @@ -1259,7 +1259,7 @@ H5P__ocrt_pipeline_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Make copy of I/O pipeline */ if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline"); /* Copy new I/O pipeline message over old one */ *pline = new_pline; @@ -1387,7 +1387,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value) /* Decode the size of size_t */ enc_size = *(*pp)++; if (enc_size != sizeof(unsigned)) - HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") + HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded"); /* decode nused */ enc_size = *(*pp)++; @@ -1428,7 +1428,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value) if (filter.cd_nelmts) { if (NULL == (filter.cd_values = (unsigned *)H5MM_malloc(sizeof(unsigned) * filter.cd_nelmts))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for cd_values") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for cd_values"); } /* end if */ else filter.cd_values = NULL; @@ -1439,7 +1439,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value) /* Add the filter to the I/O pipeline */ if (H5Z_append(pline, filter.id, filter.flags, filter.cd_nelmts, filter.cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to add filter to pipeline"); /* Free cd_values, if it was allocated */ filter.cd_values = (unsigned *)H5MM_xfree(filter.cd_values); @@ -1472,7 +1472,7 @@ H5P__ocrt_pipeline_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED * /* Reset the old I/O pipeline */ if (H5O_msg_reset(H5O_PLINE_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release I/O pipeline message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release I/O pipeline message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1502,7 +1502,7 @@ H5P__ocrt_pipeline_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED s /* Make copy of I/O pipeline */ if (NULL == H5O_msg_copy(H5O_PLINE_ID, pline, &new_pline)) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy I/O pipeline"); /* Copy new I/O pipeline message over old one */ *pline = new_pline; @@ -1627,7 +1627,7 @@ H5P__ocrt_pipeline_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED /* Reset the old I/O pipeline */ if (H5O_msg_reset(H5O_PLINE_ID, value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release I/O pipeline message") + HGOTO_ERROR(H5E_PLIST, H5E_CANTRESET, FAIL, "can't release I/O pipeline message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1677,9 +1677,9 @@ H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t */ if (cd_nelmts && *cd_nelmts > 256) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, - "probable uninitialized *cd_nelmts argument") + "probable uninitialized *cd_nelmts argument"); if (cd_nelmts && *cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "client data values not supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "client data values not supplied"); /* * If cd_nelmts is null but cd_values is non-null then just ignore @@ -1691,22 +1691,22 @@ H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID"); /* Get pipeline info */ if (H5P_peek(plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get pipeline") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get pipeline"); /* Check more args */ if (idx >= pline.nused) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "filter number is invalid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5Z_FILTER_ERROR, "filter number is invalid"); /* Set pointer to particular filter to query */ filter = &pline.filter[idx]; /* Get filter information */ if (H5P__get_filter(filter, flags, cd_nelmts, cd_values, namelen, name, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get filter info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5Z_FILTER_ERROR, "can't get filter info"); /* Set return value */ ret_value = filter->id; @@ -1746,7 +1746,7 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* /* Check args */ if (id < 0 || id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID value out of range") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "filter ID value out of range"); if (cd_nelmts || cd_values) { /* * It's likely that users forget to initialize this on input, so @@ -1755,9 +1755,9 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* * is too large. */ if (cd_nelmts && *cd_nelmts > 256) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "probable uninitialized *cd_nelmts argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "probable uninitialized *cd_nelmts argument"); if (cd_nelmts && *cd_nelmts > 0 && !cd_values) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "client data values not supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "client data values not supplied"); /* * If cd_nelmts is null but cd_values is non-null then just ignore @@ -1769,11 +1769,11 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out* /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get filter info */ if (H5P_get_filter_by_id(plist, id, flags, cd_nelmts, cd_values, namelen, name, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get filter info"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index def9f82..67337d5 100644 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -155,7 +155,7 @@ H5P__ocpy_reg_prop(H5P_genclass_t *pclass) /* Register copy options property */ if (H5P__register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &H5O_def_ocpy_option_g, NULL, NULL, NULL, H5O_CPY_OPTION_ENC, H5O_CPY_OPTION_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register merge named dtype list property */ if (H5P__register_real(pclass, H5O_CPY_MERGE_COMM_DT_LIST_NAME, H5O_CPY_MERGE_COMM_DT_LIST_SIZE, @@ -164,14 +164,14 @@ H5P__ocpy_reg_prop(H5P_genclass_t *pclass) H5O_CPY_MERGE_COMM_DT_LIST_DEC, H5O_CPY_MERGE_COMM_DT_LIST_DEL, H5O_CPY_MERGE_COMM_DT_LIST_COPY, H5O_CPY_MERGE_COMM_DT_LIST_CMP, H5O_CPY_MERGE_COMM_DT_LIST_CLOSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); /* Register property for callback when completing the search for a matching named datatype from the named * dtype list */ /* (Note: this property should not have an encode/decode callback -QAK) */ if (H5P__register_real(pclass, H5O_CPY_MCDT_SEARCH_CB_NAME, H5O_CPY_MCDT_SEARCH_CB_SIZE, &H5O_def_mcdt_cb_g, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -235,9 +235,9 @@ H5P__copy_merge_comm_dt_list(H5O_copy_dtype_merge_list_t **value) while (src_dt_list) { /* Copy src_dt_list */ if (NULL == (tmp_dt_list = H5FL_CALLOC(H5O_copy_dtype_merge_list_t))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); if (NULL == (tmp_dt_list->path = H5MM_strdup(src_dt_list->path))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Add copied node to dest dtype list */ if (dst_dt_list_tail) { @@ -292,7 +292,7 @@ H5P__ocpy_merge_comm_dt_list_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT /* Make copy of merge committed dtype list */ if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -321,7 +321,7 @@ H5P__ocpy_merge_comm_dt_list_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATT /* Make copy of merge committed dtype list */ if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -419,9 +419,9 @@ H5P__ocpy_merge_comm_dt_list_dec(const void **_pp, void *_value) while (len > 0) { /* Create new node & duplicate string */ if (NULL == (tmp_dt_list = H5FL_CALLOC(H5O_copy_dtype_merge_list_t))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); if (NULL == (tmp_dt_list->path = H5MM_strdup(*(const char **)pp))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed"); *pp += len + 1; assert(len == HDstrlen(tmp_dt_list->path)); @@ -502,7 +502,7 @@ H5P__ocpy_merge_comm_dt_list_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATT /* Make copy of merge committed dtype list */ if (H5P__copy_merge_comm_dt_list((H5O_copy_dtype_merge_list_t **)value) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy merge committed dtype list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -615,15 +615,15 @@ H5Pset_copy_object(hid_t plist_id, unsigned cpy_option) /* Check parameters */ if (cpy_option & ~H5O_COPY_ALL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown option specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown option specified"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set value */ if (H5P_set(plist, H5O_CPY_OPTION_NAME, &cpy_option) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set copy object flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set copy object flag"); done: FUNC_LEAVE_API(ret_value) @@ -650,12 +650,12 @@ H5Pget_copy_object(hid_t plist_id, unsigned *cpy_option /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get values */ if (cpy_option) if (H5P_get(plist, H5O_CPY_OPTION_NAME, cpy_option) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object copy flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object copy flag"); done: FUNC_LEAVE_API(ret_value) @@ -692,28 +692,28 @@ H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path) /* Check parameters */ if (!path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no path specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no path specified"); if (path[0] == '\0') - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path is empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path is empty string"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get dtype list */ if (H5P_peek(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &old_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list"); /* Add the new path to the list */ if (NULL == (new_obj = H5FL_CALLOC(H5O_copy_dtype_merge_list_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (NULL == (new_obj->path = H5MM_strdup(path))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); new_obj->next = old_list; /* Update the list stored in the property list */ if (H5P_poke(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &new_obj) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge named dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge named dtype list"); done: if (ret_value < 0) @@ -751,18 +751,18 @@ H5Pfree_merge_committed_dtype_paths(hid_t plist_id) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get dtype list */ if (H5P_peek(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed dtype list"); /* Free dtype list */ dt_list = H5P__free_merge_comm_dtype_list(dt_list); /* Update the list stored in the property list (to NULL) */ if (H5P_poke(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge committed dtype list") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge committed dtype list"); done: FUNC_LEAVE_API(ret_value) @@ -798,11 +798,11 @@ H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data) /* Check if the callback function is NULL and the user data is non-NULL. * This is almost certainly an error as the user data will not be used. */ if (!func && op_data) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Populate the callback info struct */ cb_info.func = func; @@ -810,7 +810,7 @@ H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data) /* Set callback info */ if (H5P_set(plist, H5O_CPY_MCDT_SEARCH_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set callback info"); done: FUNC_LEAVE_API(ret_value) @@ -843,11 +843,11 @@ H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func /*out*/, void * /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get callback info */ if (H5P_get(plist, H5O_CPY_MCDT_SEARCH_CB_NAME, &cb_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get callback info"); if (func) *func = cb_info.func; diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index fa18060..86c3754 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -119,7 +119,7 @@ H5P__strcrt_reg_prop(H5P_genclass_t *pclass) if (H5P__register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &H5P_def_char_encoding_g, NULL, NULL, NULL, H5P_STRCRT_CHAR_ENCODING_ENC, H5P_STRCRT_CHAR_ENCODING_DEC, NULL, NULL, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -145,15 +145,15 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding) /* Check arguments */ if (encoding <= H5T_CSET_ERROR || encoding >= H5T_NCSET) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid"); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set the character encoding */ if (H5P_set(plist, H5P_STRCRT_CHAR_ENCODING_NAME, &encoding) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding"); done: FUNC_LEAVE_API(ret_value) @@ -179,12 +179,12 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get value */ if (encoding) if (H5P_get(plist, H5P_STRCRT_CHAR_ENCODING_NAME, encoding) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Ptest.c b/src/H5Ptest.c index a77a2bf..0bb1c31 100644 --- a/src/H5Ptest.c +++ b/src/H5Ptest.c @@ -64,7 +64,7 @@ H5P__get_class_path_test(hid_t pclass_id) /* Get the property list class path */ if (NULL == (ret_value = H5P__get_class_path(pclass))) - HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "unable to query full path of class") + HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "unable to query full path of class"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5R.c b/src/H5R.c index bc7097e..a43b638 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -94,33 +94,33 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get object access property list */ if (H5P_DEFAULT == oapl_id) oapl_id = H5P_LINK_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object type */ if ((obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Retrieve VOL file object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ file_get_vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -128,7 +128,7 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p /* Get container info */ if (H5VL_file_get(vol_obj_file, &file_get_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -143,16 +143,16 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p /* Get the object token */ if (H5VL_object_specific(vol_obj, &loc_params, &obj_spec_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token"); /* Create the reference (do not pass filename, since file_id is attached) */ 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") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference"); /* Attach loc_id to reference and hold reference to it */ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference"); done: if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0) @@ -191,37 +191,37 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); if ((space_id == H5I_INVALID_HID) || (space_id == H5S_ALL) || (space_id == H5S_BLOCK)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid"); if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get object access property list */ if (H5P_DEFAULT == oapl_id) oapl_id = H5P_LINK_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object type */ if ((obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Retrieve VOL file object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ file_get_vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -229,7 +229,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, /* Get container info */ if (H5VL_file_get(vol_obj_file, &file_get_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -244,17 +244,17 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, /* Get the object token */ if (H5VL_object_specific(vol_obj, &loc_params, &obj_spec_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token"); /* Create the reference (do not pass filename, since file_id is attached) */ 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") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference"); /* Attach loc_id to reference and hold reference to it */ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference"); done: if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0) @@ -291,35 +291,35 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); if (!attr_name || !*attr_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name given"); if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Get object access property list */ if (H5P_DEFAULT == oapl_id) oapl_id = H5P_LINK_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(oapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "oapl_id is not a link access property list ID"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object type */ if ((obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, obj_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Retrieve VOL file object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ file_get_vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -327,7 +327,7 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl /* Get container info */ if (H5VL_file_get(vol_obj_file, &file_get_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -342,17 +342,17 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl /* Get the object token */ if (H5VL_object_specific(vol_obj, &loc_params, &obj_spec_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token"); /* Create the reference (do not pass filename, since file_id is attached) */ 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") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference"); /* Attach loc_id to reference and hold reference to it */ if (H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference"); done: if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0) @@ -380,11 +380,11 @@ H5Rdestroy(H5R_ref_t *ref_ptr) /* Check args */ if (NULL == ref_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid reference pointer"); /* Destroy reference */ if (H5R__destroy((H5R_ref_priv_t *)ref_ptr) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "unable to destroy reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "unable to destroy reference"); /* Memset back to 0 for safety */ memset(ref_ptr, 0, H5R_REF_BUF_SIZE); @@ -413,12 +413,12 @@ H5Rget_type(const H5R_ref_t *ref_ptr) /* Check args */ if (NULL == ref_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5R_BADTYPE, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5R_BADTYPE, "invalid reference pointer"); /* Get reference type */ ret_value = H5R__get_type((const H5R_ref_priv_t *)ref_ptr); if ((ret_value <= H5R_BADTYPE) || (ret_value >= H5R_MAXTYPE)) - HGOTO_ERROR(H5E_REFERENCE, H5E_BADVALUE, H5R_BADTYPE, "invalid reference type") + HGOTO_ERROR(H5E_REFERENCE, H5E_BADVALUE, H5R_BADTYPE, "invalid reference type"); done: FUNC_LEAVE_API(ret_value) @@ -443,11 +443,11 @@ H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr) /* Check args */ if (!ref1_ptr || !ref2_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); /* Compare references */ if ((ret_value = H5R__equal((const H5R_ref_priv_t *)ref2_ptr, (const H5R_ref_priv_t *)ref2_ptr)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare references") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare references"); done: FUNC_LEAVE_API(ret_value) @@ -472,11 +472,11 @@ H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr) /* Check args */ if (NULL == src_ref_ptr || NULL == dst_ref_ptr) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid reference pointer"); /* Copy reference */ if (H5R__copy((const H5R_ref_priv_t *)src_ref_ptr, (H5R_ref_priv_t *)dst_ref_ptr) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "cannot copy reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "cannot copy reference"); done: FUNC_LEAVE_API(ret_value) @@ -509,42 +509,42 @@ H5R__open_object_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) <= H5R_BADTYPE || H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); if (rapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Retrieve loc_id from reference */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) { /* Attempt to re-open file and pass rapl_id as a fapl_id */ if ((loc_id = H5R__reopen_file((H5R_ref_priv_t *)ref_ptr, rapl_id)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file"); } /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get object token */ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token"); /* Set up arguments for object access by token */ if (H5VL_setup_token_args(loc_id, &obj_token, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open object by token */ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token"); /* Register object */ if ((ret_value = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -570,7 +570,7 @@ H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id) /* Open the dataset synchronously */ if ((ret_value = H5R__open_object_api_common(ref_ptr, rapl_id, oapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object synchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -603,7 +603,7 @@ H5Ropen_object_async(const char *app_file, const char *app_func, unsigned app_li /* Open the object asynchronously */ if ((ret_value = H5R__open_object_api_common(ref_ptr, rapl_id, oapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object asynchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -612,8 +612,9 @@ H5Ropen_object_async(const char *app_file, const char *app_func, unsigned app_li H5ARG_TRACE7(__func__, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID") - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, + "can't decrement count on object ID"); + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -651,42 +652,42 @@ H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if ((H5R__get_type((const H5R_ref_priv_t *)ref_ptr) != H5R_DATASET_REGION1) && (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) != H5R_DATASET_REGION2)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); if (rapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Retrieve loc_id from reference */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) { /* Attempt to re-open file and pass rapl_id as a fapl_id */ if ((loc_id = H5R__reopen_file((H5R_ref_priv_t *)ref_ptr, rapl_id)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file"); } /* Get object token */ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token"); /* Set up arguments for object access by token */ if (H5VL_setup_token_args(loc_id, &obj_token, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open object by token */ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token"); /* Register object */ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); /* Get VOL object object */ if (NULL == (opened_obj = H5VL_vol_object(opened_obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_SPACE; @@ -694,14 +695,14 @@ H5R__open_region_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id, vo /* Get dataspace from object */ if (H5VL_dataset_get(opened_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace from dataset") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace from dataset"); space_id = vol_cb_args.args.get_space.space_id; if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); /* Get the dataspace with the correct region selected */ if (H5R__get_region((const H5R_ref_priv_t *)ref_ptr, space) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get selection on dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get selection on dataspace"); /* Simply return space_id */ ret_value = space_id; @@ -737,7 +738,7 @@ H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id) /* Open the region synchronously */ if ((ret_value = H5R__open_region_api_common(ref_ptr, rapl_id, oapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region synchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -770,7 +771,7 @@ H5Ropen_region_async(const char *app_file, const char *app_func, unsigned app_li /* Open the region asynchronously */ if ((ret_value = H5R__open_region_api_common(ref_ptr, rapl_id, oapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region asynchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open region asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -779,8 +780,9 @@ H5Ropen_region_async(const char *app_file, const char *app_func, unsigned app_li H5ARG_TRACE7(__func__, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on region ID") - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, + "can't decrement count on region ID"); + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -816,28 +818,28 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) != H5R_ATTR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); if (rapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); if (aapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); /* Retrieve loc_id from reference */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) { /* Attempt to re-open file and pass rapl_id as a fapl_id */ if ((loc_id = H5R__reopen_file((H5R_ref_priv_t *)ref_ptr, rapl_id)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "cannot re-open referenced file"); } /* Get object token */ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get object token"); /* Get the VOL object */ if (NULL == (*vol_obj_ptr = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -847,15 +849,15 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void /* Open object by token */ if (NULL == (opened_obj = H5VL_object_open(*vol_obj_ptr, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token"); /* Register object */ if ((opened_obj_id = H5VL_register(opened_type, opened_obj, (*vol_obj_ptr)->connector, FALSE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -863,18 +865,18 @@ H5R__open_attr_api_common(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id, void /* Get VOL object object */ if (NULL == (opened_obj = H5VL_vol_object(opened_obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the attribute */ if (NULL == (opened_attr = H5VL_attr_open(opened_obj, &loc_params, H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr), aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", - H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr)) + H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr)); /* Register the attribute and get an ID for it */ if ((ret_value = H5VL_register(H5I_ATTR, opened_attr, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute handle"); done: if ((opened_obj_id != H5I_INVALID_HID) && (H5I_dec_ref(opened_obj_id) < 0)) @@ -906,7 +908,7 @@ H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id) /* Open the attribute synchronously */ if ((ret_value = H5R__open_attr_api_common(ref_ptr, rapl_id, aapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute synchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -939,7 +941,7 @@ H5Ropen_attr_async(const char *app_file, const char *app_func, unsigned app_line /* Open the attribute asynchronously */ if ((ret_value = H5R__open_attr_api_common(ref_ptr, rapl_id, aapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute asynchronously") + HGOTO_ERROR(H5E_REFERENCE, H5E_OPENERROR, H5I_INVALID_HID, "unable to open attribute asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -949,8 +951,8 @@ H5Ropen_attr_async(const char *app_file, const char *app_func, unsigned app_line /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, - "can't decrement count on attribute ID") - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + "can't decrement count on attribute ID"); + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -982,26 +984,26 @@ H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type /*out*/ /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) <= H5R_BADTYPE || H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); if (rapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Retrieve loc_id from reference */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) /* Attempt to re-open file and pass rapl_id as a fapl_id */ if ((loc_id = H5R__reopen_file((H5R_ref_priv_t *)ref_ptr, rapl_id)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, FAIL, "cannot re-open referenced file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, FAIL, "cannot re-open referenced file"); /* Get object token */ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get object token"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -1014,7 +1016,7 @@ H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type /*out*/ /* Retrieve object's type */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't retrieve object type") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't retrieve object type"); done: FUNC_LEAVE_API(ret_value) @@ -1041,17 +1043,17 @@ H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size) /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) <= H5R_BADTYPE || H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type"); /* Get name */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) { /* Un-opened external references do not have loc_id set but hold a * copy of the filename */ if ((ret_value = H5R__get_file_name((const H5R_ref_priv_t *)ref_ptr, buf, size)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to retrieve file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to retrieve file name"); } else { H5VL_object_t *vol_obj; /* Object of loc_id */ @@ -1060,7 +1062,7 @@ H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size) /* Retrieve VOL file object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_NAME; @@ -1071,7 +1073,7 @@ H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size) /* Get file name */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to get file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to get file name"); /* Set return value */ ret_value = (ssize_t)file_name_len; @@ -1107,26 +1109,26 @@ H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf /*out*/, size_t siz /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) <= H5R_BADTYPE || H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type"); if (rapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a property list"); /* Retrieve loc_id from reference */ if (H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) /* Attempt to re-open file and pass rapl_id as a fapl_id */ if ((loc_id = H5R__reopen_file((H5R_ref_priv_t *)ref_ptr, rapl_id)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, (-1), "cannot re-open referenced file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, (-1), "cannot re-open referenced file"); /* Get object token */ if (H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to get object token"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -1141,7 +1143,7 @@ H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf /*out*/, size_t siz /* Retrieve object's name */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "can't retrieve object name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "can't retrieve object name"); /* Set return value */ ret_value = (ssize_t)obj_name_len; @@ -1169,13 +1171,13 @@ H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf /*out*/, size_t size) /* Check args */ if (ref_ptr == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer"); if (H5R__get_type((const H5R_ref_priv_t *)ref_ptr) != H5R_ATTR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type"); /* Get attribute name */ if ((ret_value = H5R__get_attr_name((const H5R_ref_priv_t *)ref_ptr, buf, size)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to determine attribute name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to determine attribute name"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5RS.c b/src/H5RS.c index eea4ed6..0bf40b1 100644 --- a/src/H5RS.c +++ b/src/H5RS.c @@ -122,7 +122,7 @@ H5RS__xstrdup(H5RS_str_t *rs, const char *s) /* Allocate the underlying string */ if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max))) - HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed"); if (len) memcpy(rs->s, s, len); rs->end = rs->s + len; @@ -179,7 +179,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs) if (NULL == rs->s) { rs->max = H5RS_ALLOC_SIZE; if (NULL == (rs->s = (char *)H5FL_BLK_MALLOC(str_buf, rs->max))) - HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed"); rs->end = rs->s; *rs->s = '\0'; rs->len = 0; @@ -190,7 +190,7 @@ H5RS__prepare_for_append(H5RS_str_t *rs) */ if (rs->wrapped) { if (H5RS__xstrdup(rs, rs->s) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string") + HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string"); rs->wrapped = FALSE; } /* end if */ } /* end else */ @@ -234,7 +234,7 @@ H5RS__resize_for_append(H5RS_str_t *rs, size_t len) while (len >= (rs->max - rs->len)) rs->max *= 2; if (NULL == (rs->s = (char *)H5FL_BLK_REALLOC(str_buf, rs->s, rs->max))) - HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, FAIL, "memory allocation failed"); rs->end = rs->s + rs->len; } /* end if */ @@ -270,12 +270,12 @@ H5RS_create(const char *s) /* Allocate ref-counted string structure */ if (NULL == (ret_value = H5FL_CALLOC(H5RS_str_t))) - HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Set the internal fields */ if (s) if (H5RS__xstrdup(ret_value, s) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, NULL, "can't copy string") + HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, NULL, "can't copy string"); ret_value->n = 1; done: @@ -310,7 +310,7 @@ H5RS_wrap(const char *s) /* Allocate ref-counted string structure */ if (NULL == (ret_value = H5FL_MALLOC(H5RS_str_t))) - HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_CANTALLOC, NULL, "memory allocation failed"); /* Set the internal fields * @@ -367,7 +367,7 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *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") + HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string"); /* Attempt to write formatted output into the managed string */ va_start(args1, fmt); @@ -375,7 +375,7 @@ H5RS_asprintf_cat(H5RS_str_t *rs, const char *fmt, ...) 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") + HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer"); /* Restart the va_list */ va_end(args1); @@ -422,12 +422,12 @@ H5RS_acat(H5RS_str_t *rs, const char *s) /* Allocate the underlying string, if necessary */ if (H5RS__prepare_for_append(rs) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string") + HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string"); /* Increase the managed string's buffer size if necessary */ if ((rs->len + len) >= rs->max) if (H5RS__resize_for_append(rs, len) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer") + HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer"); /* Append the string */ memcpy(rs->end, s, len); @@ -471,12 +471,12 @@ H5RS_ancat(H5RS_str_t *rs, const char *s, size_t n) /* Allocate the underlying string, if necessary */ if (H5RS__prepare_for_append(rs) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string") + HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string"); /* Increase the managed string's buffer size if necessary */ if ((rs->len + n) >= rs->max) if (H5RS__resize_for_append(rs, n) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer") + HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer"); /* Append the string */ memcpy(rs->end, s, n); @@ -512,12 +512,12 @@ H5RS_aputc(H5RS_str_t *rs, int c) /* Allocate the underlying string, if necessary */ if (H5RS__prepare_for_append(rs) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string") + HGOTO_ERROR(H5E_RS, H5E_CANTINIT, FAIL, "can't initialize ref-counted string"); /* Increase the managed string's buffer size if necessary */ if ((rs->len + 1) >= rs->max) if (H5RS__resize_for_append(rs, 1) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer") + HGOTO_ERROR(H5E_RS, H5E_CANTRESIZE, FAIL, "can't resize ref-counted string buffer"); /* Append the current character */ *rs->end++ = (char)c; @@ -601,7 +601,7 @@ H5RS_incr(H5RS_str_t *rs) */ if (rs->wrapped) { if (H5RS__xstrdup(rs, rs->s) < 0) - HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string") + HGOTO_ERROR(H5E_RS, H5E_CANTCOPY, FAIL, "can't copy string"); rs->wrapped = FALSE; } /* end if */ diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index c0f3b1e..e3ea606 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -105,7 +105,7 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref /* Check if using native VOL connector */ if (H5VL_object_is_native(vol_obj, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -114,11 +114,11 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Retrieve VOL object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -126,14 +126,14 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref /* Get container info */ if (H5VL_file_get(vol_obj_file, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info"); if (ref_type == H5R_OBJECT1) { size_t buf_size = H5R_OBJ_REF_BUF_SIZE; /* Get object address */ if (H5R__decode_token_obj_compat(buf, &buf_size, obj_token, cont_info.token_size) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token"); } /* end if */ else { size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE; @@ -141,11 +141,11 @@ H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref /* Retrieve file from VOL object */ if (NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Get object address */ if (H5R__decode_token_region_compat(f, buf, &buf_size, obj_token, cont_info.token_size, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address"); } /* end else */ done: @@ -182,7 +182,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t /* Get required buffer size */ if (H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); if (buf && *nalloc >= buf_size) { ssize_t data_size; @@ -200,7 +200,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t /* Get the amount of space required to serialize the selection */ if ((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, - "Invalid amount of space for serializing selection") + "Invalid amount of space for serializing selection"); /* Increase buffer size to allow for the dataset token */ data_size += (hssize_t)token_size; @@ -208,7 +208,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t /* Allocate the space to store the serialized information */ H5_CHECK_OVERFLOW(data_size, hssize_t, size_t); if (NULL == (data = (uint8_t *)H5MM_malloc((size_t)data_size))) - HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Serialize information for dataset OID into heap buffer */ p = (uint8_t *)data; @@ -217,11 +217,11 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t /* Serialize the selection into heap buffer */ if (H5S_SELECT_SERIALIZE(space, &p) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection"); /* Write to heap */ if (H5R__encode_heap(f, buf, nalloc, data, (size_t)data_size) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); } *nalloc = buf_size; @@ -258,21 +258,21 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref) /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "invalid reference pointer"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "invalid reference type"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid location identifier"); /* Get object token */ if (H5R__decode_token_compat(vol_obj, vol_obj_type, ref_type, buf, &obj_token) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5G_UNKNOWN, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5G_UNKNOWN, "unable to get object token"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -285,7 +285,7 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref) /* Retrieve object's type */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5G_UNKNOWN, "can't retrieve object type") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5G_UNKNOWN, "can't retrieve object type"); /* Set return value */ ret_value = H5G_map_obj_type(obj_type); @@ -322,21 +322,21 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref) /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(obj_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get object token */ if (H5R__decode_token_compat(vol_obj, vol_obj_type, ref_type, buf, &obj_token) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5I_INVALID_HID, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5I_INVALID_HID, "unable to get object token"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -346,11 +346,11 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref) /* Dereference */ if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token"); /* Register object */ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_API(ret_value) @@ -390,19 +390,19 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); #ifndef NDEBUG { @@ -410,7 +410,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Check if using native VOL connector */ if (H5VL_object_is_native(vol_obj, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -419,7 +419,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -434,15 +434,15 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Get the object token */ if (H5VL_object_specific(vol_obj, &loc_params, &obj_spec_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to retrieve object token"); /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Retrieve VOL object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up VOL callback arguments */ file_get_vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -450,7 +450,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Get container info */ if (H5VL_file_get(vol_obj_file, &file_get_vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info"); /* Create reference */ if (ref_type == H5R_OBJECT1) { @@ -458,7 +458,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t if ((ret_value = H5R__encode_token_obj_compat((const H5O_token_t *)&obj_token, cont_info.token_size, buf, &buf_size)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to encode object reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to encode object reference"); } /* end if */ else { H5F_t *f = NULL; @@ -467,18 +467,18 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t /* Retrieve space */ if (space_id == H5I_INVALID_HID) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid"); if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Retrieve file from VOL object */ if (NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Encode dataset region */ if ((ret_value = H5R__encode_token_region_compat(f, (const H5O_token_t *)&obj_token, cont_info.token_size, space, buf, &buf_size)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to encode region reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to encode region reference"); } /* end else */ done: @@ -513,21 +513,21 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object token */ if (H5R__decode_token_compat(vol_obj, vol_obj_type, ref_type, buf, &obj_token) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -540,7 +540,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj /* Retrieve object's type */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't retrieve object type") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't retrieve object type"); done: FUNC_LEAVE_API(ret_value) @@ -574,27 +574,27 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *re /* Check args */ if (oapl_id < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list"); if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&oapl_id, H5P_CLS_DACC, obj_id, FALSE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(obj_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get object token */ if (H5R__decode_token_compat(vol_obj, vol_obj_type, ref_type, buf, &obj_token) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5I_INVALID_HID, "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, H5I_INVALID_HID, "unable to get object token"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -604,11 +604,11 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *re /* Open object by token */ if (NULL == (opened_obj = H5VL_object_open(vol_obj, &loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object by token"); /* Register object */ if ((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: FUNC_LEAVE_API(ret_value) @@ -646,13 +646,13 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref) /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer"); if (ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier"); #ifndef NDEBUG { @@ -661,7 +661,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref) /* Check if using native VOL connector */ if (H5VL_object_is_native(vol_obj, &is_native) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, - "can't query if file uses native VOL connector") + "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -670,15 +670,15 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref) /* Get object type */ if ((vol_obj_type = H5I_get_type(id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Get the file for the object */ if ((file_id = H5F_get_file_id(vol_obj, vol_obj_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file or file object"); /* Retrieve VOL object */ if (NULL == (vol_obj_file = H5VL_vol_object(file_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_GET_CONT_INFO; @@ -686,19 +686,19 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref) /* Get container info */ if (H5VL_file_get(vol_obj_file, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get container info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get container info"); /* Retrieve file from VOL object */ if (NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid VOL object"); /* Get the dataspace with the correct region selected */ if (H5R__decode_token_region_compat(f, buf, &buf_size, NULL, cont_info.token_size, &space) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to get dataspace"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0) @@ -734,21 +734,21 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *ref, char *name /*out*/, /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer"); if (ref_type != H5R_OBJECT1 && ref_type != H5R_DATASET_REGION1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type"); /* Get the VOL object */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier"); /* Get object type */ if ((vol_obj_type = H5I_get_type(id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier"); /* Get object token */ if (H5R__decode_token_compat(vol_obj, vol_obj_type, ref_type, buf, &obj_token) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, (-1), "unable to get object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, (-1), "unable to get object token"); /* Set location parameters */ loc_params.type = H5VL_OBJECT_BY_TOKEN; @@ -763,7 +763,7 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *ref, char *name /*out*/, /* Retrieve object's name */ if (H5VL_object_get(vol_obj, &loc_params, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "can't retrieve object name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "can't retrieve object name"); /* Set return value */ ret_value = (ssize_t)obj_name_len; diff --git a/src/H5Rint.c b/src/H5Rint.c index 99278a2..1e4b57e 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -46,7 +46,7 @@ do { \ size_t __nalloc = buf_size; \ if (func(val, buf, &__nalloc) < 0) \ - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m) \ + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m); \ if (buf && buf_size >= __nalloc) { \ buf += __nalloc; \ buf_size -= __nalloc; \ @@ -58,7 +58,7 @@ do { \ size_t __nalloc = buf_size; \ if (func(var, size, buf, &__nalloc) < 0) \ - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m) \ + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m); \ if (buf && buf_size >= __nalloc) { \ p += __nalloc; \ buf_size -= __nalloc; \ @@ -71,7 +71,7 @@ do { \ size_t __nbytes = buf_size; \ if (func(buf, &__nbytes, val) < 0) \ - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m) \ + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m); \ buf += __nbytes; \ buf_size -= __nbytes; \ actual += __nbytes; \ @@ -81,7 +81,7 @@ do { \ size_t __nbytes = buf_size; \ if (func(buf, &__nbytes, var, size) < 0) \ - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m) \ + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m); \ p += __nbytes; \ buf_size -= __nbytes; \ actual += __nbytes; \ @@ -194,11 +194,11 @@ H5R__create_object(const H5O_token_t *obj_token, size_t token_size, H5R_ref_priv ref->loc_id = H5I_INVALID_HID; ref->type = (uint8_t)H5R_OBJECT2; if (H5R__set_obj_token(ref, obj_token, token_size) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token"); /* Cache encoding size (assume no external reference) */ if (H5R__encode(NULL, ref, NULL, &encode_size, 0) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size"); ref->encode_size = (uint32_t)encode_size; H5R_LOG_DEBUG("Created object reference, %d, filename=%s, obj_addr=%s, encode size=%u", @@ -232,16 +232,16 @@ H5R__create_region(const H5O_token_t *obj_token, size_t token_size, H5S_t *space /* Create new reference */ ref->info.obj.filename = NULL; if (NULL == (ref->info.reg.space = H5S_copy(space, FALSE, TRUE))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); ref->loc_id = H5I_INVALID_HID; ref->type = (uint8_t)H5R_DATASET_REGION2; if (H5R__set_obj_token(ref, obj_token, token_size) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token"); /* Cache encoding size (assume no external reference) */ if (H5R__encode(NULL, ref, NULL, &encode_size, 0) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size"); ref->encode_size = (uint32_t)encode_size; H5R_LOG_DEBUG("Created region reference, %d, filename=%s, obj_addr=%s, encode size=%u", @@ -281,21 +281,21 @@ H5R__create_attr(const H5O_token_t *obj_token, size_t token_size, const char *at /* Make sure that attribute name is not longer than supported encode size */ if (HDstrlen(attr_name) > H5R_MAX_STRING_LEN) HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "attribute name too long (%d > %d)", - (int)HDstrlen(attr_name), H5R_MAX_STRING_LEN) + (int)HDstrlen(attr_name), H5R_MAX_STRING_LEN); /* Create new reference */ ref->info.obj.filename = NULL; if (NULL == (ref->info.attr.name = HDstrdup(attr_name))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name"); ref->loc_id = H5I_INVALID_HID; ref->type = (uint8_t)H5R_ATTR; if (H5R__set_obj_token(ref, obj_token, token_size) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to set object token"); /* Cache encoding size (assume no external reference) */ if (H5R__encode(NULL, ref, NULL, &encode_size, 0) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "unable to determine encoding size"); ref->encode_size = (uint32_t)encode_size; H5R_LOG_DEBUG("Created attribute reference, %d, filename=%s, obj_addr=%s, attr name=%s, encode size=%u", @@ -341,7 +341,7 @@ H5R__destroy(H5R_ref_priv_t *ref) case H5R_DATASET_REGION2: if (H5S_close(ref->info.reg.space) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "Cannot close dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "Cannot close dataspace"); ref->info.reg.space = NULL; break; @@ -356,22 +356,22 @@ H5R__destroy(H5R_ref_priv_t *ref) case H5R_BADTYPE: case H5R_MAXTYPE: assert("invalid reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)"); default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)"); } /* end switch */ /* Decrement refcount of attached loc_id */ if (ref->type && (ref->loc_id != H5I_INVALID_HID)) { if (ref->app_ref) { if (H5I_dec_app_ref(ref->loc_id) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed"); } else { if (H5I_dec_ref(ref->loc_id) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed"); } } @@ -403,11 +403,11 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref) if ((ref->loc_id != H5I_INVALID_HID)) { if (ref->app_ref) { if (H5I_dec_app_ref(ref->loc_id) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed"); } else { if (H5I_dec_ref(ref->loc_id) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed"); } } ref->loc_id = id; @@ -417,7 +417,7 @@ H5R__set_loc_id(H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref) * expected to be destroyed, this allows the loc_id to be cleanly released * on shutdown if users fail to call H5Rdestroy(). */ if (inc_ref && H5I_inc_ref(ref->loc_id, app_ref) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed"); ref->app_ref = app_ref; done: @@ -472,39 +472,39 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL connector info"); /* Stash a copy of the "top-level" connector property, before any pass-through * connectors modify or unwrap it. */ if (H5CX_set_vol_connector_prop(&connector_prop) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, - "can't set VOL connector info in API context") + "can't set VOL connector info in API context"); /* Open the file */ /* (Must open file read-write to allow for object modifications) */ if (NULL == (new_file = H5VL_file_open(&connector_prop, H5R_REF_FILENAME(ref), H5F_ACC_RDWR, fapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file"); /* Get an ID for the file */ if ((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register file handle"); /* Get the file object */ if (NULL == (vol_obj = H5VL_vol_object(ret_value))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "invalid object identifier") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "invalid object identifier"); /* Make the 'post open' callback */ supported = 0; if (H5VL_introspect_opt_query(vol_obj, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "can't check for 'post open' operation") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "can't check for 'post open' operation"); if (supported & H5VL_OPT_QUERY_SUPPORTED) { H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */ @@ -515,12 +515,12 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) /* Make the 'post open' callback */ if (H5VL_file_optional(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5I_INVALID_HID, - "unable to make file 'post open' callback") + "unable to make file 'post open' callback"); } /* end if */ /* Attach loc_id to reference */ if (H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -591,7 +591,7 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) break; case H5R_DATASET_REGION2: if ((ret_value = H5S_extent_equal(ref1->info.reg.space, ref2->info.reg.space)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare dataspace extents") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "cannot compare dataspace extents"); break; case H5R_ATTR: assert(ref1->info.attr.name && ref2->info.attr.name); @@ -603,10 +603,10 @@ H5R__equal(const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2) case H5R_BADTYPE: case H5R_MAXTYPE: assert("invalid reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)"); default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)"); } /* end switch */ done: @@ -641,21 +641,21 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) break; case H5R_DATASET_REGION2: if (NULL == (dst_ref->info.reg.space = H5S_copy(src_ref->info.reg.space, FALSE, TRUE))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); break; case H5R_ATTR: if (NULL == (dst_ref->info.attr.name = HDstrdup(src_ref->info.attr.name))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy attribute name"); break; case H5R_OBJECT1: case H5R_DATASET_REGION1: assert("invalid reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)"); case H5R_BADTYPE: case H5R_MAXTYPE: default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + 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 */ @@ -663,7 +663,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) 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") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Cannot copy filename"); dst_ref->loc_id = H5I_INVALID_HID; } else { @@ -672,7 +672,7 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) /* Set location ID and hold reference to it */ dst_ref->loc_id = src_ref->loc_id; if (H5I_inc_ref(dst_ref->loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed"); dst_ref->app_ref = TRUE; } @@ -701,7 +701,7 @@ H5R__get_obj_token(const H5R_ref_priv_t *ref, H5O_token_t *obj_token, size_t *to if (obj_token) { if (0 == ref->token_size) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "NULL token size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "NULL token size"); H5MM_memcpy(obj_token, &ref->info.obj.token, sizeof(H5O_token_t)); } if (token_size) @@ -763,7 +763,7 @@ H5R__get_region(const H5R_ref_priv_t *ref, H5S_t *space) /* Copy reference selection to destination */ if (H5S_select_copy(space, ref->info.reg.space, FALSE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "unable to copy selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -792,7 +792,7 @@ H5R__get_file_name(const H5R_ref_priv_t *ref, char *buf, size_t size) /* Return if that reference has no filename set */ if (!ref->info.obj.filename) - HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, (-1), "no filename available for that reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, (-1), "no filename available for that reference"); /* Get the file name length */ copy_len = HDstrlen(ref->info.obj.filename); @@ -930,11 +930,11 @@ H5R__encode(const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf, case H5R_BADTYPE: case H5R_MAXTYPE: assert("invalid reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)"); default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)"); } /* end switch */ H5R_LOG_DEBUG("Encoded reference, filename=%s, obj_addr=%s, encode size=%u", ref->info.obj.filename, @@ -973,12 +973,12 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref) /* Don't decode if buffer size isn't big enough */ buf_size = *nbytes; if (buf_size < H5R_ENCODE_HEADER_SIZE) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Set new reference */ ref->type = (int8_t)*p++; if (ref->type <= H5R_BADTYPE || ref->type >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type"); /* Set flags */ flags = *p++; @@ -1017,10 +1017,10 @@ H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref) case H5R_BADTYPE: case H5R_MAXTYPE: assert("invalid reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (invalid reference type)"); default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)"); } /* end switch */ /* Set loc ID to invalid */ @@ -1096,12 +1096,12 @@ H5R__decode_obj_token(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj /* Don't decode if buffer size isn't big enough */ if (*nbytes < sizeof(uint8_t)) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Get token size */ *token_size = *p++; if (*token_size > sizeof(H5O_token_t)) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Invalid token size (%u)", *token_size) + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Invalid token size (%u)", *token_size); /* Make sure that token is initialized */ memset(obj_token, 0, sizeof(H5O_token_t)); @@ -1139,7 +1139,7 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc) /* Get the amount of space required to serialize the selection */ if ((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, - "Cannot determine amount of space needed for serializing selection") + "Cannot determine amount of space needed for serializing selection"); /* Don't encode if buffer size isn't big enough or buffer is empty */ if (buf && *nalloc >= ((size_t)buf_size + 2 * sizeof(uint32_t))) { @@ -1151,12 +1151,12 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc) /* Encode the extent rank */ if ((rank = H5S_get_simple_extent_ndims(space)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't get extent rank for selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't get extent rank for selection"); UINT32ENCODE(p, (uint32_t)rank); /* Serialize the selection */ if (H5S_SELECT_SERIALIZE(space, (unsigned char **)&p) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "can't serialize selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "can't serialize selection"); } /* end if */ *nalloc = (size_t)buf_size + 2 * sizeof(uint32_t); @@ -1191,7 +1191,7 @@ H5R__decode_region(const unsigned char *buf, size_t *nbytes, H5S_t **space_ptr) /* Don't decode if buffer size isn't big enough */ if (*nbytes < (2 * sizeof(uint32_t))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Decode the selection size */ UINT32DECODE(p, buf_size); @@ -1203,19 +1203,19 @@ H5R__decode_region(const unsigned char *buf, size_t *nbytes, H5S_t **space_ptr) /* Don't decode if buffer size isn't big enough */ if (*nbytes < buf_size) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Deserialize the selection (dataspaces need the extent rank information) */ if (NULL == (space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); if (H5S_set_extent_simple(space, rank, NULL, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set extent rank for selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set extent rank for selection"); if (p - 1 > p_end) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Ran off end of buffer while decoding") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Ran off end of buffer while decoding"); if (H5S_SELECT_DESERIALIZE(&space, &p, (size_t)(p_end - p + 1)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "can't deserialize selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "can't deserialize selection"); *nbytes = buf_size; *space_ptr = space; @@ -1247,7 +1247,7 @@ H5R__encode_string(const char *string, unsigned char *buf, size_t *nalloc) /* Get the amount of space required to serialize the string */ string_len = HDstrlen(string); if (string_len > H5R_MAX_STRING_LEN) - HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "string too long") + HGOTO_ERROR(H5E_REFERENCE, H5E_ARGS, FAIL, "string too long"); /* Compute buffer size, allow for the attribute name length and object address */ buf_size = string_len + sizeof(uint16_t); @@ -1290,7 +1290,7 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr) /* Don't decode if buffer size isn't big enough */ if (*nbytes < sizeof(uint16_t)) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Get the string length */ UINT16DECODE(p, string_len); @@ -1298,7 +1298,7 @@ H5R__decode_string(const unsigned char *buf, size_t *nbytes, char **string_ptr) /* Allocate the string */ if (NULL == (string = (char *)H5MM_malloc(string_len + 1))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, FAIL, "Cannot allocate string") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, FAIL, "Cannot allocate string"); /* Copy the string */ H5MM_memcpy(string, p, string_len); @@ -1338,7 +1338,7 @@ H5R__encode_heap(H5F_t *f, unsigned char *buf, size_t *nalloc, const unsigned ch /* Write the reference information to disk (allocates space also) */ if (H5HG_insert(f, data_size, data, &hobjid) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_WRITEERROR, FAIL, "Unable to write reference information") + HGOTO_ERROR(H5E_REFERENCE, H5E_WRITEERROR, FAIL, "Unable to write reference information"); /* Encode the heap information */ H5F_addr_encode(f, &p, hobjid.addr); @@ -1378,17 +1378,17 @@ H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned ch buf_size = H5HG_HEAP_ID_SIZE(f); /* Don't decode if buffer size isn't big enough */ if (*nbytes < buf_size) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); /* Get the heap information */ H5F_addr_decode(f, &p, &(hobjid.addr)); if (!H5_addr_defined(hobjid.addr) || hobjid.addr == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer"); UINT32DECODE(p, hobjid.idx); /* Read the information from disk */ if (NULL == (*data_ptr = (unsigned char *)H5HG_read(f, &hobjid, (void *)*data_ptr, data_size))) - HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL, "Unable to read reference data") + HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL, "Unable to read reference data"); *nbytes = buf_size; @@ -1450,7 +1450,7 @@ H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token /* Don't decode if buffer size isn't big enough */ if (*nbytes < token_size) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small"); H5MM_memcpy(obj_token, buf, token_size); @@ -1491,7 +1491,7 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbyt /* Read from heap */ if (H5R__decode_heap(f, buf, nbytes, &data, &data_size) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Get object address */ p = (const uint8_t *)data; @@ -1508,19 +1508,19 @@ H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbyt if (H5VL_native_token_to_addr(f, H5I_FILE, token, &oloc.addr) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Open and copy the dataset's dataspace */ if (NULL == (space = H5S_read(&oloc))) - HGOTO_ERROR(H5E_REFERENCE, H5E_NOTFOUND, FAIL, "not found") + HGOTO_ERROR(H5E_REFERENCE, H5E_NOTFOUND, FAIL, "not found"); /* Unserialize the selection */ if (p - 1 >= p_end) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Ran off end of buffer while deserializing") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Ran off end of buffer while deserializing"); if (H5S_SELECT_DESERIALIZE(&space, &p, (size_t)(p_end - p + 1)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "can't deserialize selection") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "can't deserialize selection"); *space_ptr = space; } diff --git a/src/H5S.c b/src/H5S.c index 9954c27..d1002ad 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -110,12 +110,12 @@ H5S_init(void) /* Initialize the ID group for the dataspace IDs */ if (H5I_register_type(H5I_DATASPACE_CLS) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class"); /* Initialize the ID group for the dataspace selection iterator IDs */ if (H5I_register_type(H5I_SPACE_SEL_ITER_CLS) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, - "unable to initialize dataspace selection iterator ID class") + "unable to initialize dataspace selection iterator ID class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -254,7 +254,7 @@ H5S_create(H5S_class_t type) /* Create a new dataspace */ if (NULL == (new_ds = H5FL_CALLOC(H5S_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Initialize default dataspace state */ new_ds->extent.type = type; @@ -283,14 +283,14 @@ H5S_create(H5S_class_t type) /* Start with "all" selection */ if (H5S_select_all(new_ds, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection"); /* Reset common selection info pointer */ new_ds->select.sel_info.hslab = NULL; /* Reset "shared" info on extent */ if (H5O_msg_reset_share(H5O_SDSPACE_ID, &(new_ds->extent.sh_loc)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, NULL, "unable to reset shared component info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, NULL, "unable to reset shared component info"); /* Set return value */ ret_value = new_ds; @@ -332,14 +332,14 @@ H5Screate(H5S_class_t type) /* Check args */ if (type <= H5S_NO_CLASS || type > H5S_NULL) /* don't allow complex dataspace yet */ - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dataspace type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dataspace type"); if (NULL == (new_ds = H5S_create(type))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create dataspace"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, new_ds, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); done: if (ret_value < 0) @@ -399,11 +399,11 @@ H5S_close(H5S_t *ds) /* Release selection (this should come before the extent release) */ if (H5S_SELECT_RELEASE(ds) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace selection"); /* Release extent */ if (H5S__extent_release(&ds->extent) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent"); done: /* Release the main structure. @@ -435,11 +435,11 @@ H5Sclose(hid_t space_id) /* Check args */ if (NULL == H5I_object_verify(space_id, H5I_DATASPACE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* When the reference count reaches zero the resources are freed */ if (H5I_dec_app_ref(space_id) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "problem freeing id") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "problem freeing id"); done: FUNC_LEAVE_API(ret_value) @@ -468,15 +468,15 @@ H5Scopy(hid_t space_id) /* Check args */ if (NULL == (src = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); /* Copy */ if (NULL == (dst = H5S_copy(src, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to copy dataspace"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, dst, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (ret_value < 0) @@ -507,13 +507,13 @@ H5Sextent_copy(hid_t dst_id, hid_t src_id) /* Check args */ if (NULL == (src = (H5S_t *)H5I_object_verify(src_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (dst = (H5S_t *)H5I_object_verify(dst_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Copy */ if (H5S_extent_copy(dst, src) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent"); done: FUNC_LEAVE_API(ret_value) @@ -540,13 +540,13 @@ H5S_extent_copy(H5S_t *dst, const H5S_t *src) /* Copy extent */ if (H5S__extent_copy_real(&(dst->extent), &(src->extent), TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy extent"); /* If the selection is 'all', update the number of elements selected in the * destination space */ if (H5S_SEL_ALL == H5S_GET_SELECT_TYPE(dst)) if (H5S_select_all(dst, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -571,7 +571,7 @@ H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_m /* Release destination extent before we copy over it */ if (H5S__extent_release(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent"); /* Copy the regular fields */ dst->type = src->type; @@ -611,7 +611,7 @@ H5S__extent_copy_real(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_m /* Copy the shared object info */ if (H5O_set_shared(&(dst->sh_loc), &(src->sh_loc)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy shared information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy shared information"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -642,15 +642,15 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max) FUNC_ENTER_NOAPI(NULL) if (NULL == (dst = H5FL_CALLOC(H5S_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the source dataspace's extent */ if (H5S__extent_copy_real(&(dst->extent), &(src->extent), copy_max) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy extent"); /* Copy the source dataspace's selection */ if (H5S_select_copy(dst, src, share_selection) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy select") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy select"); /* Set the return value */ ret_value = dst; @@ -715,7 +715,7 @@ H5Sget_simple_extent_npoints(hid_t space_id) /* Check args */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); ret_value = (hssize_t)H5S_GET_EXTENT_NPOINTS(ds); @@ -777,7 +777,7 @@ H5S_get_npoints_max(const H5S_t *ds) case H5S_NO_CLASS: default: assert("unknown dataspace class" && 0); - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, 0, "internal error (unknown dataspace class)"); } done: @@ -805,7 +805,7 @@ H5Sget_simple_extent_ndims(hid_t space_id) /* Check args */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a dataspace"); ret_value = (int)H5S_GET_EXTENT_NDIMS(ds); @@ -849,7 +849,7 @@ H5S_get_simple_extent_ndims(const H5S_t *ds) case H5S_NO_CLASS: default: assert("unknown dataspace class" && 0); - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)"); } /* end switch */ done: @@ -880,7 +880,7 @@ H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[] /*out*/, hsize_t maxdim /* Check args */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a dataspace"); ret_value = H5S_get_simple_extent_dims(ds, dims, maxdims); @@ -933,7 +933,7 @@ H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[]) case H5S_NO_CLASS: default: assert("unknown dataspace class" && 0); - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "internal error (unknown dataspace class)"); } /* end switch */ done: @@ -963,7 +963,7 @@ H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[]) /* Get dims for extent */ if ((ret_value = H5S_extent_get_dims(&ds->extent, dims, max_dims)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve dataspace extent dims") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve dataspace extent dims"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -993,7 +993,7 @@ H5S_write(H5F_t *f, H5O_t *oh, unsigned update_flags, H5S_t *ds) /* 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update simple dataspace message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update simple dataspace message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1022,7 +1022,7 @@ H5S_append(H5F_t *f, H5O_t *oh, H5S_t *ds) /* Add the dataspace message to the object header */ if (H5O_msg_append_oh(f, oh, H5O_SDSPACE_ID, 0, 0, &(ds->extent)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't add simple dataspace message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't add simple dataspace message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1051,14 +1051,14 @@ H5S_read(const H5O_loc_t *loc) assert(loc); if (NULL == (ds = H5FL_CALLOC(H5S_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); if (NULL == H5O_msg_read(loc, H5O_SDSPACE_ID, &(ds->extent))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to load dataspace info from dataset header") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to load dataspace info from dataset header"); /* Default to entire dataspace being selected */ if (H5S_select_all(ds, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection"); /* Set the value for successful return */ ret_value = ds; @@ -1127,7 +1127,7 @@ H5Sis_simple(hid_t space_id) /* Check args and all the boring stuff. */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace"); ret_value = H5S__is_simple(space); @@ -1173,28 +1173,28 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], con /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace"); if (rank > 0 && dims == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no dimensions specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no dimensions specified"); if (rank < 0 || rank > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid rank") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid rank"); if (dims) for (u = 0; u < rank; u++) if (H5S_UNLIMITED == dims[u]) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "current dimension must have a specific size, not H5S_UNLIMITED") + "current dimension must have a specific size, not H5S_UNLIMITED"); if (max != NULL) { if (dims == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "maximum dimension specified, but no current dimensions specified") + "maximum dimension specified, but no current dimensions specified"); for (u = 0; u < rank; u++) if (max[u] != H5S_UNLIMITED && max[u] < dims[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid maximum dimension size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid maximum dimension size"); } /* Do it */ if (H5S_set_extent_simple(space, (unsigned)rank, dims, max) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent"); done: FUNC_LEAVE_API(ret_value) @@ -1222,7 +1222,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs /* shift out of the previous state to a "simple" dataspace. */ if (H5S__extent_release(&space->extent) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "failed to release previous dataspace extent") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "failed to release previous dataspace extent"); if (rank == 0) { /* scalar variable */ space->extent.type = H5S_SCALAR; @@ -1264,7 +1264,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, const hs /* If the selection is 'all', update the number of elements selected */ if (H5S_GET_SELECT_TYPE(space) == H5S_SEL_ALL) if (H5S_select_all(space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1300,32 +1300,32 @@ H5Screate_simple(int rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/ /* Check arguments */ if (rank < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality cannot be negative") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality cannot be negative"); if (rank > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality is too large") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dimensionality is too large"); /* We allow users to use this function to create scalar or null dataspace. * Check DIMS isn't set when the RANK is 0. */ if (!dims && rank != 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dataspace information") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dataspace information"); /* Check whether the current dimensions are valid */ for (i = 0; i < rank; i++) { if (H5S_UNLIMITED == dims[i]) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, - "current dimension must have a specific size, not H5S_UNLIMITED") + "current dimension must have a specific size, not H5S_UNLIMITED"); if (maxdims && H5S_UNLIMITED != maxdims[i] && maxdims[i] < dims[i]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "maxdims is smaller than dims") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "maxdims is smaller than dims"); } /* end for */ /* Create the space and set the extent */ if (NULL == (space = H5S_create_simple((unsigned)rank, dims, maxdims))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, H5I_INVALID_HID, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, H5I_INVALID_HID, "can't create simple dataspace"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (ret_value < 0) @@ -1357,9 +1357,9 @@ H5S_create_simple(unsigned rank, const hsize_t dims[/*rank*/], const hsize_t max /* Create the space and set the extent */ if (NULL == (ret_value = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace"); if (H5S_set_extent_simple(ret_value, rank, dims, maxdims) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't set dimensions") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't set dimensions"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1389,14 +1389,14 @@ H5Sencode2(hid_t obj_id, void *buf, size_t *nalloc, hid_t fapl_id) /* Check argument and retrieve object */ if (NULL == (dspace = (H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); if (H5S_encode(dspace, (unsigned char **)&buf, nalloc) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace"); done: FUNC_LEAVE_API(ret_value) @@ -1426,15 +1426,15 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Allocate "fake" file structure */ if (NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct"); /* Find out the size of buffer needed for extent */ if ((extent_size = H5O_msg_raw_size(f, H5O_SDSPACE_ID, TRUE, obj)) == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size"); /* Find out the size of buffer needed for selection */ if ((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size"); H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t); /* Verify the size of buffer. If it's not big enough, simply return the @@ -1458,13 +1458,13 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Encode the extent part of dataspace */ if (H5O_msg_encode(f, H5O_SDSPACE_ID, TRUE, pp, obj) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode extent space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode extent space"); pp += extent_size; /* Encode the selection part of dataspace. */ *p = pp; if (H5S_SELECT_SERIALIZE(obj, p) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space"); } /* end else */ done: @@ -1497,14 +1497,14 @@ H5Sdecode(const void *buf) H5TRACE1("i", "*x", buf); if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "empty buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "empty buffer"); if ((ds = H5S_decode((const unsigned char **)&buf)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, H5I_INVALID_HID, "can't decode object") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, H5I_INVALID_HID, "can't decode object"); /* Register the type and return the ID */ if ((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace"); done: FUNC_LEAVE_API(ret_value) @@ -1537,18 +1537,18 @@ H5S_decode(const unsigned char **p) /* Decode the type of the information */ if (*pp++ != H5O_SDSPACE_ID) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace"); /* Decode the version of the dataspace information */ if (*pp++ != H5S_ENCODE_VERSION) - HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace"); /* Decode the "size of size" information */ sizeof_size = *pp++; /* Allocate "fake" file structure */ if (NULL == (f = H5F_fake_alloc(sizeof_size))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct"); /* Decode size of extent information */ UINT32DECODE(pp, extent_size); @@ -1556,28 +1556,28 @@ H5S_decode(const unsigned char **p) /* Decode the extent part of dataspace */ /* (pass mostly bogus file pointer and bogus DXPL) */ if (NULL == (extent = (H5S_extent_t *)H5O_msg_decode(f, NULL, H5O_SDSPACE_ID, extent_size, pp))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode object"); pp += extent_size; /* Copy the extent into dataspace structure */ if (NULL == (ds = H5FL_CALLOC(H5S_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for dataspace conversion path table") + "memory allocation failed for dataspace conversion path table"); if (NULL == H5O_msg_copy(H5O_SDSPACE_ID, extent, &(ds->extent))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object"); if (H5S__extent_release(extent) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, NULL, "can't release previous dataspace") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, NULL, "can't release previous dataspace"); extent = H5FL_FREE(H5S_extent_t, extent); /* Initialize to "all" selection. Deserialization relies on valid existing selection. */ if (H5S_select_all(ds, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection"); /* Decode the select part of dataspace. * Because size of buffer is unknown, assume arbitrarily large buffer to allow decoding. */ *p = pp; if (H5S_SELECT_DESERIALIZE(&ds, p, SIZE_MAX) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection"); /* Set return value */ ret_value = ds; @@ -1641,7 +1641,7 @@ H5Sget_simple_extent_type(hid_t sid) /* Check arguments */ if (NULL == (space = (H5S_t *)H5I_object_verify(sid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5S_NO_CLASS, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5S_NO_CLASS, "not a dataspace"); ret_value = H5S_GET_EXTENT_TYPE(space); @@ -1674,11 +1674,11 @@ H5Sset_extent_none(hid_t space_id) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace"); /* Clear the previous extent from the dataspace */ if (H5S__extent_release(&space->extent) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, FAIL, "can't release previous dataspace") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, FAIL, "can't release previous dataspace"); space->extent.type = H5S_NULL; @@ -1714,7 +1714,7 @@ H5S_set_extent(H5S_t *space, const hsize_t *size) if (space->extent.max && H5S_UNLIMITED != space->extent.max[u] && space->extent.max[u] < size[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "dimension cannot exceed the existing maximal size (new: %llu max: %llu)", - (unsigned long long)size[u], (unsigned long long)space->extent.max[u]) + (unsigned long long)size[u], (unsigned long long)space->extent.max[u]); /* Indicate that dimension size can be modified */ ret_value = TRUE; @@ -1723,7 +1723,7 @@ H5S_set_extent(H5S_t *space, const hsize_t *size) /* Update dimension size(s) */ if (ret_value) if (H5S_set_extent_real(space, size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "failed to change dimension size(s)") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "failed to change dimension size(s)"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1790,11 +1790,11 @@ H5S_set_extent_real(H5S_t *space, const hsize_t *size) /* If the selection is 'all', update the number of elements selected */ if (H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space)) if (H5S_select_all(space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); /* Mark the dataspace as no longer shared if it was before */ if (H5O_msg_reset_share(H5O_SDSPACE_ID, space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRESET, FAIL, "can't stop sharing dataspace"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1824,11 +1824,11 @@ H5Sextent_equal(hid_t space1_id, hid_t space2_id) /* check args */ if (NULL == (ds1 = (const H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE)) || NULL == (ds2 = (const H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Check dataspaces for extent's equality */ if ((ret_value = H5S_extent_equal(ds1, ds2)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed"); done: FUNC_LEAVE_API(ret_value) @@ -1941,7 +1941,7 @@ H5S_set_version(H5F_t *f, H5S_t *ds) /* Version bounds check */ if (version > H5O_sdspace_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "Dataspace version out of bounds") + HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "Dataspace version out of bounds"); /* Set the message version */ ds->extent.version = version; diff --git a/src/H5SL.c b/src/H5SL.c index d185d6d..29d0f5f 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -173,7 +173,7 @@ H5SL_fac_nalloc_g *= 2; \ if (NULL == (H5SL_fac_g = (H5FL_fac_head_t **)H5MM_realloc( \ (void *)H5SL_fac_g, H5SL_fac_nalloc_g * sizeof(H5FL_fac_head_t *)))) \ - HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed") \ + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed"); \ } \ \ /* Create the new factory */ \ @@ -184,7 +184,7 @@ \ /* Allocate space for new forward pointers */ \ if (NULL == (_tmp = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[X->log_nalloc]))) \ - HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed") \ + HGOTO_ERROR(H5E_SLIST, H5E_CANTALLOC, ERR, "memory allocation failed"); \ H5MM_memcpy((void *)_tmp, (const void *)X->forward, (LVL + 1) * sizeof(H5SL_node_t *)); \ X->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[X->log_nalloc - 1], (void *)X->forward); \ X->forward = _tmp; \ @@ -205,7 +205,7 @@ \ /* Allocate space for new forward pointers */ \ if (NULL == (_tmp = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[X->log_nalloc]))) \ - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") \ + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed"); \ H5MM_memcpy((void *)_tmp, (const void *)X->forward, (LVL) * sizeof(H5SL_node_t *)); \ X->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[X->log_nalloc + 1], (void *)X->forward); \ X->forward = _tmp; \ @@ -302,7 +302,7 @@ } \ \ if (_next && H5_GLUE3(H5SL_LOCATE_, CMP, _EQ)(SLIST, TYPE, _next, KEY, HASHVAL)) \ - HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't insert duplicate key") \ + HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't insert duplicate key"); \ } /* Macro used to remove node */ @@ -631,7 +631,7 @@ H5SL__new_node(void *item, const void *key, uint32_t hashval) /* Allocate the node */ if (NULL == (ret_value = (H5SL_node_t *)H5FL_MALLOC(H5SL_node_t))) - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed"); /* Initialize node */ ret_value->key = key; @@ -640,7 +640,7 @@ H5SL__new_node(void *item, const void *key, uint32_t hashval) ret_value->hashval = hashval; if (NULL == (ret_value->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) { ret_value = H5FL_FREE(H5SL_node_t, ret_value); - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed"); } ret_value->log_nalloc = 0; @@ -740,7 +740,7 @@ H5SL__insert_common(H5SL_t *slist, void *item, const void *key) /* Create new node of level 0 */ if (NULL == (x = H5SL__new_node(item, key, hashval))) - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "can't create new skip list node") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "can't create new skip list node"); /* Update the links */ x->backward = prev; @@ -827,7 +827,7 @@ H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data) slist->header->forward = (H5SL_node_t **)H5FL_FAC_FREE(H5SL_fac_g[slist->header->log_nalloc], slist->header->forward); if (NULL == (slist->header->forward = (H5SL_node_t **)H5FL_FAC_MALLOC(H5SL_fac_g[0]))) - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, FAIL, "memory allocation failed"); slist->header->forward[0] = NULL; slist->header->log_nalloc = 0; slist->header->level = 0; @@ -881,7 +881,7 @@ H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Free skip list nodes */ if (H5SL__release_common(slist, op, op_data) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes") + HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes"); /* Release header node */ slist->header->forward = @@ -926,7 +926,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp) /* Allocate skip list structure */ if (NULL == (new_slist = H5FL_MALLOC(H5SL_t))) - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set the static internal fields */ new_slist->type = type; @@ -939,7 +939,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp) /* Allocate the header node */ if (NULL == (header = H5SL__new_node(NULL, NULL, (uint32_t)ULONG_MAX))) - HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "can't create new skip list node") + HGOTO_ERROR(H5E_SLIST, H5E_NOSPACE, NULL, "can't create new skip list node"); /* Initialize header node's forward pointer */ header->forward[0] = NULL; @@ -1033,7 +1033,7 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key) /* Insert item into skip list */ if (NULL == H5SL__insert_common(slist, item, key)) - HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't create new skip list node") + HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't create new skip list node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1079,7 +1079,7 @@ H5SL_add(H5SL_t *slist, void *item, const void *key) /* Insert item into skip list */ if (NULL == (ret_value = H5SL__insert_common(slist, item, key))) - HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't create new skip list node") + HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't create new skip list node"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2132,7 +2132,7 @@ H5SL_release(H5SL_t *slist) /* Free skip list nodes */ if (H5SL__release_common(slist, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes") + HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2181,7 +2181,7 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Free skip list nodes */ if (H5SL__release_common(slist, op, op_data) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes") + HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2228,7 +2228,7 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data) /* Close skip list */ if (H5SL__close_common(slist, op, op_data) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list") + HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2268,7 +2268,7 @@ H5SL_close(H5SL_t *slist) /* Close skip list */ if (H5SL__close_common(slist, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list") + HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5SM.c b/src/H5SM.c index 8c34360..4c57e3f 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -126,30 +126,30 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc) /* Initialize master table */ if (NULL == (table = H5FL_CALLOC(H5SM_master_table_t))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table"); table->num_indexes = H5F_SOHM_NINDEXES(f); table->table_size = H5SM_TABLE_SIZE(f); /* Get information from fcpl */ if (H5P_get(fc_plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, &index_type_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM type flags") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM type flags"); if (H5P_get(fc_plist, H5F_CRT_SHMSG_LIST_MAX_NAME, &list_max) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM list maximum") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM list maximum"); if (H5P_get(fc_plist, H5F_CRT_SHMSG_BTREE_MIN_NAME, &btree_min) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM btree minimum") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM btree minimum"); if (H5P_get(fc_plist, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, &minsizes) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM message min sizes") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get SOHM message min sizes"); /* Verify that values are valid */ if (table->num_indexes > H5O_SHMESG_MAX_NINDEXES) - HGOTO_ERROR(H5E_SOHM, H5E_BADRANGE, FAIL, "number of indexes in property list is too large") + HGOTO_ERROR(H5E_SOHM, H5E_BADRANGE, FAIL, "number of indexes in property list is too large"); /* Check that type flags weren't duplicated anywhere */ type_flags_used = 0; for (x = 0; x < table->num_indexes; ++x) { if (index_type_flags[x] & type_flags_used) HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, - "the same shared message type flag is assigned to more than one index") + "the same shared message type flag is assigned to more than one index"); type_flags_used |= index_type_flags[x]; } /* end for */ @@ -169,7 +169,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc) /* Allocate the SOHM indexes as an array. */ if (NULL == (table->indexes = (H5SM_index_header_t *)H5FL_ARR_MALLOC(H5SM_index_header_t, (size_t)table->num_indexes))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "memory allocation failed for SOHM indexes") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "memory allocation failed for SOHM indexes"); /* Initialize all of the indexes, but don't allocate space for them to * hold messages until we actually need to write to them. @@ -195,11 +195,11 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc) /* Allocate space for the table on disk */ if (HADDR_UNDEF == (table_addr = H5MF_alloc(f, H5FD_MEM_SOHM_TABLE, (hsize_t)table->table_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table"); /* Cache the new table */ if (H5AC_insert_entry(f, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache"); /* Record the address of the master table in the file */ H5F_SET_SOHM_ADDR(f, table_addr); @@ -219,7 +219,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t *fc_plist, const H5O_loc_t *ext_loc) sohm_table.nindexes = H5F_SOHM_NINDEXES(f); if (H5O_msg_create(ext_loc, H5O_SHMESG_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &sohm_table) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to update SOHM header message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to update SOHM header message"); done: /* Reset the ring in the API context */ @@ -268,7 +268,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag) break; default: - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "unknown message type ID") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "unknown message type ID"); } /* end switch */ done: @@ -299,7 +299,7 @@ H5SM__get_index(const H5SM_master_table_t *table, unsigned type_id) /* Translate the H5O type_id into an H5SM type flag */ if (H5SM__type_to_flag(type_id, &type_flag) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't map message type to flag") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't map message type to flag"); /* Search the indexes until we find one that matches this flag or we've * searched them all. @@ -336,7 +336,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id) /* Translate the H5O type_id into an H5SM type flag */ if (H5SM__type_to_flag(type_id, &type_flag) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't map message type to flag") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't map message type to flag"); /* Look up the master SOHM table */ if (H5_addr_defined(H5F_SOHM_ADDR(f))) { @@ -347,7 +347,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id) if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); } /* end if */ else /* No shared messages of any type */ @@ -398,11 +398,11 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr) /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Look up index for message type */ if ((index_num = H5SM__get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index"); /* Retrieve heap address for index */ *fheap_addr = table->indexes[index_num].heap_addr; @@ -445,7 +445,7 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header) /* Create the list index */ if (HADDR_UNDEF == (list_addr = H5SM__create_list(f, header))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "list creation failed for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "list creation failed for SOHM index"); /* Set the index type & address */ header->index_type = H5SM_LIST; @@ -463,11 +463,11 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header) bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT; bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT; if (NULL == (bt2 = H5B2_create(f, &bt2_cparam, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2, &tree_addr) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for SOHM index"); /* Set the index type & address */ header->index_type = H5SM_BTREE; @@ -485,10 +485,10 @@ H5SM__create_index(H5F_t *f, H5SM_index_header_t *header) fheap_cparam.id_len = 0; fheap_cparam.max_man_size = H5O_FHEAP_MAX_MAN_SIZE; if (NULL == (fheap = H5HF_create(f, &fheap_cparam))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create fractal heap"); if (H5HF_get_heap_addr(fheap, &(header->heap_addr)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address"); #ifndef NDEBUG { @@ -496,7 +496,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") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length"); assert(fheap_id_len == H5O_FHEAP_ID_LEN); } #endif /* NDEBUG */ @@ -540,7 +540,8 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap) /* Check the index list's status in the metadata cache */ if (H5AC_get_entry_status(f, header->index_addr, &index_status) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to check metadata cache status for direct block") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, + "unable to check metadata cache status for direct block"); /* If the index list is in the cache, expunge it now */ if (index_status & H5AC_ES__IN_CACHE) { @@ -550,7 +551,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap) /* 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) - HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove list index from cache") + HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove list index from cache"); } /* end if */ } /* end if */ else { @@ -558,7 +559,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap) /* Delete the B-tree. */ if (H5B2_delete(f, header->index_addr, f, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree"); /* Revert to list unless B-trees can have zero records */ if (header->btree_min > 0) @@ -568,7 +569,7 @@ H5SM__delete_index(H5F_t *f, H5SM_index_header_t *header, hbool_t delete_heap) /* Free the index's heap if requested. */ if (delete_heap == TRUE) { if (H5HF_delete(f, header->heap_addr) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete fractal heap"); header->heap_addr = HADDR_UNDEF; } /* end if */ @@ -610,9 +611,9 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header) /* Allocate list in memory */ if (NULL == (list = H5FL_CALLOC(H5SM_list_t))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list"); if (NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_CALLOC(H5SM_sohm_t, num_entries))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list"); /* Initialize messages in list */ for (x = 0; x < num_entries; x++) @@ -623,11 +624,11 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header) /* Allocate space for the list on disk */ if (HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_SOHM_INDEX, (hsize_t)header->list_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list"); /* Put the list into the cache */ if (H5AC_insert_entry(f, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache"); /* Set return value */ ret_value = addr; @@ -693,11 +694,11 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t * bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT; bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT; if (NULL == (bt2 = H5B2_create(f, &bt2_cparam, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index"); /* Retrieve the v2 B-tree's address in the file */ if (H5B2_get_addr(bt2, &tree_addr) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for SOHM index"); /* Set up key values that all messages will use. Since these messages * are in the heap, they have a heap ID and no encoding or type_id. @@ -715,13 +716,13 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t * /* Get the encoded message */ if (H5SM__read_mesg(f, &(key.message), fheap, open_oh, &key.encoding_size, &encoding_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "Couldn't read SOHM message in list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "Couldn't read SOHM message in list"); key.encoding = encoding_buf; /* Insert the message into the B-tree */ if (H5B2_insert(bt2, &key) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree"); /* Free buffer from H5SM__read_mesg */ if (encoding_buf) @@ -732,7 +733,7 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t * /* Unprotect list in cache and release heap */ if (H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list"); *_list = list = NULL; /* Delete the old list index (but not its heap, which the new index is @@ -740,7 +741,7 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, H5SM_list_t * */ num_messages = header->num_messages; /* preserve this across the index deletion */ if (H5SM__delete_index(f, header, FALSE) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't free list index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't free list index"); /* Set/restore header info */ header->index_addr = tree_addr; @@ -826,7 +827,7 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header) /* Create a new list index */ if (HADDR_UNDEF == (header->index_addr = H5SM__create_list(f, header))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create shared message list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create shared message list"); /* Set up user data for metadata cache callback */ cache_udata.f = f; @@ -835,13 +836,13 @@ H5SM__convert_btree_to_list(H5F_t *f, H5SM_index_header_t *header) /* Protect the SOHM list */ if (NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM list index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM list index"); /* Delete the B-tree and have messages copy themselves to the * list as they're deleted */ if (H5B2_delete(f, btree_addr, f, H5SM__bt2_convert_to_list_op, list) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree"); done: /* Release the SOHM list from the cache */ @@ -880,7 +881,7 @@ H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg) /* Type-specific check */ if ((ret_value = H5O_msg_can_share(type_id, mesg)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "can_share callback returned error") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "can_share callback returned error"); if (ret_value == FALSE) HGOTO_DONE(FALSE); @@ -920,7 +921,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un /* "trivial" sharing checks */ if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error"); if (tri_ret == FALSE) HGOTO_DONE(FALSE); @@ -936,7 +937,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un if (NULL == (my_table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); } /* end if */ /* Find the right index for this message type. If there is no such index @@ -949,7 +950,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, ssize_t *sohm_index_num, un /* If the message isn't big enough, don't bother sharing it */ if (0 == (mesg_size = H5O_msg_raw_size(f, type_id, TRUE, mesg))) - HGOTO_ERROR(H5E_SOHM, H5E_BADMESG, FAIL, "unable to get OH message size") + HGOTO_ERROR(H5E_SOHM, H5E_BADMESG, FAIL, "unable to get OH message size"); if (mesg_size < my_table->indexes[index_num].min_mesg_size) HGOTO_DONE(FALSE); @@ -1056,7 +1057,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, if (mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE)) HGOTO_DONE(FALSE); if ((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error"); if (tri_ret == FALSE) HGOTO_DONE(FALSE); @@ -1066,11 +1067,11 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* "complex" sharing checks */ if ((tri_ret = H5SM_can_share(f, table, &index_num, type_id, mesg)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'complex' sharing checks returned error") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'complex' sharing checks returned error"); if (tri_ret == FALSE) HGOTO_DONE(FALSE); @@ -1079,7 +1080,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, /* If the index hasn't been allocated yet, create it */ if (table->indexes[index_num].index_addr == HADDR_UNDEF) { if (H5SM__create_index(f, &(table->indexes[index_num])) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to create SOHM index"); cache_flags |= H5AC__DIRTIED_FLAG; } /* end if */ @@ -1088,7 +1089,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, */ if (H5SM__write_mesg(f, open_oh, &(table->indexes[index_num]), (defer_flags & H5SM_DEFER) != 0, type_id, mesg, &cache_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "can't write shared message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "can't write shared message"); /* Set flags if this message was "written" without error and wasn't a * 'defer' attempt; it is now either fully shared or "shareable". @@ -1155,7 +1156,7 @@ H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed) /* 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, &message->u.heap_loc.fheap_id) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap"); message->location = H5SM_IN_HEAP; message->u.heap_loc.ref_count = 2; @@ -1231,15 +1232,15 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Encode the message to be written */ if ((buf_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)) == 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADSIZE, FAIL, "can't find message size") + HGOTO_ERROR(H5E_SOHM, H5E_BADSIZE, FAIL, "can't find message size"); if (NULL == (encoding_buf = H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding"); if (H5O_msg_encode(f, type_id, TRUE, (unsigned char *)encoding_buf, mesg) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, FAIL, "can't encode message to be shared") + HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, FAIL, "can't encode message to be shared"); /* Open the fractal heap for this index */ if (NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Set up a key for the message to be written */ key.file = f; @@ -1263,14 +1264,14 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* The index is a list; get it from the cache */ if (NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &cache_udata, defer ? H5AC__READ_ONLY_FLAG : H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index"); /* See if the message is already in the index and get its location. * Also record the first empty list position we find in case we need it * later. */ if (H5SM__find_in_list(list, &key, &empty_pos, &list_pos) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list"); if (defer) { if (list_pos != SIZE_MAX) @@ -1285,7 +1286,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Put the message in the heap and record its new heap ID */ if (H5HF_insert(fheap, key.encoding_size, key.encoding, &shared.u.heap_id) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, - "unable to insert message into fractal heap") + "unable to insert message into fractal heap"); list->messages[list_pos].location = H5SM_IN_HEAP; list->messages[list_pos].u.heap_loc.fheap_id = shared.u.heap_id; @@ -1309,7 +1310,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, header->index_addr, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index"); if (defer) { /* If this returns 0, it means that the message wasn't found. */ @@ -1318,7 +1319,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t * than 1 is always shared in the heap. */ if (H5B2_find(bt2, &key, &found, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index"); } /* end if */ else { H5SM_incr_ref_opdata op_data; @@ -1364,7 +1365,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Check if the message can be shared in another object's header */ if ((share_in_ohdr = H5O_msg_can_share_in_ohdr(type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'share in ohdr' check returned error") + HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'share in ohdr' check returned error"); /* If this message can be shared in an object header location, it is * "shareable" but not shared in the heap. @@ -1389,7 +1390,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Retrieve any creation index from the native message */ if (H5O_msg_get_crt_index(type_id, mesg, &shared.u.loc.index) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to retrieve creation index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to retrieve creation index"); if (defer) shared.u.loc.oh_addr = HADDR_UNDEF; @@ -1409,7 +1410,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (!defer) { /* Put the message in the heap and record its new heap ID */ if (H5HF_insert(fheap, key.encoding_size, key.encoding, &shared.u.heap_id) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to insert message into fractal heap"); key.message.location = H5SM_IN_HEAP; key.message.u.heap_loc.fheap_id = shared.u.heap_id; @@ -1424,7 +1425,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Check whether the list has grown enough that it needs to become a B-tree */ if (header->index_type == H5SM_LIST && header->num_messages >= header->list_max) if (H5SM__convert_list_to_btree(f, header, &list, fheap, open_oh) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to convert list to B-tree") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to convert list to B-tree"); /* Insert the new message into the SOHM index */ if (header->index_type == H5SM_LIST) { @@ -1433,10 +1434,10 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t size_t pos; if (H5SM__find_in_list(list, NULL, &empty_pos, &pos) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list"); if (pos == SIZE_MAX || empty_pos == SIZE_MAX) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to find empty entry in list"); } /* Insert message into list */ assert(list->messages[empty_pos].location == H5SM_NO_LOC); @@ -1451,11 +1452,11 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (NULL == bt2) { if (NULL == (bt2 = H5B2_open(f, header->index_addr, f))) HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, - "unable to open v2 B-tree for SOHM index") + "unable to open v2 B-tree for SOHM index"); } /* end if */ if (H5B2_insert(bt2, &key) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "couldn't add SOHM to B-tree"); } /* end else */ ++(header->num_messages); @@ -1469,7 +1470,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t /* Update the original message's shared component */ if (H5O_msg_set_share(type_id, &shared, mesg) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADMESG, FAIL, "unable to set sharing information") + HGOTO_ERROR(H5E_SOHM, H5E_BADMESG, FAIL, "unable to set sharing information"); done: /* Release the fractal heap & v2 B-tree if we opened them */ @@ -1532,11 +1533,11 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Find the correct index and try to delete from it */ if ((index_num = H5SM__get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index"); /* If mesg_buf is not NULL, the message's reference count has reached * zero and any file space it uses needs to be freed. mesg_buf holds the @@ -1544,11 +1545,11 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) */ if (H5SM__delete_from_index(f, open_oh, &(table->indexes[index_num]), sh_mesg, &cache_flags, &mesg_size, &mesg_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete message from SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete message from SOHM index"); /* Release the master SOHM table */ if (H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table"); table = NULL; /* If buf was allocated, delete the message it holds. This message may @@ -1558,10 +1559,10 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) if (mesg_buf) { if (NULL == (native_mesg = H5O_msg_decode(f, open_oh, type_id, mesg_size, (const unsigned char *)mesg_buf))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDECODE, FAIL, "can't decode shared message.") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDECODE, FAIL, "can't decode shared message."); if (H5O_msg_delete(f, open_oh, type_id, native_mesg) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "can't delete shared message.") + HGOTO_ERROR(H5E_SOHM, H5E_CANTFREE, FAIL, "can't delete shared message."); } /* end if */ done: @@ -1627,7 +1628,7 @@ H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t *key, size_t * int cmp; if (H5SM__message_compare(key, &(list->messages[x]), &cmp) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCOMPARE, FAIL, "can't compare message records") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCOMPARE, FAIL, "can't compare message records"); if (0 == cmp) { *pos = x; @@ -1735,7 +1736,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* Open the heap for this type of message. */ if (NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Get the message size and encoded message for the message to be deleted, * either from its OH or from the heap. @@ -1754,7 +1755,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* Get the encoded message */ if (H5SM__read_mesg(f, &key.message, fheap, open_oh, &buf_size, &encoding_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Set up key for message to be deleted. */ key.file = f; @@ -1775,13 +1776,13 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* If the index is stored as a list, get it from the cache */ if (NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index"); /* Find the message in the list */ if (H5SM__find_in_list(list, &key, NULL, &list_pos) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list"); if (list_pos == SIZE_MAX) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index"); if (list->messages[list_pos].location == H5SM_IN_HEAP) --(list->messages[list_pos].u.heap_loc.ref_count); @@ -1795,13 +1796,13 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, header->index_addr, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index"); /* If this returns failure, it means that the message wasn't found. * If it succeeds, a copy of the modified message will be returned. */ if (H5B2_modify(bt2, &key, H5SM__decr_ref, &message) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index"); /* Point to the message */ message_ptr = &message; @@ -1825,17 +1826,17 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* Open the index v2 B-tree, if it isn't already */ if (NULL == bt2) { if (NULL == (bt2 = H5B2_open(f, header->index_addr, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index"); } /* end if */ if (H5B2_remove(bt2, &key, NULL, NULL) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to delete message from index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to delete message from index"); } /* end else */ /* Remove the message from the heap if it was stored in the heap*/ if (old_loc == H5SM_IN_HEAP) if (H5HF_remove(fheap, &(message_ptr->u.heap_loc.fheap_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove message from heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove message from heap"); /* Return the message's encoding so anything it references can be freed */ *encoded_mesg = encoding_buf; @@ -1847,24 +1848,24 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, c /* Unprotect cache and release heap */ if (list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list"); list = NULL; assert(fheap); if (H5HF_close(fheap) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap"); fheap = NULL; /* Delete the index and its heap */ if (H5SM__delete_index(f, header, TRUE) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't delete empty index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "can't delete empty index"); } /* end if */ else if (header->index_type == H5SM_BTREE && header->num_messages < header->btree_min) { /* Otherwise, if we've just passed the btree-to-list cutoff, convert * this B-tree into a list */ if (H5SM__convert_btree_to_list(f, header) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to convert btree to list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINIT, FAIL, "unable to convert btree to list"); } /* end if */ } /* end if */ @@ -1919,7 +1920,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist) /* Check for the extension having a 'shared message info' message */ if ((status = H5O_msg_exists(ext_loc, H5O_SHMESG_ID)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "unable to read object header"); if (status) { H5SM_table_cache_ud_t cache_udata; /* User-data for callback */ unsigned index_flags[H5O_SHMESG_MAX_NINDEXES]; /* Message flags for each index */ @@ -1930,7 +1931,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist) /* Retrieve the 'shared message info' structure */ if (NULL == H5O_msg_read(ext_loc, H5O_SHMESG_ID, &sohm_table)) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "shared message info message not present") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "shared message info message not present"); /* Portably initialize the arrays */ memset(index_flags, 0, sizeof(index_flags)); @@ -1952,7 +1953,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist) /* Read the rest of the SOHM table information from the cache */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Get index conversion limits */ sohm_l2b = (unsigned)table->indexes[0].list_max; @@ -1978,15 +1979,15 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist) /* Set values in the property list */ tmp_sohm_nindexes = H5F_SOHM_NINDEXES(f); if (H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &tmp_sohm_nindexes) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes") + HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes"); if (H5P_set(fc_plist, H5F_CRT_SHMSG_INDEX_TYPES_NAME, index_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set type flags for indexes") + HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set type flags for indexes"); if (H5P_set(fc_plist, H5F_CRT_SHMSG_INDEX_MINSIZE_NAME, minsizes) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set type flags for indexes") + HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set type flags for indexes"); if (H5P_set(fc_plist, H5F_CRT_SHMSG_LIST_MAX_NAME, &sohm_l2b) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't set SOHM cutoff in property list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't set SOHM cutoff in property list"); if (H5P_set(fc_plist, H5F_CRT_SHMSG_BTREE_MIN_NAME, &sohm_b2l) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't set SOHM cutoff in property list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't set SOHM cutoff in property list"); } /* end if */ else { /* No SOHM info in file */ @@ -1997,7 +1998,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist) /* Shared object header messages are disabled */ tmp_sohm_nindexes = H5F_SOHM_NINDEXES(f); if (H5P_set(fc_plist, H5F_CRT_SHMSG_NINDEXES_NAME, &tmp_sohm_nindexes) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes") + HGOTO_ERROR(H5E_SOHM, H5E_CANTSET, FAIL, "can't set number of SOHM indexes"); } /* end else */ done: @@ -2106,16 +2107,16 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &tbl_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Find the correct index and find the message in it */ if ((index_num = H5SM__get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index"); header = &(table->indexes[index_num]); /* Open the heap for this message type */ if (NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Set up a SOHM message to correspond to the shared message passed in */ key.message.location = H5SM_IN_HEAP; @@ -2124,7 +2125,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize /* Get the encoded message */ if (H5SM__read_mesg(f, &key.message, fheap, NULL, &buf_size, &encoding_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Set up key for message to locate */ key.file = f; @@ -2145,13 +2146,13 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize /* If the index is stored as a list, get it from the cache */ if (NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &lst_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index"); /* Find the message in the list */ if (H5SM__find_in_list(list, &key, NULL, &list_pos) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list"); if (list_pos == SIZE_MAX) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index"); /* Copy the message */ message = list->messages[list_pos]; @@ -2164,14 +2165,14 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, header->index_addr, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index"); /* Look up the message in the v2 B-tree */ msg_exists = FALSE; if (H5B2_find(bt2, &key, &msg_exists, H5SM__get_refcount_bt2_cb, &message) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index"); if (!msg_exists) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index"); } /* end else */ /* Set the refcount for the message */ @@ -2231,7 +2232,8 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, /* Check if the message is dirty & flush it to the object header if so */ if (mesg->dirty) if (H5O_msg_flush(udata->file, oh, mesg) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, H5_ITER_ERROR, "unable to encode object header message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, H5_ITER_ERROR, + "unable to encode object header message"); /* Get the message's encoded size */ udata->buf_size = mesg->raw_size; @@ -2239,7 +2241,7 @@ H5SM__read_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, /* Allocate buffer to return the message in */ if (NULL == (udata->encoding_buf = H5MM_malloc(udata->buf_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, H5_ITER_ERROR, "memory allocation failed"); /* Copy the encoded message into the buffer to return */ H5MM_memcpy(udata->encoding_buf, mesg->raw, udata->buf_size); @@ -2273,7 +2275,7 @@ H5SM__read_mesg_fh_cb(const void *obj, size_t obj_len, void *_udata) /* Allocate a buffer to hold the message */ if (NULL == (udata->encoding_buf = H5MM_malloc(obj_len))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Copy the message from the heap */ H5MM_memcpy(udata->encoding_buf, obj, obj_len); @@ -2327,18 +2329,18 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh /* Reset object location for operation */ if (H5O_loc_reset(&oloc) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTRESET, FAIL, "unable to initialize location") + HGOTO_ERROR(H5E_SOHM, H5E_CANTRESET, FAIL, "unable to initialize location"); if (NULL == open_oh || mesg->u.mesg_loc.oh_addr != H5O_OH_GET_ADDR(open_oh)) { /* Open the object in the file */ oloc.file = f; oloc.addr = mesg->u.mesg_loc.oh_addr; if (H5O_open(&oloc) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header"); /* Load the object header from the cache */ if (NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header"); } /* end if */ else oh = open_oh; @@ -2347,14 +2349,14 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, H5O_t *open_oh op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5SM__read_iter_op; if ((ret_value = H5O__msg_iterate_real(f, oh, type, &op, &udata)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADITER, FAIL, "unable to iterate over object header messages") + HGOTO_ERROR(H5E_SOHM, H5E_BADITER, FAIL, "unable to iterate over object header messages"); } /* end if */ else { 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.") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "can't read message from fractal heap."); } /* end else */ assert(udata.encoding_buf); assert(udata.buf_size); @@ -2471,10 +2473,10 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi /* Check arguments. Version must be 0, the only version implemented so far */ if (table_vers > HDF5_SHAREDHEADER_VERSION) - HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "unknown shared message table version") + HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, "unknown shared message table version"); if (num_indexes == 0 || num_indexes > H5O_SHMESG_MAX_NINDEXES) HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, - "number of indexes must be between 1 and H5O_SHMESG_MAX_NINDEXES") + "number of indexes must be between 1 and H5O_SHMESG_MAX_NINDEXES"); /* Set up user data for callback */ cache_udata.f = f; @@ -2482,7 +2484,7 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, table_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); fprintf(stream, "%*sShared Message Master Table...\n", indent, ""); for (x = 0; x < num_indexes; ++x) { @@ -2552,7 +2554,7 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, table_addr, &tbl_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Determine which index the list is part of */ index_num = table->num_indexes; @@ -2564,7 +2566,7 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt } /* end for */ if (x == table->num_indexes) HGOTO_ERROR(H5E_SOHM, H5E_BADVALUE, FAIL, - "list address doesn't match address for any indices in table") + "list address doesn't match address for any indices in table"); /* Set up user data for metadata cache callback */ lst_cache_udata.f = f; @@ -2573,12 +2575,12 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt /* Get the list from the cache */ if (NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, list_addr, &lst_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index"); /* Open the heap, if one exists */ if (H5_addr_defined(table->indexes[index_num].heap_addr)) if (NULL == (fh = H5HF_open(f, table->indexes[index_num].heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open SOHM heap"); fprintf(stream, "%*sShared Message List Index...\n", indent, ""); for (x = 0; x < table->indexes[index_num].num_messages; ++x) { @@ -2655,7 +2657,7 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Get SOHM header size */ *hdr_size = table->table_size; @@ -2667,14 +2669,14 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) if (H5_addr_defined(table->indexes[u].index_addr)) { /* Open the index v2 B-tree */ if (NULL == (bt2 = H5B2_open(f, table->indexes[u].index_addr, f))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index"); if (H5B2_size(bt2, &(ih_info->index_size)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info"); /* Close the v2 B-tree */ if (H5B2_close(bt2) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for SOHM index"); bt2 = NULL; } /* end if */ } /* end if */ @@ -2687,15 +2689,15 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) if (H5_addr_defined(table->indexes[u].heap_addr)) { /* Open the fractal heap for this index */ if (NULL == (fheap = H5HF_open(f, table->indexes[u].heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap"); /* Get heap storage size */ if (H5HF_size(fheap, &(ih_info->heap_size)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info") + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info"); /* Close the fractal heap */ if (H5HF_close(fheap) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap"); fheap = NULL; } /* end if */ } /* end for */ diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index ede7f69..d021a48 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -93,7 +93,7 @@ H5SM__bt2_crt_context(void *_f) /* Allocate callback context */ if (NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context") + HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context"); /* Determine the size of addresses & lengths in the file */ ctx->sizeof_addr = H5F_SIZEOF_ADDR(f); diff --git a/src/H5SMcache.c b/src/H5SMcache.c index 77bc03b..f12f5be 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -214,7 +214,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l /* Allocate space for the master table in memory */ if (NULL == (table = H5FL_CALLOC(H5SM_master_table_t))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed"); /* Read number of indexes and version from file superblock */ table->num_indexes = H5F_SOHM_NINDEXES(f); @@ -228,19 +228,19 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l /* Check magic number */ if (memcmp(image, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM table signature"); image += H5_SIZEOF_MAGIC; /* Allocate space for the index headers in memory*/ if (NULL == (table->indexes = (H5SM_index_header_t *)H5FL_ARR_MALLOC(H5SM_index_header_t, (size_t)table->num_indexes))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed for SOHM indexes") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed for SOHM indexes"); /* Read in the index headers */ for (u = 0; u < table->num_indexes; ++u) { /* Verify correct version of index list */ if (H5SM_LIST_VERSION != *image++) - HGOTO_ERROR(H5E_SOHM, H5E_VERSION, NULL, "bad shared message list version number") + HGOTO_ERROR(H5E_SOHM, H5E_VERSION, NULL, "bad shared message list version number"); /* Type of the index (list or B-tree) */ table->indexes[u].index_type = (H5SM_index_type_t)*image++; @@ -424,7 +424,7 @@ H5SM__cache_table_free_icr(void *_thing) /* Destroy Shared Object Header Message table */ if (H5SM__table_free(table) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message table"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -536,24 +536,24 @@ H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED le /* 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") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed"); 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))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list"); list->header = udata->header; /* Check magic number */ if (memcmp(image, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "bad SOHM list signature"); image += H5_SIZEOF_MAGIC; /* Read messages into the list array */ ctx.sizeof_addr = H5F_SIZEOF_ADDR(udata->f); for (u = 0; u < udata->header->num_messages; u++) { if (H5SM__message_decode(image, &(list->messages[u]), &ctx) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "can't decode shared message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, NULL, "can't decode shared message"); image += H5SM_SOHM_ENTRY_SIZE(udata->f); } /* end for */ @@ -653,7 +653,7 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_U for (u = 0; ((u < list->header->list_max) && (mesgs_serialized < list->header->num_messages)); u++) { if (list->messages[u].location != H5SM_NO_LOC) { if (H5SM__message_encode(image, &(list->messages[u]), &ctx) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to serialize shared message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to serialize shared message"); image += H5SM_SOHM_ENTRY_SIZE(f); ++mesgs_serialized; @@ -704,7 +704,7 @@ H5SM__cache_list_free_icr(void *_thing) /* Destroy Shared Object Header Message list */ if (H5SM__list_free(list) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c index 26c8341..34fe8fd 100644 --- a/src/H5SMmessage.c +++ b/src/H5SMmessage.c @@ -137,7 +137,7 @@ H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg /*in,out*/, unsigned sequence, if (mesg->dirty) if (H5O_msg_flush(udata->key->file, oh, mesg) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, H5_ITER_ERROR, - "unable to encode object header message") + "unable to encode object header message"); assert(udata->key->encoding_size <= mesg->raw_size); udata->ret = memcmp(udata->key->encoding, mesg->raw, udata->key->encoding_size); @@ -218,7 +218,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result) if (mesg->location == H5SM_IN_HEAP) { /* Call heap op routine with comparison callback */ if (H5HF_op(key->fheap, &(mesg->u.heap_loc.fheap_id), H5SM__compare_cb, &udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records") + HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records"); } /* end if */ else { H5O_loc_t oloc; /* Object owning the message */ @@ -230,7 +230,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result) /* Reset the object location */ if (H5O_loc_reset(&oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize target location"); /* Set up object location */ oloc.file = key->file; @@ -243,7 +243,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result) op.op_type = H5O_MESG_OP_LIB; op.u.lib_op = H5SM__compare_iter_op; if (H5O_msg_iterate(&oloc, mesg->msg_type_id, &op, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links"); } /* end else */ *result = udata.ret; diff --git a/src/H5SMtest.c b/src/H5SMtest.c index 6cf97cf..f306b89 100644 --- a/src/H5SMtest.c +++ b/src/H5SMtest.c @@ -84,11 +84,11 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count) /* Look up the master SOHM table */ if (NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table"); /* Find the correct index for this message type */ if ((index_num = H5SM__get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index"); header = &(table->indexes[index_num]); /* Set the message count for the type */ diff --git a/src/H5Sall.c b/src/H5Sall.c index 977a906..62f55de 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -178,7 +178,7 @@ H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) /* Calculate the coordinates for the current iterator offset */ if (H5VM_array_calc(iter->u.all.elmt_offset, iter->rank, iter->dims, coords) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve coordinates") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve coordinates"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -642,27 +642,27 @@ H5S__all_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hboo /* Allocate space if not provided */ if (!*space) { if (NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace"); } /* end if */ else tmp_space = *space; /* Decode version */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *p, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version"); UINT32DECODE(*p, version); if (version < H5S_ALL_VERSION_1 || version > H5S_ALL_VERSION_LATEST) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for all selection"); /* Skip over the remainder of the header */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *p, 8, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding header") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding header"); *p += 8; /* Change to "all" selection */ if (H5S_select_all(tmp_space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); /* Return space to the caller if allocated */ if (!*space) @@ -1082,7 +1082,7 @@ H5S__all_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_space /* Select the entire new space */ if (H5S_select_all(new_space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to set all selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to set all selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1119,7 +1119,7 @@ H5S_select_all(H5S_t *space, hbool_t rel_prev) /* Remove current selection first */ if (rel_prev) if (H5S_SELECT_RELEASE(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection"); /* Set number of elements in selection */ space->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(space); @@ -1159,11 +1159,11 @@ H5Sselect_all(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Call internal routine to do the work */ if (H5S_select_all(space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Sdeprec.c b/src/H5Sdeprec.c index 006f500..78f4281 100644 --- a/src/H5Sdeprec.c +++ b/src/H5Sdeprec.c @@ -90,15 +90,15 @@ H5Sencode1(hid_t obj_id, void *buf, size_t *nalloc) /* Check argument and retrieve object */ if (NULL == (dspace = (H5S_t *)H5I_object_verify(obj_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info"); /* Use (earliest, latest) i.e. not latest format */ if (H5S_encode(dspace, (unsigned char **)&buf, nalloc) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode dataspace"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 11c764c..9b69926 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -49,7 +49,7 @@ /* Check if the span should be recovered */ \ if (recover) { \ if (H5S__hyper_free_span(curr_span) < 0) \ - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, ERR, "unable to free span") \ + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, ERR, "unable to free span"); \ (recover) = FALSE; \ } \ \ @@ -65,7 +65,8 @@ * to the projection first before adding skip */ \ if ((UDATA)->nelem > 0) \ if (H5S__hyper_proj_int_build_proj(UDATA) < 0) \ - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, ERR, "can't add elements to projected selection") \ + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, ERR, \ + "can't add elements to projected selection"); \ (UDATA)->skip += (ADD); \ } while (0) /* end H5S_HYPER_PROJ_INT_ADD_SKIP() */ @@ -718,7 +719,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter) /* Copy the span tree */ if (NULL == (iter->u.hyp.spans = H5S__hyper_copy_span(space->select.sel_info.hslab->span_lst, space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy span tree"); } /* end if */ else { /* Share the source dataspace's span tree by incrementing the reference count on it */ @@ -1687,7 +1688,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max if (io_elmts_left == 0 || curr_seq >= maxseq) { /* Sanity checks */ if (!curr_span) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "curr_span pointer was NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "curr_span pointer was NULL"); /* Update absolute position */ abs_arr[fast_dim] = curr_span->low + span_elmts; @@ -2746,7 +2747,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter) /* Free the copy of the hyperslab selection span tree */ if (iter->u.hyp.spans != NULL) if (H5S__hyper_free_span_info(iter->u.hyp.spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2782,7 +2783,7 @@ H5S__hyper_new_span(hsize_t low, hsize_t high, H5S_hyper_span_info_t *down, H5S_ /* Allocate a new span node */ if (NULL == (ret_value = H5FL_MALLOC(H5S_hyper_span_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Copy the span's basic information */ ret_value->low = low; @@ -2830,7 +2831,7 @@ H5S__hyper_new_span_info(unsigned rank) /* Allocate a new span info node */ if (NULL == (ret_value = (H5S_hyper_span_info_t *)H5FL_ARR_CALLOC(hbounds_t, rank * 2))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span info"); /* Set low & high bound pointers into the 'bounds' array */ ret_value->low_bounds = ret_value->bounds; @@ -2885,7 +2886,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne else { /* Allocate a new span_info node */ if (NULL == (ret_value = H5S__hyper_new_span_info(rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span info"); /* Set the non-zero span_info information */ H5MM_memcpy(ret_value->low_bounds, spans->low_bounds, rank * sizeof(hsize_t)); @@ -2904,7 +2905,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne while (span != NULL) { /* Allocate a new node */ if (NULL == (new_span = H5S__hyper_new_span(span->low, span->high, NULL, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Append to list of spans */ if (NULL == prev_span) @@ -2915,7 +2916,7 @@ H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank, unsigne /* Recurse to copy the 'down' spans, if there are any */ if (span->down != NULL) { if (NULL == (new_down = H5S__hyper_copy_span_helper(span->down, rank - 1, op_info_i, op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy hyperslab spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy hyperslab spans"); new_span->down = new_down; } /* end if */ @@ -2972,7 +2973,7 @@ H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank) /* Always use op_info[0] since we own this op_info, so there can be no * simultaneous operations */ if (NULL == (ret_value = H5S__hyper_copy_span_helper(spans, rank, 0, op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3100,7 +3101,7 @@ H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info) /* Sanity check */ if (!span_info) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "span_info pointer was NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "span_info pointer was NULL"); /* Decrement the span tree's reference count */ span_info->count--; @@ -3119,7 +3120,7 @@ H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info) /* Free the current span */ if (H5S__hyper_free_span(span) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span"); /* Advance to next span */ span = next_span; @@ -3165,7 +3166,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span) /* Decrement the reference count of the 'down spans', freeing them if appropriate */ if (span->down != NULL) if (H5S__hyper_free_span_info(span->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); /* Free this span */ span = H5FL_FREE(H5S_hyper_span_t, span); @@ -3214,7 +3215,7 @@ H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection) /* Allocate space for the hyperslab selection information */ if (NULL == (dst->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info"); /* Set temporary pointers */ dst_hslab = dst->select.sel_info.hslab; @@ -3485,12 +3486,12 @@ H5Sget_select_hyper_nblocks(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection"); if (space->select.sel_info.hslab->unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "cannot get number of blocks for unlimited selection") + "cannot get number of blocks for unlimited selection"); ret_value = (hssize_t)H5S__get_select_hyper_nblocks(space, TRUE); @@ -3589,7 +3590,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */ /* Get bounding box for the selection */ if (H5S__hyper_bounds(space, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds"); /* Determine whether the number of blocks or the high bounds in the selection exceed (2^32 - 1) */ if (block_count > H5S_UINT32_MAX) @@ -3604,7 +3605,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver /* Get the file's low_bound and high_bound */ if (H5CX_get_libver_bounds(&low_bound, &high_bound) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get low/high bounds from API context") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get low/high bounds from API context"); /* Determine regular hyperslab */ is_regular = H5S__hyper_is_regular(space); @@ -3624,13 +3625,13 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver /* Fail for irregular hyperslab if exceeds 32 bits */ if (count_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "The number of blocks in hyperslab selection exceeds 2^32") + "The number of blocks in hyperslab selection exceeds 2^32"); else if (bound_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "The end of bounding box in hyperslab selection exceeds 2^32") + "The end of bounding box in hyperslab selection exceeds 2^32"); else HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "Dataspace hyperslab selection version out of bounds") + "Dataspace hyperslab selection version out of bounds"); } /* end if */ /* Set the message version */ @@ -3693,7 +3694,7 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown hyperslab selection version") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown hyperslab selection version"); break; } @@ -3738,7 +3739,7 @@ H5S__hyper_serial_size(H5S_t *space) /* Determine the version and the encoded size */ if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version & enc_size") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version & enc_size"); if (version == H5S_HYPER_VERSION_3) { /* Version 3: regular */ @@ -3975,7 +3976,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) /* Determine the version and the encoded size */ if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version & enc_size") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine hyper version & enc_size"); is_regular = H5S__hyper_is_regular(space); if (is_regular && (version == H5S_HYPER_VERSION_2 || version == H5S_HYPER_VERSION_3)) @@ -4061,7 +4062,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) break; default: HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "unknown offset info size for hyperslab") + "unknown offset info size for hyperslab"); break; } /* end switch */ } /* end if */ @@ -4164,7 +4165,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p) break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab"); break; } /* end switch */ @@ -4243,73 +4244,73 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb /* Allocate space if not provided */ if (!*space) { if (NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace"); } /* end if */ else tmp_space = *space; /* Decode version */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version"); UINT32DECODE(pp, version); if (version < H5S_HYPER_VERSION_1 || version > H5S_HYPER_VERSION_LATEST) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for hyperslab selection"); if (version >= (uint32_t)H5S_HYPER_VERSION_2) { /* Decode flags */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 1, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection flags") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection flags"); flags = *(pp)++; if (version >= (uint32_t)H5S_HYPER_VERSION_3) { /* decode size of offset info */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 1, p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection encoding size") + "buffer overflow while decoding selection encoding size"); enc_size = *(pp)++; } else { /* Skip over the remainder of the header */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 4, p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection header") + "buffer overflow while decoding selection header"); pp += 4; enc_size = H5S_SELECT_INFO_ENC_SIZE_8; } /* end else */ /* Check for unknown flags */ if (flags & ~H5S_SELECT_FLAG_BITS) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown flag for selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown flag for selection"); } else { /* Skip over the remainder of the header */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 8, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection header") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection header"); pp += 8; enc_size = H5S_SELECT_INFO_ENC_SIZE_4; } /* end else */ /* Check encoded */ if (enc_size & ~H5S_SELECT_INFO_ENC_SIZE_BITS) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown size of point/offset info for selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown size of point/offset info for selection"); /* Decode the rank of the point selection */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection rank") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection rank"); UINT32DECODE(pp, rank); if (!*space) { /* Patch the rank of the allocated dataspace */ 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions"); } /* end if */ else /* Verify the rank of the provided dataspace */ if (rank != tmp_space->extent.rank) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "rank of serialized selection does not match dataspace") + "rank of serialized selection does not match dataspace"); if (flags & H5S_HYPER_REGULAR) { hsize_t stride[H5S_MAX_RANK]; /* Hyperslab stride information */ @@ -4325,7 +4326,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb for (u = 0; u < tmp_space->extent.rank; u++) { if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 4 * sizeof(uint16_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection ranks") + "buffer overflow while decoding selection ranks"); UINT16DECODE(pp, start[u]); UINT16DECODE(pp, stride[u]); @@ -4344,7 +4345,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb for (u = 0; u < tmp_space->extent.rank; u++) { if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 4 * sizeof(uint32_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection ranks") + "buffer overflow while decoding selection ranks"); UINT32DECODE(pp, start[u]); UINT32DECODE(pp, stride[u]); @@ -4363,7 +4364,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb for (u = 0; u < tmp_space->extent.rank; u++) { if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 4 * sizeof(uint64_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection ranks") + "buffer overflow while decoding selection ranks"); UINT64DECODE(pp, start[u]); UINT64DECODE(pp, stride[u]); @@ -4379,13 +4380,13 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab"); break; } /* end switch */ /* Select the hyperslab to the current selection */ if ((ret_value = H5S_select_hyperslab(tmp_space, H5S_SELECT_SET, start, stride, count, block)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't change selection"); } /* end if */ else { const hsize_t *stride; /* Hyperslab stride information */ @@ -4402,26 +4403,26 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb case H5S_SELECT_INFO_ENC_SIZE_2: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint16_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of selection blocks") + "buffer overflow while decoding number of selection blocks"); UINT16DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_4: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of selection blocks") + "buffer overflow while decoding number of selection blocks"); UINT32DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_8: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint64_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of selection blocks") + "buffer overflow while decoding number of selection blocks"); UINT64DECODE(pp, num_elem); break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab"); break; } /* end switch */ @@ -4435,7 +4436,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb case H5S_SELECT_INFO_ENC_SIZE_2: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, rank * 2 * sizeof(uint16_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection coordinates") + "buffer overflow while decoding selection coordinates"); for (tstart = start, v = 0; v < rank; v++, tstart++) UINT16DECODE(pp, *tstart); @@ -4446,7 +4447,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb case H5S_SELECT_INFO_ENC_SIZE_4: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, rank * 2 * sizeof(uint32_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection coordinates") + "buffer overflow while decoding selection coordinates"); for (tstart = start, v = 0; v < rank; v++, tstart++) UINT32DECODE(pp, *tstart); @@ -4457,7 +4458,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb case H5S_SELECT_INFO_ENC_SIZE_8: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, rank * 2 * sizeof(uint64_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding selection coordinates") + "buffer overflow while decoding selection coordinates"); for (tstart = start, v = 0; v < rank; v++, tstart++) UINT64DECODE(pp, *tstart); @@ -4467,7 +4468,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb default: HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "unknown offset info size for hyperslab") + "unknown offset info size for hyperslab"); break; } /* end switch */ @@ -4478,7 +4479,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb /* Select or add the hyperslab to the current selection */ if ((ret_value = H5S_select_hyperslab(tmp_space, (u == 0 ? H5S_SELECT_SET : H5S_SELECT_OR), start, stride, count, block)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't change selection"); } /* end for */ } /* end else */ @@ -4560,7 +4561,7 @@ H5S__hyper_span_blocklist(const H5S_hyper_span_info_t *spans, hsize_t start[], h /* Recurse down to the next dimension */ if (H5S__hyper_span_blocklist(curr->down, start, end, (rank + 1), startblock, numblocks, buf) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans"); } /* end if */ else { /* Skip this block if we haven't skipped all the startblocks yet */ @@ -4824,13 +4825,13 @@ H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numbloc /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer"); if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection"); if (space->select.sel_info.hslab->unlim_dim >= 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot get blocklist for unlimited selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "cannot get blocklist for unlimited selection"); /* Go get the correct number of blocks */ if (numblocks > 0) @@ -4902,7 +4903,7 @@ H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) /* Check for offset moving selection negative */ if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds"); /* Set the low & high bounds in this dimension */ start[u] = (hsize_t)((hssize_t)low_bounds[u] + space->select.offset[u]); @@ -4979,7 +4980,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset) /* Check for offset moving selection out of the dataspace */ if (hyp_offset < 0 || (hsize_t)hyp_offset >= dim_size[i]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds"); /* Add the hyperslab's offset in this dimension to the total linear offset */ *offset += (hsize_t)(hyp_offset * (hssize_t)accum); @@ -5013,7 +5014,7 @@ H5S__hyper_offset(const H5S_t *space, hsize_t *offset) /* Check for offset moving selection out of the dataspace */ if (hyp_offset < 0 || (hsize_t)hyp_offset >= dim_size[i]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds"); /* Add the hyperslab's offset in this dimension to the total linear offset */ *offset += (hsize_t)(hyp_offset * (hssize_t)dim_accum[i]); @@ -5094,7 +5095,7 @@ H5S__hyper_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim) if (space->select.sel_info.hslab->unlim_dim >= 0) *num_elem_non_unlim = space->select.sel_info.hslab->num_elem_non_unlim; else - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "selection has no unlimited dimension") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "selection has no unlimited dimension"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5707,11 +5708,11 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2) if (NULL == space1->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(space1) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, - "can't construct span tree for hyperslab selection") + "can't construct span tree for hyperslab selection"); if (NULL == space2->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(space2) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, - "can't construct span tree for hyperslab selection") + "can't construct span tree for hyperslab selection"); /* If rank of space A is different (guaranteed greater) than * rank of space B, walk down the span tree, verifying @@ -5791,7 +5792,7 @@ H5S__hyper_release(H5S_t *space) if (space->select.sel_info.hslab) { if (space->select.sel_info.hslab->span_lst != NULL) if (H5S__hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "unable to free span info"); /* Release space for the hyperslab selection information */ space->select.sel_info.hslab = H5FL_FREE(H5S_hyper_sel_t, space->select.sel_info.hslab); @@ -5835,7 +5836,7 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords) if (rank > 1) { /* Allocate a span info node for coordinates below this one */ if (NULL == (down = H5S__hyper_new_span_info(rank - 1))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Set the low & high bounds for this span info node */ H5MM_memcpy(down->low_bounds, &coords[1], (rank - 1) * sizeof(hsize_t)); @@ -5843,7 +5844,7 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords) /* Build span tree for coordinates below this one */ if (NULL == (down->head = H5S__hyper_coord_to_span(rank - 1, &coords[1]))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Update the tail pointer of the down dimension, and it's a single span element */ down->tail = down->head; @@ -5851,7 +5852,7 @@ H5S__hyper_coord_to_span(unsigned rank, const hsize_t *coords) /* Build span for this coordinate */ if (NULL == (new_span = H5S__hyper_new_span(coords[0], coords[0], down, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Set return value */ ret_value = new_span; @@ -5916,7 +5917,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra /* Drop down a dimension */ 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") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree"); /* Check & update high bounds for lower dimensions */ if (*first_dim_modified >= 0) { @@ -6033,14 +6034,14 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra /* Release last span created */ if (H5S__hyper_free_span(stop_span) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span"); } /* Span is disjoint, but has the same "down tree" selection */ /* (If it has a "down tree") */ else if (stop_span->down) { /* Release "down tree" information */ if (H5S__hyper_free_span_info(stop_span->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); /* Point at earlier span's "down tree" */ stop_span->down = tmp_span->down; @@ -6073,7 +6074,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra /* Make span tree for current coordinate(s) */ if (NULL == (new_span = H5S__hyper_coord_to_span(rank, coords))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate hyperslab spans for coordinate") + "can't allocate hyperslab spans for coordinate"); /* Add new span to span tree list */ tail_span->next = new_span; @@ -6152,7 +6153,7 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords) if (NULL == space->select.sel_info.hslab) { /* Allocate a span info node */ if (NULL == (head = H5S__hyper_new_span_info(rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span info"); /* Set the low & high bounds for this span info node */ H5MM_memcpy(head->low_bounds, coords, rank * sizeof(hsize_t)); @@ -6163,14 +6164,14 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords) /* Build span tree for this coordinate */ if (NULL == (head->head = H5S__hyper_coord_to_span(rank, coords))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab spans for coordinate") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab spans for coordinate"); /* Update the tail pointer of this newly created span in dimension "rank" */ head->tail = head->head; /* Allocate selection info */ if (NULL == (space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab selection"); /* Set the selection to the new span tree */ space->select.sel_info.hslab->span_lst = head; @@ -6193,7 +6194,7 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, const hsize_t *coords) /* Add the element to the current set of spans */ if (H5S__hyper_add_span_element_helper(space->select.sel_info.hslab->span_lst, rank, coords, &first_dim_modified) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert coordinate into span tree"); /* Increment # of elements in selection */ space->select.num_elem++; @@ -6675,7 +6676,7 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space) curr_dim++; } /* end while */ if (NULL == down) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer"); /* Share the underlying hyperslab span information */ new_space->select.sel_info.hslab->span_lst = down; @@ -6723,7 +6724,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) if (NULL == (new_span_info = H5S__hyper_new_span_info(new_space->extent.rank))) { if (prev_span) (void)H5S__hyper_free_span(prev_span); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span info"); } /* Check for linking into higher span */ @@ -6735,7 +6736,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); } /* end if */ /* Set the span_info information */ @@ -6766,7 +6767,7 @@ H5S__hyper_project_simple_higher(const H5S_t *base_space, H5S_t *new_space) curr_dim++; } /* end while */ if (NULL == new_space->select.sel_info.hslab->span_lst) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "NULL span list pointer"); assert(prev_span); /* Share the underlying hyperslab span information */ @@ -6810,11 +6811,11 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of /* We are setting a new selection, remove any current selection in new dataspace */ if (H5S_SELECT_RELEASE(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection"); /* Allocate space for the hyperslab selection information */ if (NULL == (new_space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info"); /* Set unlim_dim */ new_space->select.sel_info.hslab->unlim_dim = -1; @@ -6936,7 +6937,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of /* Project the base space's selection down in less dimensions */ if (H5S__hyper_project_simple_lower(base_space, new_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, - "can't project hyperslab selection into less dimensions") + "can't project hyperslab selection into less dimensions"); } /* end if */ else { assert(new_space->extent.rank > base_space->extent.rank); @@ -6947,7 +6948,7 @@ H5S__hyper_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of /* Project the base space's selection down in more dimensions */ if (H5S__hyper_project_simple_higher(base_space, new_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, - "can't project hyperslab selection into less dimensions") + "can't project hyperslab selection into less dimensions"); } /* end else */ /* Copy the status of the dimension information */ @@ -7148,7 +7149,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset) /* Call the 'adjust' routine */ if (H5S__hyper_adjust_s(space, space->select.offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection"); /* Zero out the selection offset */ memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank); @@ -7195,7 +7196,7 @@ H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset) /* Call the 'adjust' routine */ if (H5S__hyper_adjust_s(space, old_offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection"); /* Copy the selection offset over */ H5MM_memcpy(space->select.offset, old_offset, sizeof(hssize_t) * space->extent.rank); @@ -7241,13 +7242,13 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ if (*span_tree == NULL) { /* Allocate new span node to append to list */ if (NULL == (new_span = H5S__hyper_new_span(low, high, down, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); /* Make new span the first node in span list */ /* Allocate a new span_info node */ if (NULL == (*span_tree = H5S__hyper_new_span_info(ndims))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); /* Set the span tree's basic information */ (*span_tree)->count = 1; @@ -7301,7 +7302,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_ /* Allocate new span node to append to list */ if (NULL == (new_span = H5S__hyper_new_span(low, high, new_down, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); /* Update the high bounds for current dimension */ (*span_tree)->high_bounds[0] = high; @@ -7418,7 +7419,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s *a_and_b = NULL; if (need_b_not_a) { if (NULL == (*b_not_a = H5S__hyper_copy_span(b_spans, ndims))) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree"); } /* end if */ else *b_not_a = NULL; @@ -7429,7 +7430,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s *b_not_a = NULL; if (need_a_not_b) { if (NULL == (*a_not_b = H5S__hyper_copy_span(a_spans, ndims))) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree"); } /* end if */ else *a_not_b = NULL; @@ -7442,7 +7443,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s *b_not_a = NULL; if (need_a_and_b) { if (NULL == (*a_and_b = H5S__hyper_copy_span(a_spans, ndims))) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, FAIL, "can't copy hyperslab span tree"); } /* end if */ else *a_and_b = NULL; @@ -7480,7 +7481,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_not_b) if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Advance span 'a', leave span 'b' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, FAIL); @@ -7498,7 +7499,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_not_b) if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->low - 1, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Check for overlaps between upper part of span 'a' and lower part of span 'b' */ @@ -7512,7 +7513,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_and_b) if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ @@ -7529,7 +7530,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s * after each append call in the following codes */ if (H5S__hyper_clip_spans(span_a->down, span_b->down, selector, ndims - 1, &down_a_not_b, &down_a_and_b, &down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, + "can't clip hyperslab information"); /* Check for additions to the a_not_b list */ if (down_a_not_b) { @@ -7539,11 +7541,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high, down_a_not_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_not_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the a_and_b list */ @@ -7554,11 +7556,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high, down_a_and_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_and_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the b_not_a list */ @@ -7569,11 +7571,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high, down_b_not_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } } /* end else */ @@ -7584,7 +7586,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Allocate new span node for upper part of span 'b' */ if (NULL == (tmp_span = H5S__hyper_new_span(span_a->high + 1, span_b->high, span_b->down, span_b->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span"); /* Advance span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, FAIL); @@ -7612,7 +7614,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_not_b) if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->low - 1, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Check for overlaps between middle part of span 'a' and span 'b' */ @@ -7626,7 +7628,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_and_b) if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ @@ -7639,7 +7641,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps in the 'down spans' of span 'a' & 'b' */ if (H5S__hyper_clip_spans(span_a->down, span_b->down, selector, ndims - 1, &down_a_not_b, &down_a_and_b, &down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, + "can't clip hyperslab information"); /* Check for additions to the a_not_b list */ if (down_a_not_b) { @@ -7649,11 +7652,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high, down_a_not_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_not_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the a_and_b list */ @@ -7664,11 +7667,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high, down_a_and_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_and_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the b_not_a list */ @@ -7679,11 +7682,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high, down_b_not_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } } /* end else */ @@ -7692,7 +7695,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Allocate new span node for upper part of span 'a' */ if (NULL == (tmp_span = H5S__hyper_new_span(span_b->high + 1, span_a->high, span_a->down, span_a->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span"); /* Make upper part of span 'a' the new span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL); @@ -7715,7 +7718,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->low - 1, span_b->down) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ else { /* Keep going, nothing to split off */ @@ -7733,7 +7736,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_and_b) if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ @@ -7746,7 +7749,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps in the 'down spans' of span 'a' & 'b' */ if (H5S__hyper_clip_spans(span_a->down, span_b->down, selector, ndims - 1, &down_a_not_b, &down_a_and_b, &down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, + "can't clip hyperslab information"); /* Check for additions to the a_not_b list */ if (down_a_not_b) { @@ -7756,11 +7760,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high, down_a_not_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_not_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the a_and_b list */ @@ -7771,11 +7775,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high, down_a_and_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_and_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the b_not_a list */ @@ -7786,11 +7790,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high, down_b_not_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } } /* end else */ @@ -7801,7 +7805,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Allocate new span node for upper part of spans 'a' */ if (NULL == (tmp_span = H5S__hyper_new_span(span_a->high + 1, span_b->high, span_b->down, span_b->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); /* And advance span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, FAIL); @@ -7832,7 +7836,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->low - 1, span_b->down) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ else { /* Keep going, nothing to split off */ @@ -7850,7 +7854,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_a_and_b) if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high, NULL) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ @@ -7863,7 +7867,8 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Check for overlaps in the 'down spans' of span 'a' & 'b' */ if (H5S__hyper_clip_spans(span_a->down, span_b->down, selector, ndims - 1, &down_a_not_b, &down_a_and_b, &down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, + "can't clip hyperslab information"); /* Check for additions to the a_not_b list */ if (down_a_not_b) { @@ -7873,11 +7878,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high, down_a_not_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_not_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the a_and_b list */ @@ -7888,11 +7893,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high, down_a_and_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_a_and_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } /* Check for additions to the b_not_a list */ @@ -7903,11 +7908,11 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high, down_b_not_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); /* Release the down span tree generated */ if (H5S__hyper_free_span_info(down_b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); } } /* end else */ @@ -7916,7 +7921,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Allocate new span node for upper part of span 'a' */ if (NULL == (tmp_span = H5S__hyper_new_span(span_b->high + 1, span_a->high, span_a->down, span_a->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab span"); /* Make upper part of span 'a' into new span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL); @@ -7936,7 +7941,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if (need_b_not_a) if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Advance span 'b', leave span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL); @@ -7958,7 +7963,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Copy span 'a' and add to a_not_b list */ if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Advance to the next 'a' span */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, FAIL); @@ -7968,7 +7973,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Free the span, if it's generated */ if (recover_a) if (H5S__hyper_free_span(span_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span"); } /* end else */ } /* end if */ /* Clean up 'b' spans which haven't been covered yet */ @@ -7986,7 +7991,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Copy span 'b' and add to b_not_a list */ if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); /* Advance to the next 'b' span */ H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL); @@ -7996,7 +8001,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Free the span, if it's generated */ if (recover_b) if (H5S__hyper_free_span(span_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span"); } /* end else */ } /* end if */ else @@ -8050,7 +8055,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf else { /* Copy one of the span trees to return */ if (NULL == (merged_spans = H5S__hyper_copy_span(a_spans, ndims))) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "can't copy hyperslab span tree"); } /* end else */ } /* end if */ else { @@ -8077,7 +8082,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if (span_a->high < span_b->low) { /* Merge/add span 'a' with/to the merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Advance span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, NULL); @@ -8094,13 +8099,13 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add copy of span 'a' with/to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } else { /* Merge/add lower part of span 'a' with/to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_b->low - 1, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Get merged span tree for overlapped section */ tmp_spans = H5S__hyper_merge_spans_helper(span_a->down, span_b->down, ndims - 1); @@ -8108,11 +8113,11 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_a->high, tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Release merged span tree for overlapped section */ if (H5S__hyper_free_span_info(tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info"); } /* Check if there is an upper part of span 'b' */ @@ -8122,7 +8127,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Allocate new span node to append to list */ if (NULL == (tmp_span = H5S__hyper_new_span(span_a->high + 1, span_b->high, span_b->down, span_b->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Advance span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, NULL); @@ -8148,13 +8153,13 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add copy of lower & middle parts of span 'a' to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_b->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } else { /* Merge/add lower part of span 'a' to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_b->low - 1, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Get merged span tree for overlapped section */ tmp_spans = H5S__hyper_merge_spans_helper(span_a->down, span_b->down, ndims - 1); @@ -8162,11 +8167,11 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_b->high, tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Release merged span tree for overlapped section */ if (H5S__hyper_free_span_info(tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info"); } /* Copy upper part of span 'a' as new span 'a' (remember to free) */ @@ -8174,7 +8179,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Allocate new span node to append to list */ if (NULL == (tmp_span = H5S__hyper_new_span(span_b->high + 1, span_a->high, span_a->down, span_a->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Set new span 'a' to tmp_span */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL); @@ -8193,7 +8198,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add copy of lower & middle parts of span 'b' to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } else { /* Check if there is a lower part of span 'b' */ @@ -8201,7 +8206,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add lower part of span 'b' to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_a->low - 1, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -8213,11 +8218,11 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_a->high, tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Release merged span tree for overlapped section */ if (H5S__hyper_free_span_info(tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info"); } /* Check if there is an upper part of span 'b' */ @@ -8227,7 +8232,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Allocate new span node to append to list */ if (NULL == (tmp_span = H5S__hyper_new_span(span_a->high + 1, span_b->high, span_b->down, span_b->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Advance span 'a' */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, NULL); @@ -8254,7 +8259,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add copy of span 'b' to merged spans if so */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_b->high, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } else { /* Check if there is a lower part of span 'b' */ @@ -8262,7 +8267,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add lower part of span 'b' to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_a->low - 1, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -8274,11 +8279,11 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_b->high, tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Release merged span tree for overlapped section */ if (H5S__hyper_free_span_info(tmp_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, NULL, "unable to free span info"); } /* Copy upper part of span 'a' as new span 'a' */ @@ -8286,7 +8291,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Allocate new span node to append to list */ if (NULL == (tmp_span = H5S__hyper_new_span(span_b->high + 1, span_a->high, span_a->down, span_a->next))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Set new span 'a' to tmp_span */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL); @@ -8302,7 +8307,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf else { /* Merge/add span 'b' with the merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_b->high, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Advance span 'b' */ H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL); @@ -8314,7 +8319,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while (span_a != NULL) { /* Merge/add all 'a' spans into the merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_a->low, span_a->high, span_a->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Advance to next 'a' span, until all processed */ H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, span_a->next, NULL); @@ -8326,7 +8331,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while (span_b != NULL) { /* Merge/add all 'b' spans into the merged spans */ if (H5S__hyper_append_span(&merged_spans, ndims, span_b->low, span_b->high, span_b->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span"); /* Advance to next 'b' span, until all processed */ H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL); @@ -8388,11 +8393,11 @@ H5S__hyper_merge_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans) /* Get the merged spans */ if (NULL == (merged_spans = H5S__hyper_merge_spans_helper(space->select.sel_info.hslab->span_lst, new_spans, space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTMERGE, FAIL, "can't merge hyperslab spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTMERGE, FAIL, "can't merge hyperslab spans"); /* Free the previous spans */ if (H5S__hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); /* Point to the new merged spans */ space->select.sel_info.hslab->span_lst = merged_spans; @@ -8551,11 +8556,11 @@ H5S__hyper_add_disjoint_spans(H5S_t *space, H5S_hyper_span_info_t *new_spans) /* Add the new spans to the existing selection in the dataspace */ if (H5S__hyper_merge_spans(space, new_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't merge hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't merge hyperslabs"); /* Free the memory space for new spans */ if (H5S__hyper_free_span_info(new_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -8613,7 +8618,7 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride /* Sanity check */ if (0 == count[i]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, NULL, "count == 0 is invalid") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, NULL, "count == 0 is invalid"); /* Start a new list in this dimension */ head = NULL; @@ -8628,7 +8633,7 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride /* Allocate a span node */ if (NULL == (span = H5FL_MALLOC(H5S_hyper_span_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Set the span's basic information */ span->low = curr_low; @@ -8655,7 +8660,7 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride /* Allocate a span info node */ if (NULL == (down = H5S__hyper_new_span_info(rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate hyperslab span"); /* Keep the pointer to the next dimension down's completed list */ down->head = head; @@ -9126,9 +9131,9 @@ H5S__hyper_generate_spans(H5S_t *space) * that calls this function checks for unlimited selections first * (especially the new hyperslab API) -NAF */ if (space->select.sel_info.hslab->diminfo.opt[u].count == H5S_UNLIMITED) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited count") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited count"); if (space->select.sel_info.hslab->diminfo.opt[u].block == H5S_UNLIMITED) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited block") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "can't generate spans with unlimited block"); tmp_start[u] = space->select.sel_info.hslab->diminfo.opt[u].start; tmp_stride[u] = space->select.sel_info.hslab->diminfo.opt[u].stride; @@ -9138,7 +9143,7 @@ H5S__hyper_generate_spans(H5S_t *space) /* Build the hyperslab information also */ if (H5S__generate_hyperslab(space, H5S_SELECT_SET, tmp_start, tmp_stride, tmp_count, tmp_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -9281,7 +9286,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s /* The result shares the same info from space1 */ if (*result == NULL) { if (NULL == ((*result) = H5S_copy(space1, TRUE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace"); space1->select.sel_info.hslab->span_lst->count--; (*result)->select.sel_info.hslab->span_lst = NULL; is_result_new = TRUE; @@ -9302,14 +9307,14 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s if (!can_own_span2) { b_not_a = H5S__hyper_copy_span(space2_span_lst, space1->extent.rank); if (H5S__hyper_add_disjoint_spans(*result, b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs"); /* The new_spans are now owned by 'space', so they should not be released */ b_not_a = NULL; } /* end if */ else { if (H5S__hyper_add_disjoint_spans(*result, space2_span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs"); *span2_owned = TRUE; } /* end else */ @@ -9320,7 +9325,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_AND: /* Convert *result to "none" selection */ if (H5S_select_none(*result) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); HGOTO_DONE(SUCCEED); case H5S_SELECT_NOTB: @@ -9339,7 +9344,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s /* Free the current selection */ if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); space1->select.sel_info.hslab->span_lst = NULL; } @@ -9365,7 +9370,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ } /* end if */ else { @@ -9399,13 +9404,13 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ /* Generate lists of spans which overlap and don't overlap */ if (H5S__hyper_clip_spans(space1->select.sel_info.hslab->span_lst, space2_span_lst, selector, space1->extent.rank, &a_not_b, &a_and_b, &b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't clip hyperslab information"); switch (op) { case H5S_SELECT_OR: if (is_result_new) @@ -9422,7 +9427,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s /* Free the current selection */ if (H5S__hyper_free_span_info(space1->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); space1->select.sel_info.hslab->span_lst = NULL; } @@ -9437,7 +9442,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ /* Check if there are any non-overlapped selections */ @@ -9487,7 +9492,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s if (b_not_a) { /* Merge the b_not_a spans into the result dataspace */ if (H5S__hyper_merge_spans(*result, b_not_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert hyperslabs"); /* Update the number of elements in current selection */ (*result)->select.num_elem += H5S__hyper_spans_nelem(b_not_a); @@ -9510,7 +9515,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s if (H5S_SELECT_OR != op) { /* Convert *result to "none" selection */ if (H5S_select_none(*result) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); } } @@ -9557,14 +9562,14 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c /* Generate span tree for new hyperslab information */ if (NULL == (new_spans = H5S__hyper_make_spans(space->extent.rank, start, stride, count, block))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information"); /* Generate list of blocks to add/remove based on selection operation */ if (op == H5S_SELECT_SET) { /* Free current selection */ if (NULL != space->select.sel_info.hslab->span_lst) if (H5S__hyper_free_span_info(space->select.sel_info.hslab->span_lst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); /* Set the hyperslab selection to the new span tree */ space->select.sel_info.hslab->span_lst = new_spans; @@ -9581,7 +9586,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c /* Generate new spans for space */ if (H5S__fill_in_new_space(space, op, new_spans, TRUE, &new_spans_owned, &updated_spans, &space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't generate the specified hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't generate the specified hyperslab"); /* Check if the spans were updated by H5S__fill_in_new_space */ if (updated_spans) { @@ -9601,7 +9606,7 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c /* Update space's dim info */ if (H5S__hyper_update_diminfo(space, op, new_hyper_diminfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info"); } /* end if */ /* Indicate that the new_spans are owned, there's no need to free */ @@ -9648,11 +9653,11 @@ H5S__set_regular_hyperslab(H5S_t *space, const hsize_t start[], const hsize_t *a /* If we are setting a new selection, remove current selection first */ if (H5S_SELECT_RELEASE(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection"); /* Allocate space for the hyperslab selection information */ if (NULL == (space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info"); /* Set the diminfo */ space->select.num_elem = 1; @@ -9776,12 +9781,12 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h /* Set selection to regular hyperslab */ if (H5S__set_regular_hyperslab(space, new_start, H5S_hyper_ones_g, H5S_hyper_ones_g, new_block, H5S_hyper_ones_g, H5S_hyper_ones_g, new_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection"); } /* end if */ else /* Selection & block don't overlap, set to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); } /* end if */ else { hsize_t new_start[H5S_MAX_RANK]; /* New start for hyperslab selection */ @@ -9914,24 +9919,24 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h /* Set selection to regular hyperslab */ if (H5S__set_regular_hyperslab(space, new_start, stride, new_count, new_block, stride, new_count, new_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection"); /* If there's a partial first or last span, have to 'AND' against selection */ if (partial_first_span || partial_last_span) { /* Generate span tree for regular selection */ if (H5S__hyper_generate_spans(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree"); /* 'AND' against block */ if (H5S__generate_hyperslab(space, H5S_SELECT_AND, start, H5S_hyper_ones_g, H5S_hyper_ones_g, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs"); } /* end if */ } /* end if */ else { /* Selection & block don't overlap, set to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); } /* end else */ } /* end else */ @@ -9982,7 +9987,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons for (u = 0; u < space->extent.rank; u++) { /* Check for overlapping hyperslab blocks in new selection. */ if (count[u] > 1 && stride[u] < block[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap"); /* Detect zero-sized hyperslabs in new selection */ if (count[u] == 0 || block[u] == 0) { @@ -9992,7 +9997,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */ /* Convert to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); HGOTO_DONE(SUCCEED); case H5S_SELECT_OR: /* Binary "or" operation for hyperslabs */ @@ -10005,7 +10010,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ } /* end if */ @@ -10013,11 +10018,11 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons if ((count[u] == H5S_UNLIMITED) || (block[u] == H5S_UNLIMITED)) { if (unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "cannot have more than one unlimited dimension in selection") + "cannot have more than one unlimited dimension in selection"); else { if (count[u] == block[u]) /* Both are H5S_UNLIMITED */ HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "count and block cannot both be unlimited") + "count and block cannot both be unlimited"); unlim_dim = (int)u; } /* end else */ } /* end if */ @@ -10065,9 +10070,9 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons /* Check for invalid operation */ if (unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "cannot modify unlimited selection with another unlimited selection") + "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") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported operation on unlimited selection"); assert(space->select.sel_info.hslab->diminfo_valid); /* Clip unlimited selection to include new selection */ @@ -10076,7 +10081,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons ((opt_count[space->select.sel_info.hslab->unlim_dim] - (hsize_t)1) * opt_stride[space->select.sel_info.hslab->unlim_dim]) + opt_block[space->select.sel_info.hslab->unlim_dim]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "failed to clip unlimited selection"); /* If an empty space was returned it must be "none" */ assert((space->select.num_elem > (hsize_t)0) || (space->select.type->type == H5S_SEL_NONE)); @@ -10105,7 +10110,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ break; @@ -10140,14 +10145,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons /* Convert to hyperslab selection */ if (H5S_select_hyperslab(space, H5S_SELECT_SET, tmp_start, tmp_stride, tmp_count, tmp_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection"); } /* end case */ break; case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */ /* Convert to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); HGOTO_DONE(SUCCEED); case H5S_SELECT_NOOP: @@ -10155,7 +10160,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ break; @@ -10172,14 +10177,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons case H5S_SEL_ERROR: case H5S_SEL_N: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ if (op == H5S_SELECT_SET) { /* Set selection to regular hyperslab */ if (H5S__set_regular_hyperslab(space, start, stride, count, block, opt_stride, opt_count, opt_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection"); } /* end if */ else if (op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA) { hbool_t single_block; /* Whether the selection is a single block */ @@ -10197,14 +10202,14 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons /* Check for invalid operation */ if (space->select.sel_info.hslab->unlim_dim >= 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "cannot modify unlimited selection with another unlimited selection") + "cannot modify unlimited selection with another unlimited selection"); if (!((op == H5S_SELECT_AND) || (op == H5S_SELECT_NOTB))) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, - "unsupported operation with unlimited selection") + "unsupported operation with unlimited selection"); /* Get bounds of existing selection */ if (H5S__hyper_bounds(space, bounds_start, bounds_end) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds"); /* Patch count and block to remove unlimited and include the * existing selection. @@ -10238,24 +10243,24 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) { if (H5S__hyper_regular_and_single_block(space, start, opt_block) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTOPERATE, FAIL, - "can't 'AND' single block against regular hyperslab") + "can't 'AND' single block against regular hyperslab"); } /* end if */ else { /* Check if there's no hyperslab span information currently */ if (NULL == space->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree"); /* Set selection type */ space->select.type = H5S_sel_hyper; /* Add in the new hyperslab information */ if (H5S__generate_hyperslab(space, op, start, opt_stride, opt_count, opt_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs"); } /* end else */ } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -10299,26 +10304,26 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], con /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_SCALAR == H5S_GET_EXTENT_TYPE(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space"); if (H5S_NULL == H5S_GET_EXTENT_TYPE(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_NULL space") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_NULL space"); if (start == NULL || count == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified"); if (!(op > H5S_SELECT_NOOP && op < H5S_SELECT_INVALID)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); if (stride != NULL) { unsigned u; /* Local index variable */ /* Check for 0-sized strides */ for (u = 0; u < space->extent.rank; u++) if (stride[u] == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid stride==0 value"); } /* end if */ if (H5S_select_hyperslab(space, op, start, stride, count, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection"); done: FUNC_LEAVE_API(ret_value) @@ -10383,7 +10388,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st for (u = 0; u < old_space->extent.rank; u++) { /* Check for overlapping hyperslab blocks in new selection. */ if (count[u] > 1 && stride[u] < block[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab blocks overlap"); /* Detect zero-sized hyperslabs in new selection */ if (count[u] == 0 || block[u] == 0) { @@ -10393,9 +10398,9 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st /* Convert to "none" selection */ /* Copy the first dataspace without sharing the list of spans */ if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace"); if (H5S_select_none((*new_space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); HGOTO_DONE(SUCCEED); case H5S_SELECT_OR: /* Binary "or" operation for hyperslabs */ @@ -10403,7 +10408,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st case H5S_SELECT_NOTB: /* Binary "A not B" operation for hyperslabs */ /* Copy the first dataspace with sharing the list of spans */ if (NULL == ((*new_space) = H5S_copy(old_space, FALSE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace"); HGOTO_DONE(SUCCEED); /* Selection stays same */ case H5S_SELECT_NOOP: @@ -10412,7 +10417,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ } /* end if */ } /* end for */ @@ -10450,7 +10455,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st H5S_hyper_dim_t new_hyper_diminfo[H5S_MAX_RANK]; if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); if (NULL != (*new_space)->select.sel_info.hslab->span_lst) { old_space->select.sel_info.hslab->span_lst->count--; (*new_space)->select.sel_info.hslab->span_lst = NULL; @@ -10463,12 +10468,13 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st /* Add the new space to the space */ if (NULL == (new_spans = H5S__hyper_make_spans(old_space->extent.rank, start, stride, count, block))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't create hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, + "can't create hyperslab information"); if (NULL != old_space->select.sel_info.hslab->span_lst) (*new_space)->select.sel_info.hslab->span_lst = H5S__hyper_copy_span( old_space->select.sel_info.hslab->span_lst, old_space->extent.rank); if (H5S__hyper_add_disjoint_spans(*new_space, new_spans) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs"); /* Build diminfo struct */ for (u = 0; u < (*new_space)->extent.rank; u++) { @@ -10480,30 +10486,30 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st /* Update space's dim info */ if (H5S__hyper_update_diminfo(*new_space, op, new_hyper_diminfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info"); break; case H5S_SELECT_AND: if (H5S_select_none((*new_space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); break; case H5S_SELECT_NOTB: if (NULL != old_space->select.sel_info.hslab->span_lst) { if (NULL == ((*new_space)->select.sel_info.hslab->span_lst = H5S__hyper_copy_span( old_space->select.sel_info.hslab->span_lst, old_space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace"); } /* end if */ else { if (H5S_select_none((*new_space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); } /* end else */ break; case H5S_SELECT_NOTA: if (H5S__set_regular_hyperslab(*new_space, start, stride, count, block, stride, count, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular selection"); break; case H5S_SELECT_NOOP: @@ -10512,7 +10518,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st case H5S_SELECT_PREPEND: case H5S_SELECT_INVALID: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); } /* end switch */ HGOTO_DONE(SUCCEED); @@ -10521,11 +10527,11 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st /* Copy the first dataspace with sharing the list of spans */ if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace"); /* Note: a little overhead in calling the function as some conditions are checked again */ if (H5S_select_hyperslab(*new_space, op, start, stride, count, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -10563,7 +10569,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu /* 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, &updated_spans, result) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't create the specified selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't create the specified selection"); /* Update diminfo if space2's diminfo was valid, otherwise just mark it as * invalid if the spans were updated */ @@ -10571,7 +10577,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't update hyperslab info"); } /* end if */ else (*result)->select.sel_info.hslab->diminfo_valid = H5S_DIMINFO_VALID_NO; @@ -10623,19 +10629,19 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], co /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); if (start == NULL || count == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "hyperslab not specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "hyperslab not specified"); if (!(op >= H5S_SELECT_SET && op <= H5S_SELECT_NOTA)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, H5I_INVALID_HID, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, H5I_INVALID_HID, "invalid selection operation"); /* Generate new space, with combination of selections */ if (H5S_combine_hyperslab(space, op, start, stride, count, block, &new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to set hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to set hyperslab selection"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (ret_value < 0 && new_space) @@ -10669,7 +10675,7 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) /* Check if space1 selections has span trees */ if (NULL == space1->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(space1) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, NULL, "dataspace does not have span tree"); if (NULL == space2->select.sel_info.hslab->span_lst) { hsize_t tmp_start[H5S_MAX_RANK]; @@ -10687,12 +10693,12 @@ H5S__combine_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) /* Combine hyperslab selection with regular selection directly */ if (H5S_combine_hyperslab(space1, op, tmp_start, tmp_stride, tmp_count, tmp_block, &new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to set hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "unable to set hyperslab selection"); } /* end if */ else { /* Combine new_space (a copy of space 1) & space2, with the result in new_space */ if (H5S__fill_in_select(space1, op, space2, &new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, NULL, "can't clip hyperslab information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, NULL, "can't clip hyperslab information"); } /* end else */ /* Set unlim_dim */ @@ -10743,15 +10749,15 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) /* Check args */ if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); if (!(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, H5I_INVALID_HID, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, H5I_INVALID_HID, "invalid selection operation"); /* Check that both dataspaces have the same rank */ if (space1->extent.rank != space2->extent.rank) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces not same rank") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces not same rank"); /* Note: currently, the offset of each dataspace is ignored */ #if 0 @@ -10759,22 +10765,22 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) /* Same note as in H5Smodify_select */ for(u=0; uextent.rank; u++) { if(space1->select.offset[u] != space2->select.offset[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces not same offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces not same offset"); } /* end for */ #endif /* Check that both dataspaces have hyperslab selections */ if (H5S_GET_SELECT_TYPE(space1) != H5S_SEL_HYPERSLABS || H5S_GET_SELECT_TYPE(space2) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces don't have hyperslab selections") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "dataspaces don't have hyperslab selections"); /* Go combine the dataspaces */ if (NULL == (new_space = H5S__combine_select(space1, op, space2))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to create hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to create hyperslab selection"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID"); done: if (ret_value < 0 && new_space) @@ -10807,7 +10813,7 @@ H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) /* Check that the space selections both have span trees */ if (NULL == space1->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(space1) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree"); /* Set unlim_dim */ space1->select.sel_info.hslab->unlim_dim = -1; @@ -10828,12 +10834,12 @@ H5S__modify_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2) /* Call H5S_select_hyperslab directly */ if (H5S_select_hyperslab(space1, op, tmp_start, tmp_stride, tmp_count, tmp_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set hyperslab selection"); } /* end if */ else /* Combine spans from space1 & spans from space2, with the result in space1 */ if (H5S__fill_in_select(space1, op, space2, &space1) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't perform operation on two selections") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't perform operation on two selections"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -10873,15 +10879,15 @@ H5Smodify_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) /* Check args */ if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (!(op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation"); /* Check that both dataspaces have the same rank */ if (space1->extent.rank != space2->extent.rank) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same rank"); /* Check that both dataspaces have the same offset */ /** Note that this is a tricky part of this function. It's @@ -10904,18 +10910,18 @@ H5Smodify_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) #if 0 for(u=0; uextent.rank; u++) { if(space1->select.offset[u] != space2->select.offset[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces not same offset"); } /* end for */ #endif /* Check that both dataspaces have hyperslab selections */ if (H5S_GET_SELECT_TYPE(space1) != H5S_SEL_HYPERSLABS || H5S_GET_SELECT_TYPE(space2) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspaces don't have hyperslab selections"); /* Go refine the first selection */ if (H5S__modify_select(space1, op, space2) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to modify hyperslab selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to modify hyperslab selection"); done: FUNC_LEAVE_API(ret_value) @@ -11007,9 +11013,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) &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], udata->ps_span_info[udata->depth]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(udata->ps_span_info[udata->depth]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); udata->ps_span_info[udata->depth] = NULL; } @@ -11020,7 +11026,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) } else HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "insufficient elements in destination selection") + "insufficient elements in destination selection"); } while ((udata->skip > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high)); /* Work downwards until skip is 0 */ @@ -11105,7 +11111,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 1, udata->ds_span[udata->depth]->down) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } else { /* If we're not sharing the destination space's @@ -11114,7 +11120,8 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) if (NULL == (copied_span_info = H5S__hyper_copy_span_helper( udata->ds_span[udata->depth]->down, udata->ds_rank - udata->depth, 1, udata->op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, + "can't copy destination spans"); if (H5S__hyper_append_span( &udata->ps_span_info[udata->depth], udata->ds_rank - udata->depth, udata->ds_low[udata->depth], @@ -11124,9 +11131,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 1, copied_span_info) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); copied_span_info = NULL; } udata->ds_low[udata->depth] += @@ -11142,7 +11149,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) udata->ds_rank - udata->depth, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, udata->ds_span[udata->depth]->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); } else { /* If we're not sharing the destination space's @@ -11151,13 +11158,13 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) if (NULL == (copied_span_info = H5S__hyper_copy_span_helper( udata->ds_span[udata->depth]->down, udata->ds_rank - udata->depth, 1, udata->op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans"); if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], udata->ds_rank - udata->depth, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); copied_span_info = NULL; } udata->nelem -= udata->ds_span[udata->depth]->down->op_info[0].u.nelmts * @@ -11173,7 +11180,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); udata->ds_low[udata->depth] += udata->nelem; udata->nelem = 0; break; @@ -11182,7 +11189,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Append span tree for entire span */ if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, NULL) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); udata->nelem -= udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1; } /* end else */ @@ -11198,9 +11205,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) udata->ds_rank - udata->depth + 1, udata->ds_low[udata->depth - 1], udata->ds_low[udata->depth - 1], udata->ps_span_info[udata->depth]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(udata->ps_span_info[udata->depth]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); udata->ps_span_info[udata->depth] = NULL; /* Ran out of spans, move up one dimension */ @@ -11213,7 +11220,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) * still elements to add, issue an error. */ if (udata->nelem > 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "insufficient elements in destination selection") + "insufficient elements in destination selection"); break; } /* end else */ } while ((udata->nelem > 0) || (udata->ds_low[udata->depth] > udata->ds_span[udata->depth]->high)); @@ -11246,7 +11253,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 1, udata->ds_span[udata->depth]->down) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); } else { /* If we're not sharing the destination space's @@ -11255,7 +11262,8 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) if (NULL == (copied_span_info = H5S__hyper_copy_span_helper( udata->ds_span[udata->depth]->down, udata->ds_rank - udata->depth, 1, udata->op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, + "can't copy destination spans"); if (H5S__hyper_append_span( &udata->ps_span_info[udata->depth], udata->ds_rank - udata->depth, udata->ds_low[udata->depth], @@ -11265,9 +11273,9 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 1, copied_span_info) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, - "can't allocate hyperslab span") + "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); copied_span_info = NULL; } udata->ds_low[udata->depth] += @@ -11283,7 +11291,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) udata->ds_rank - udata->depth, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, udata->ds_span[udata->depth]->down) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); } else { /* If we're not sharing the destination space's @@ -11292,13 +11300,13 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) if (NULL == (copied_span_info = H5S__hyper_copy_span_helper( udata->ds_span[udata->depth]->down, udata->ds_rank - udata->depth, 1, udata->op_gen))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination spans"); if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], udata->ds_rank - udata->depth, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(copied_span_info) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); copied_span_info = NULL; } udata->nelem -= udata->ds_span[udata->depth]->down->op_info[0].u.nelmts * @@ -11320,7 +11328,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); udata->ds_low[udata->depth] += udata->nelem; udata->nelem = 0; break; @@ -11329,7 +11337,7 @@ H5S__hyper_proj_int_build_proj(H5S_hyper_project_intersect_ud_t *udata) /* Append span tree for entire span */ if (H5S__hyper_append_span(&udata->ps_span_info[udata->depth], 1, udata->ds_low[udata->depth], udata->ds_span[udata->depth]->high, NULL) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); udata->nelem -= udata->ds_span[udata->depth]->high - udata->ds_low[udata->depth] + 1; /* Advance to next span */ @@ -11452,7 +11460,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper if (H5S__hyper_proj_int_iterate(ss_span->down, sis_span->down, high - low + 1, depth + 1, udata) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, - "can't iterate over source selections") + "can't iterate over source selections"); } /* end if */ else { assert(depth == udata->ss_rank - 1); @@ -11606,7 +11614,7 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper /* Add remaining elements */ if (udata->nelem > 0) if (H5S__hyper_proj_int_build_proj(udata) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't add elements to projected selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't add elements to projected selection"); /* Append remaining span trees */ for (u = udata->ds_rank - 1; u > 0; u--) @@ -11614,9 +11622,9 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper if (H5S__hyper_append_span(&udata->ps_span_info[u - 1], udata->ds_rank - u + 1, udata->ds_low[u - 1], udata->ds_low[u - 1], udata->ps_span_info[u]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span"); if (H5S__hyper_free_span_info(udata->ps_span_info[u]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to free span info"); udata->ps_span_info[u] = NULL; } } @@ -11680,7 +11688,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (NULL == src_space->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(src_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, - "can't construct span tree for source hyperslab selection") + "can't construct span tree for source hyperslab selection"); /* Simply point to existing span tree */ ss_span_info = src_space->select.sel_info.hslab->span_lst; @@ -11692,7 +11700,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (NULL == (ss_span_info_buf = H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(src_space), H5S_hyper_zeros_g, H5S_hyper_zeros_g, H5S_hyper_ones_g, src_space->extent.size))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't create span tree for ALL source space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't create span tree for ALL source space"); ss_span_info = ss_span_info_buf; } /* end else */ @@ -11702,7 +11710,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (NULL == dst_space->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(dst_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, - "can't construct span tree for dsetination hyperslab selection") + "can't construct span tree for dsetination hyperslab selection"); /* Simply point to existing span tree */ ds_span_info = dst_space->select.sel_info.hslab->span_lst; @@ -11714,7 +11722,8 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (NULL == (ds_span_info_buf = H5S__hyper_make_spans(H5S_GET_EXTENT_NDIMS(dst_space), H5S_hyper_zeros_g, H5S_hyper_zeros_g, H5S_hyper_ones_g, dst_space->extent.size))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't create span tree for ALL destination space") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, + "can't create span tree for ALL destination space"); ds_span_info = ds_span_info_buf; } /* end else */ @@ -11722,7 +11731,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (NULL == src_intersect_space->select.sel_info.hslab->span_lst) if (H5S__hyper_generate_spans(src_intersect_space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, - "can't construct span tree for source intersect hyperslab selection") + "can't construct span tree for source intersect hyperslab selection"); /* Initialize udata */ /* We will use op_info[0] for nelem and op_info[1] for copied spans */ @@ -11737,18 +11746,18 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i /* Iterate over selections and build projected span tree */ if (H5S__hyper_proj_int_iterate(ss_span_info, src_intersect_space->select.sel_info.hslab->span_lst, 1, 0, &udata) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "selection iteration failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "selection iteration failed"); /* Remove current selection from proj_space */ if (H5S_SELECT_RELEASE(proj_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection"); /* Check for elements in projected space */ if (udata.ps_span_info[0]) { /* Allocate space for the hyperslab selection information (note this sets * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */ if (NULL == (proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info"); /* Set selection type */ proj_space->select.type = H5S_sel_hyper; @@ -11771,7 +11780,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i else /* If we did not add anything to proj_space, select none instead */ if (H5S_select_none(proj_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection"); done: /* Free ss_span_info_buf */ @@ -11925,7 +11934,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) if ((diminfo->block == 0) || (diminfo->count == 0)) { /* Convert to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't convert selection"); /* Reset the convenience pointers */ hslab = NULL; @@ -11967,7 +11976,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* Generate span tree in selection */ if (!hslab->span_lst) if (H5S__hyper_generate_spans(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to generate span tree") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to generate span tree"); /* Indicate that the regular dimensions are no longer valid */ hslab->diminfo_valid = H5S_DIMINFO_VALID_NO; @@ -11975,7 +11984,7 @@ H5S_hyper_clip_unlim(H5S_t *space, hsize_t clip_size) /* "And" selection with calculated block to perform clip operation */ if (H5S__generate_hyperslab(space, H5S_SELECT_AND, start, H5S_hyper_ones_g, H5S_hyper_ones_g, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't generate hyperslabs"); } /* end if */ else /* Last block is complete, simply mark that diminfo.opt is valid */ @@ -12262,13 +12271,13 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index) /* Create output space, copy extent */ if (NULL == (space_out = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "unable to create output dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "unable to create output dataspace"); if (H5S__extent_copy_real(&space_out->extent, &space->extent, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent"); /* Select block as defined by start/stride/count/block computed above */ if (H5S_select_hyperslab(space_out, H5S_SELECT_SET, start, stride, count, block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't select hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, NULL, "can't select hyperslab"); /* Set return value */ ret_value = space_out; @@ -12377,9 +12386,9 @@ H5Sis_regular_hyperslab(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection"); ret_value = H5S__hyper_is_regular(space); @@ -12426,11 +12435,11 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[] /*out*/, hsize_t stride[ /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection"); if (TRUE != H5S__hyper_is_regular(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection"); /* Retrieve hyperslab parameters */ if (start) diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 675e9de..1797399 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -125,7 +125,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, /* Just treat the entire extent as a block of bytes */ if ((snelmts = (hssize_t)H5S_GET_EXTENT_NPOINTS(space)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection"); H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t); total_bytes = (hsize_t)elmt_size * nelmts; @@ -142,7 +142,7 @@ H5S__mpio_all_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, /* Create a LARGE derived datatype for this transfer */ if (H5_mpio_create_large_type(total_bytes, 0, MPI_BYTE, new_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large datatype from the all selection") + "couldn't create a large datatype from the all selection"); *count = 1; *is_derived_type = TRUE; } @@ -224,7 +224,7 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint * #else /* Allocate block sizes for MPI datatype call */ if (NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * num_points))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks"); for (u = 0; u < num_points; u++) blocks[u] = 1; @@ -259,18 +259,18 @@ H5S__mpio_create_point_datatype(size_t elmt_size, hsize_t num_points, MPI_Aint * /* Allocate array if MPI derived types needed */ if (NULL == (inner_types = (MPI_Datatype *)H5MM_malloc((sizeof(MPI_Datatype) * (size_t)total_types)))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks"); if (NULL == (inner_blocks = (int *)H5MM_malloc(sizeof(int) * (size_t)total_types))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks"); if (NULL == (inner_disps = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * (size_t)total_types))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks"); #if MPI_VERSION < 3 /* Allocate block sizes for MPI datatype call */ if (NULL == (blocks = (int *)H5MM_malloc(sizeof(int) * bigio_count))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of blocks"); for (u = 0; u < bigio_count; u++) blocks[u] = 1; @@ -373,17 +373,17 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ /* Get the total number of points selected */ if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); num_points = (hsize_t)snum_points; /* Allocate array for element displacements */ if (NULL == (disp = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * num_points))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements"); /* Allocate array for element permutation - returned to caller */ if (do_permute) if (NULL == (*permute = (hsize_t *)H5MM_malloc(sizeof(hsize_t) * num_points))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate permutation array") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate permutation array"); /* Iterate through list of elements */ curr = space->select.sel_info.pnt_lst->head; @@ -391,7 +391,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ /* Calculate the displacement of the current point */ hsize_t disp_tmp = H5VM_array_offset(space->extent.rank, space->extent.size, curr->pnt); if (disp_tmp > LONG_MAX) /* Maximum value of type long */ - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "disp overflow") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "disp overflow"); disp[u] = (MPI_Aint)disp_tmp; disp[u] *= (MPI_Aint)elmt_size; @@ -449,7 +449,7 @@ H5S__mpio_point_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_typ /* Create the MPI datatype for the set of element displacements */ if (H5S__mpio_create_point_datatype(elmt_size, num_points, disp, new_type) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create an MPI Datatype from point selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create an MPI Datatype from point selection"); /* Set values about MPI datatype created */ *count = 1; @@ -511,26 +511,26 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da /* Get the total number of points selected */ if ((snum_points = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); num_points = (hsize_t)snum_points; /* Allocate array to store point displacements */ if (NULL == (disp = (MPI_Aint *)H5MM_malloc(sizeof(MPI_Aint) * num_points))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements"); /* Allocate arrays to hold sequence offsets and lengths */ if (NULL == (off = H5MM_malloc(H5D_IO_VECTOR_SIZE * sizeof(*off)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence offsets array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence offsets array"); if (NULL == (len = H5MM_malloc(H5D_IO_VECTOR_SIZE * sizeof(*len)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence lengths array") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate sequence lengths array"); /* Allocate a selection iterator for iterating over the dataspace */ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator"); /* Initialize selection iterator */ if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); sel_iter_init = TRUE; /* Selection iteration info has been initialized */ /* Set the number of elements to iterate over */ @@ -546,7 +546,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da /* Get the sequences of bytes */ if (H5S_SELECT_ITER_GET_SEQ_LIST(sel_iter, (size_t)H5D_IO_VECTOR_SIZE, max_elem, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Loop, while sequences left to process */ for (curr_seq = 0; curr_seq < nseq; curr_seq++) { @@ -563,7 +563,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da while (curr_len > 0) { /* Set the displacement of the current point */ if (curr_off > LONG_MAX) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "curr_off overflow") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "curr_off overflow"); disp[u] = (MPI_Aint)curr_off; /* This is a memory displacement, so for each point selected, @@ -593,7 +593,7 @@ H5S__mpio_permute_type(H5S_t *space, size_t elmt_size, hsize_t **permute, MPI_Da /* Create the MPI datatype for the set of element displacements */ if (H5S__mpio_create_point_datatype(elmt_size, num_points, disp, new_type) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create an MPI Datatype from point selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create an MPI Datatype from point selection"); /* Set values about MPI datatype created */ *count = 1; @@ -673,11 +673,11 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, /* Allocate a selection iterator for iterating over the dataspace */ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "couldn't allocate dataspace selection iterator"); /* Initialize selection iterator */ if (H5S_select_iter_init(sel_iter, space, elmt_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); sel_iter_init = TRUE; /* Selection iteration info has been initialized */ /* Abbreviate args */ @@ -811,7 +811,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, /* Create the compound datatype for this operation (> 2GB) */ if (H5_mpio_create_large_type(elmt_size, 0, MPI_BYTE, &inner_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large inner datatype in hyper selection") + "couldn't create a large inner datatype in hyper selection"); /******************************************************* * Construct the type by walking the hyperslab dims @@ -867,7 +867,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, if (bigio_count < d[i].block) { if (H5_mpio_create_large_type(d[i].block, 0, inner_type, &block_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large block datatype in hyper selection") + "couldn't create a large block datatype in hyper selection"); } else if (MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)d[i].block, inner_type, &block_type))) @@ -889,7 +889,7 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, if (bigio_count < d[i].count) { if (H5_mpio_create_large_type(d[i].count, stride_in_bytes, block_type, &outer_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large outer datatype in hyper selection") + "couldn't create a large outer datatype in hyper selection"); } /* otherwise a regular create_hvector will do */ else if (MPI_SUCCESS != (mpi_code = MPI_Type_create_hvector((int)d[i].count, /* count */ @@ -910,11 +910,11 @@ H5S__mpio_reg_hyper_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, /* Calculate start and extent values of this dimension */ /* Check if value overflow to cast to type MPI_Aint */ if (d[i].start > LONG_MAX || offset[i] > LONG_MAX || elmt_size > LONG_MAX) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "result overflow") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "result overflow"); start_disp = (MPI_Aint)d[i].start * (MPI_Aint)offset[i] * (MPI_Aint)elmt_size; if (max_xtent[i] > LONG_MAX) - HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "max_xtent overflow") + HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "max_xtent overflow"); new_extent = (MPI_Aint)elmt_size * (MPI_Aint)max_xtent[i]; if (MPI_SUCCESS != (mpi_code = MPI_Type_get_extent(outer_type, &lb, &extent_len))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_get_extent failed", mpi_code) @@ -1017,7 +1017,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne } else if (H5_mpio_create_large_type(elmt_size, 0, MPI_BYTE, &elmt_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large element datatype in span_hyper selection") + "couldn't create a large element datatype in span_hyper selection"); elmt_type_is_derived = TRUE; /* Compute 'down' sizes for each dimension */ @@ -1032,7 +1032,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne type_list.head = type_list.tail = NULL; if (H5S__obtain_datatype(space->select.sel_info.hslab->span_lst, down, elmt_size, &elmt_type, &span_type, &type_list, 0, op_gen) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't obtain MPI derived data type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't obtain MPI derived data type"); if (MPI_SUCCESS != (mpi_code = MPI_Type_dup(span_type, new_type))) HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code) if (MPI_SUCCESS != (mpi_code = MPI_Type_commit(new_type))) @@ -1040,7 +1040,7 @@ H5S__mpio_span_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *ne /* Release MPI data types generated during span tree traversal */ if (H5S__release_datatype(&type_list) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "couldn't release MPI derived data type") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "couldn't release MPI derived data type"); /* fill in the remaining return values */ *count = 1; @@ -1141,9 +1141,9 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e /* Allocate the initial displacement & block length buffers */ alloc_count = H5S_MPIO_INITIAL_ALLOC_COUNT; if (NULL == (disp = (MPI_Aint *)H5MM_malloc(alloc_count * sizeof(MPI_Aint)))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of displacements"); if (NULL == (blocklen = (int *)H5MM_malloc(alloc_count * sizeof(int)))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of block lengths") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of block lengths"); /* If this is the fastest changing dimension, it is the base case for derived datatype. */ span = spans->head; @@ -1165,11 +1165,11 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e /* Re-allocate the buffers */ if (NULL == (tmp_disp = (MPI_Aint *)H5MM_realloc(disp, alloc_count * sizeof(MPI_Aint)))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate array of displacements") + "can't allocate array of displacements"); disp = tmp_disp; if (NULL == (tmp_blocklen = (int *)H5MM_realloc(blocklen, alloc_count * sizeof(int)))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate array of block lengths") + "can't allocate array of block lengths"); blocklen = tmp_blocklen; } /* end if */ @@ -1203,7 +1203,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e if ((hsize_t)(blocklen[u]) > bigio_count) { if (H5_mpio_create_large_type((hsize_t)blocklen[u], 0, *elmt_type, &temp_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't create a large element datatype in span_hyper selection") + "couldn't create a large element datatype in span_hyper selection"); } /* end if */ else if (MPI_SUCCESS != (mpi_code = MPI_Type_contiguous((int)blocklen[u], *elmt_type, &temp_type))) @@ -1236,7 +1236,8 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e MPI_Aint stride; /* Distance between inner MPI datatypes */ if (NULL == (inner_type = (MPI_Datatype *)H5MM_malloc(alloc_count * sizeof(MPI_Datatype)))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate array of inner MPI datatypes") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, + "can't allocate array of inner MPI datatypes"); /* Calculate the total bytes of the lower dimension */ stride = (MPI_Aint)(*down) * (MPI_Aint)elmt_size; @@ -1259,16 +1260,16 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e /* Re-allocate the buffers */ if (NULL == (tmp_disp = (MPI_Aint *)H5MM_realloc(disp, alloc_count * sizeof(MPI_Aint)))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate array of displacements") + "can't allocate array of displacements"); disp = tmp_disp; if (NULL == (tmp_blocklen = (int *)H5MM_realloc(blocklen, alloc_count * sizeof(int)))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate array of block lengths") + "can't allocate array of block lengths"); blocklen = tmp_blocklen; if (NULL == (tmp_inner_type = (MPI_Datatype *)H5MM_realloc( inner_type, alloc_count * sizeof(MPI_Datatype)))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, - "can't allocate array of inner MPI datatypes") + "can't allocate array of inner MPI datatypes"); inner_type = tmp_inner_type; } /* end if */ @@ -1281,7 +1282,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e /* Generate MPI datatype for next dimension down */ if (H5S__obtain_datatype(span->down, down + 1, elmt_size, elmt_type, &down_type, type_list, op_info_i, op_gen) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't obtain MPI derived data type") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't obtain MPI derived data type"); /* Compute the number of elements to attempt in this span */ nelmts = (span->high - span->low) + 1; @@ -1311,7 +1312,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down, size_t e /* Allocate space for the MPI data type list node */ if (NULL == (type_node = H5FL_MALLOC(H5S_mpio_mpitype_node_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate MPI data type list node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate MPI data type list node"); /* Set up MPI type node */ type_node->type = spans->op_info[op_info_i].u.down_type; @@ -1390,7 +1391,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int case H5S_SEL_NONE: if (H5S__mpio_none_type(new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert 'none' selection to MPI type") + "couldn't convert 'none' selection to MPI type"); break; case H5S_SEL_ALL: @@ -1402,7 +1403,7 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int if (H5S__mpio_permute_type(space, elmt_size, permute_map, new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert 'all' selection to MPI type") + "couldn't convert 'all' selection to MPI type"); break; case H5S_SEL_ERROR: @@ -1418,20 +1419,20 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int case H5S_SEL_NONE: if (H5S__mpio_none_type(new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert 'none' selection to MPI type") + "couldn't convert 'none' selection to MPI type"); break; case H5S_SEL_ALL: if (H5S__mpio_all_type(space, elmt_size, new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert 'all' selection to MPI type") + "couldn't convert 'all' selection to MPI type"); break; case H5S_SEL_POINTS: if (H5S__mpio_point_type(space, elmt_size, new_type, count, is_derived_type, do_permute, permute_map, is_permuted) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert 'point' selection to MPI type") + "couldn't convert 'point' selection to MPI type"); break; case H5S_SEL_HYPERSLABS: @@ -1439,12 +1440,12 @@ H5S_mpio_space_type(H5S_t *space, size_t elmt_size, MPI_Datatype *new_type, int if (H5S__mpio_reg_hyper_type(space, elmt_size, new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert regular 'hyperslab' selection to MPI type") + "couldn't convert regular 'hyperslab' selection to MPI type"); } /* end if */ else if (H5S__mpio_span_hyper_type(space, elmt_size, new_type, count, is_derived_type) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, - "couldn't convert irregular 'hyperslab' selection to MPI type") + "couldn't convert irregular 'hyperslab' selection to MPI type"); break; case H5S_SEL_ERROR: diff --git a/src/H5Snone.c b/src/H5Snone.c index da084bb..a20f37b 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -598,27 +598,27 @@ H5S__none_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbo /* Allocate space if not provided */ if (!*space) { if (NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace"); } /* end if */ else tmp_space = *space; /* Decode version */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *p, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version"); UINT32DECODE(*p, version); if (version < H5S_NONE_VERSION_1 || version > H5S_NONE_VERSION_LATEST) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for none selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for none selection"); /* Skip over the remainder of the header */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *p, 8, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection header") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection header"); *p += 8; /* Change to "none" selection */ if (H5S_select_none(tmp_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); /* Return space to the caller if allocated */ if (!*space) @@ -986,7 +986,7 @@ H5S__none_project_simple(const H5S_t H5_ATTR_UNUSED *base_space, H5S_t *new_spac /* Select the entire new space */ if (H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to set none selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to set none selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1021,7 +1021,7 @@ H5S_select_none(H5S_t *space) /* Remove current selection first */ if (H5S_SELECT_RELEASE(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab"); /* Set number of elements in selection */ space->select.num_elem = 0; @@ -1061,11 +1061,11 @@ H5Sselect_none(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Change to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Spoint.c b/src/H5Spoint.c index f5b606c..6027946 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -186,7 +186,7 @@ H5S__point_iter_init(H5S_t *space, H5S_sel_iter_t *iter) /* Copy the point list */ if (NULL == (iter->u.pnt.pnt_lst = H5S__copy_pnt_list(space->select.sel_info.pnt_lst, space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy point list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy point list"); } /* end if */ else /* OK to share point list for internal iterations */ @@ -577,7 +577,7 @@ H5S__point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *c /* Allocate space for the new node */ if (NULL == (new_node = (H5S_pnt_node_t *)H5FL_ARR_MALLOC(hcoords_t, space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node"); /* Initialize fields in node */ new_node->next = NULL; @@ -736,14 +736,14 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize /* If we are setting a new selection, remove current selection first */ if (op == H5S_SELECT_SET || H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS) if (H5S_SELECT_RELEASE(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release point selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release point selection"); /* Allocate space for the point selection information if necessary */ if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS || space->select.sel_info.pnt_lst == NULL) { hsize_t tmp = HSIZET_MAX; if (NULL == (space->select.sel_info.pnt_lst = H5FL_CALLOC(H5S_pnt_list_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate element information") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate element information"); /* Set the bound box to the default value */ H5VM_array_fill(space->select.sel_info.pnt_lst->low_bounds, &tmp, sizeof(hsize_t), @@ -753,7 +753,7 @@ H5S_select_elements(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize /* Add points to selection */ if (H5S__point_add(space, op, num_elem, coord) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert elements") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't insert elements"); /* Set selection type */ space->select.type = H5S_sel_point; @@ -796,7 +796,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank) /* Allocate room for the head of the point list */ if (NULL == (dst = H5FL_MALLOC(H5S_pnt_list_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate point list node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate point list node"); curr = src->head; new_tail = NULL; @@ -805,7 +805,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank) /* Create new point */ if (NULL == (new_node = (H5S_pnt_node_t *)H5FL_ARR_MALLOC(hcoords_t, rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate point node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate point node"); new_node->next = NULL; /* Copy over the point's coordinates */ @@ -916,7 +916,7 @@ H5S__point_copy(H5S_t *dst, const H5S_t *src, hbool_t H5_ATTR_UNUSED share_selec /* Allocate room for the head of the point list */ if (NULL == (dst->select.sel_info.pnt_lst = H5S__copy_pnt_list(src->select.sel_info.pnt_lst, src->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy point list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy point list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -994,9 +994,9 @@ H5Sget_select_elem_npoints(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an element selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an element selection"); ret_value = (hssize_t)H5S_GET_SELECT_NPOINTS(space); @@ -1052,7 +1052,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t * /* Get bounding box for the selection */ 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds"); /* Determine whether number of points or high bounds exceeds (2^32 - 1) */ if (space->select.num_elem > H5S_UINT32_MAX) @@ -1072,7 +1072,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t * /* Get the file's low/high bounds */ if (H5CX_get_libver_bounds(&low_bound, &high_bound) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get low/high bounds from API context") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get low/high bounds from API context"); /* Upgrade to the version indicated by the file's low bound if higher */ tmp_version = MAX(tmp_version, H5O_sds_point_ver_bounds[low_bound]); @@ -1081,12 +1081,12 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t * if (tmp_version > H5O_sds_point_ver_bounds[high_bound]) { if (count_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "The number of points in point selection exceeds 2^32") + "The number of points in point selection exceeds 2^32"); else if (bound_up_version) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "The end of bounding box in point selection exceeds 2^32") + "The end of bounding box in point selection exceeds 2^32"); else - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "Dataspace point selection version out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "Dataspace point selection version out of bounds"); } /* end if */ /* Set the version to return */ @@ -1115,7 +1115,7 @@ H5S__point_get_version_enc_size(const H5S_t *space, uint32_t *version, uint8_t * break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size"); break; } /* end switch */ @@ -1155,7 +1155,7 @@ H5S__point_serial_size(H5S_t *space) /* Determine the version and encoded size for point selection */ if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size"); /* Basic number of bytes required to serialize point selection: */ if (version >= H5S_POINT_VERSION_2) @@ -1224,7 +1224,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p) /* Determine the version and encoded size for point selection info */ if (H5S__point_get_version_enc_size(space, &version, &enc_size) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't determine version and enc_size"); /* Store the preamble information */ UINT32ENCODE(pp, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ @@ -1298,7 +1298,7 @@ H5S__point_serialize(H5S_t *space, uint8_t **p) break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size"); break; } /* end switch */ @@ -1366,85 +1366,86 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb /* Allocate space if not provided */ if (!*space) { if (NULL == (tmp_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace"); } /* end if */ else tmp_space = *space; /* Decode version */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection version"); UINT32DECODE(pp, version); if (version < H5S_POINT_VERSION_1 || version > H5S_POINT_VERSION_LATEST) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for point selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "bad version number for point selection"); if (version >= (uint32_t)H5S_POINT_VERSION_2) { /* Decode size of point info */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 1, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding point info") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding point info"); enc_size = *(pp)++; } else { /* Skip over the remainder of the header */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, 8, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection headers") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, + "buffer overflow while decoding selection headers"); pp += 8; enc_size = H5S_SELECT_INFO_ENC_SIZE_4; } /* Check encoded size */ if (enc_size & ~H5S_SELECT_INFO_ENC_SIZE_BITS) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown size of point/offset info for selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "unknown size of point/offset info for selection"); /* Decode the rank of the point selection */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection rank") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection rank"); UINT32DECODE(pp, rank); if (!*space) { /* Patch the rank of the allocated dataspace */ (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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions"); } /* end if */ else /* Verify the rank of the provided dataspace */ if (rank != tmp_space->extent.rank) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "rank of serialized selection does not match dataspace") + "rank of serialized selection does not match dataspace"); /* decode the number of points */ switch (enc_size) { case H5S_SELECT_INFO_ENC_SIZE_2: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint16_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of points") + "buffer overflow while decoding number of points"); UINT16DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_4: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint32_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of points") + "buffer overflow while decoding number of points"); UINT32DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_8: if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, sizeof(uint64_t), p_end)) HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, - "buffer overflow while decoding number of points") + "buffer overflow while decoding number of points"); UINT64DECODE(pp, num_elem); break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size"); break; } /* end switch */ /* Allocate space for the coordinates */ if (NULL == (coord = (hsize_t *)H5MM_malloc(num_elem * rank * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate coordinate information") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate coordinate information"); /* Determine necessary size of buffer for coordinates */ enc_type_size = 0; @@ -1460,14 +1461,15 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb enc_type_size = sizeof(uint64_t); break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size"); break; } coordinate_buffer_requirement = num_elem * rank * enc_type_size; if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, pp, coordinate_buffer_requirement, p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection coordinates") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, + "buffer overflow while decoding selection coordinates"); /* Retrieve the coordinates from the buffer */ for (tcoord = coord, i = 0; i < num_elem; i++) @@ -1483,13 +1485,13 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hb UINT64DECODE(pp, *tcoord); break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size"); break; } /* end switch */ /* Select points */ if (H5S_select_elements(tmp_space, H5S_SELECT_SET, num_elem, (const hsize_t *)coord) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); /* Update decoding pointer */ *p = pp; @@ -1626,11 +1628,11 @@ H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoint /* Check args */ if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer"); if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a point selection") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a point selection"); ret_value = H5S__get_select_elem_pointlist(space, startpoint, numpoints, buf); @@ -1685,7 +1687,7 @@ H5S__point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end) /* Check for offset moving selection negative */ if (((hssize_t)space->select.sel_info.pnt_lst->low_bounds[u] + space->select.offset[u]) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds"); /* Set the low & high bounds in this dimension */ start[u] = @@ -1748,7 +1750,7 @@ H5S__point_offset(const H5S_t *space, hsize_t *offset) /* Check for offset moving selection out of the dataspace */ if (pnt_offset < 0 || (hsize_t)pnt_offset >= dim_size[i]) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "offset moves selection out of bounds"); /* Add the point's offset in this dimension to the total linear offset */ *offset += (hsize_t)pnt_offset * accum; @@ -2231,7 +2233,7 @@ H5S__point_project_scalar(const H5S_t *space, hsize_t *offset) /* Check for more than one point selected */ if (node->next) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "point selection of one element has more than one node!") + "point selection of one element has more than one node!"); /* Calculate offset of selection in projected buffer */ *offset = H5VM_array_offset(space->extent.rank, space->extent.size, node->pnt); @@ -2269,11 +2271,11 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of /* We are setting a new selection, remove any current selection in new dataspace */ if (H5S_SELECT_RELEASE(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release selection"); /* Allocate room for the head of the point list */ if (NULL == (new_space->select.sel_info.pnt_lst = H5FL_MALLOC(H5S_pnt_list_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point list node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point list node"); /* Check if the new space's rank is < or > base space's rank */ if (new_space->extent.rank < base_space->extent.rank) { @@ -2293,7 +2295,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of while (base_node) { /* Create new point */ if (NULL == (new_node = (H5S_pnt_node_t *)H5FL_ARR_MALLOC(hcoords_t, new_space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node"); new_node->next = NULL; /* Copy over the point's coordinates */ @@ -2335,7 +2337,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of while (base_node) { /* Create new point */ if (NULL == (new_node = (H5S_pnt_node_t *)H5FL_ARR_MALLOC(hcoords_t, new_space->extent.rank))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate point node"); new_node->next = NULL; /* Copy over the point's coordinates */ @@ -2423,19 +2425,19 @@ H5Sselect_elements(hid_t spaceid, H5S_seloper_t op, size_t num_elem, const hsize /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (H5S_SCALAR == H5S_GET_EXTENT_TYPE(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_SCALAR space") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_SCALAR space"); if (H5S_NULL == H5S_GET_EXTENT_TYPE(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_NULL space") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_NULL space"); if (coord == NULL || num_elem == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "elements not specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "elements not specified"); if (!(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "unsupported operation attempted") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "unsupported operation attempted"); /* Call the real element selection routine */ if ((ret_value = H5S_select_elements(space, op, num_elem, coord)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't select elements") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't select elements"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 4bdce64..3087df3 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -133,16 +133,16 @@ H5Soffset_simple(hid_t space_id, const hssize_t *offset) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "not a dataspace"); if (space->extent.rank == 0 || (H5S_GET_EXTENT_TYPE(space) == H5S_SCALAR || H5S_GET_EXTENT_TYPE(space) == H5S_NULL)) - HGOTO_ERROR(H5E_ID, H5E_UNSUPPORTED, FAIL, "can't set offset on scalar or null dataspace") + HGOTO_ERROR(H5E_ID, H5E_UNSUPPORTED, FAIL, "can't set offset on scalar or null dataspace"); if (offset == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no offset specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no offset specified"); /* Set the selection offset */ if (H5S_select_offset(space, offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set offset") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set offset"); done: FUNC_LEAVE_API(ret_value) @@ -181,13 +181,13 @@ H5Sselect_copy(hid_t dst_id, hid_t src_id) /* Check args */ if (NULL == (src = (H5S_t *)H5I_object_verify(src_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (dst = (H5S_t *)H5I_object_verify(dst_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Copy */ if (H5S_select_copy(dst, src, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection"); done: FUNC_LEAVE_API(ret_value) @@ -231,14 +231,14 @@ H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection) /* Release the current selection */ if (H5S_SELECT_RELEASE(dst) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection"); /* Copy regular fields */ dst->select = src->select; /* Perform correct type of copy based on the type of selection */ if ((ret_value = (*src->select.type->copy)(dst, src, share_selection)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection specific information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection specific information"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -268,7 +268,7 @@ H5S_select_release(H5S_t *ds) /* Call the selection type's release function */ if ((ds->select.type) && ((ret_value = (*ds->select.type->release)(ds)) < 0)) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -371,7 +371,7 @@ H5Sget_select_npoints(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); ret_value = (hssize_t)H5S_GET_SELECT_NPOINTS(space); @@ -441,7 +441,7 @@ H5Sselect_valid(hid_t spaceid) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); ret_value = H5S_SELECT_VALID(space); @@ -527,7 +527,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size) /* Decode selection type */ if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *p, sizeof(uint32_t), p_end)) - HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection type") + HGOTO_ERROR(H5E_DATASPACE, H5E_OVERFLOW, FAIL, "buffer overflow while decoding selection type"); UINT32DECODE(*p, sel_type); /* Make routine for selection type */ @@ -553,7 +553,7 @@ H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size) } if (ret_value < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "can't deserialize selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "can't deserialize selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -600,9 +600,9 @@ H5Sget_select_bounds(hid_t spaceid, hsize_t start[] /*out*/, hsize_t end[] /*out /* Check args */ if (start == NULL || end == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer"); if (NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); ret_value = H5S_SELECT_BOUNDS(space, start, end); @@ -763,12 +763,13 @@ H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unli /* Check for selection callback */ if (!space->select.type->num_elem_non_unlim) - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "selection type has no num_elem_non_unlim callback") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, + "selection type has no num_elem_non_unlim callback"); /* Make selection callback */ if ((*space->select.type->num_elem_non_unlim)(space, num_elem_non_unlim) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, - "can't get number of elements in non-unlimited dimension") + "can't get number of elements in non-unlimited dimension"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -989,19 +990,19 @@ H5Sselect_adjust(hid_t space_id, const hssize_t *offset) H5TRACE2("e", "i*Hs", space_id, offset); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == offset) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "NULL offset pointer") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "NULL offset pointer"); /* Check bounds */ if (H5S_SELECT_BOUNDS(space, low_bounds, high_bounds) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds"); for (u = 0; u < space->extent.rank; u++) if (offset[u] > (hssize_t)low_bounds[u]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjustment would move selection below zero offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjustment would move selection below zero offset"); if (H5S_select_adjust_s(space, offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't adjust selection"); done: FUNC_LEAVE_API(ret_value) @@ -1285,7 +1286,7 @@ H5S_select_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelmt /* 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get selection sequence list") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get selection sequence list"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1380,20 +1381,20 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite /* Get the datatype size */ if (0 == (elmt_size = H5T_get_size(type))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid"); /* Allocate the selection iterator */ if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Initialize iterator */ if (H5S_select_iter_init(iter, space, elmt_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); iter_init = TRUE; /* Selection iteration info has been initialized */ /* Get the number of elements in selection */ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); /* Get the rank of the dataspace */ ndims = space->extent.rank; @@ -1410,9 +1411,9 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite /* Allocate the offset & length arrays */ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, H5D_IO_VECTOR_SIZE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate length vector array") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, H5D_IO_VECTOR_SIZE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate offset vector array") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate offset vector array"); /* Loop, while elements left in selection */ while (max_elem > 0 && user_ret == 0) { @@ -1423,7 +1424,7 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite /* Get the sequences of bytes */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, (size_t)H5D_IO_VECTOR_SIZE, max_elem, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Loop, while sequences left to process */ for (curr_seq = 0; curr_seq < nseq && user_ret == 0; curr_seq++) { @@ -1465,7 +1466,7 @@ H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_ite break; default: - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported op type") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unsupported op type"); } /* end switch */ /* Check for error return from iterator */ @@ -1529,7 +1530,7 @@ H5Sget_select_type(hid_t space_id) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, H5S_SEL_ERROR, "not a dataspace") + HGOTO_ERROR(H5E_ID, H5E_BADID, H5S_SEL_ERROR, "not a dataspace"); /* Set return value */ ret_value = H5S_GET_SELECT_TYPE(space); @@ -1668,10 +1669,10 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) /* Get low & high bounds for both dataspaces */ if (H5S_SELECT_BOUNDS(space_a, low_a, high_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, - "can't get selection bounds for first dataspace") + "can't get selection bounds for first dataspace"); if (H5S_SELECT_BOUNDS(space_b, low_b, high_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, - "can't get selection bounds for second dataspace") + "can't get selection bounds for second dataspace"); /* Check that the range between the low & high bounds are the same */ space_a_dim = (int)space_a_rank - 1; @@ -1728,9 +1729,9 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) /* Allocate the selection iterators */ if (NULL == (iter_a = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); if (NULL == (iter_b = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Initialize iterator for each dataspace selection * Use '0' for element size instead of actual element size to indicate @@ -1738,10 +1739,10 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) * aren't actually going to be doing I/O with the iterators. */ if (H5S_select_iter_init(iter_a, space_a, (size_t)0, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator a") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator a"); iter_a_init = TRUE; if (H5S_select_iter_init(iter_b, space_b, (size_t)0, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator b") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator b"); iter_b_init = TRUE; /* Iterate over all the blocks in each selection */ @@ -1750,9 +1751,9 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) /* Get the current block for each selection iterator */ if (H5S_SELECT_ITER_BLOCK(iter_a, start_a, end_a) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get iterator block a") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get iterator block a"); if (H5S_SELECT_ITER_BLOCK(iter_b, start_b, end_b) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get iterator block b") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get iterator block b"); space_a_dim = (int)space_a_rank - 1; space_b_dim = (int)space_b_rank - 1; @@ -1819,10 +1820,10 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) /* Check if we are able to advance to the next selection block */ if ((status_a = H5S_SELECT_ITER_HAS_NEXT_BLOCK(iter_a)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to check iterator block a") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to check iterator block a"); if ((status_b = H5S_SELECT_ITER_HAS_NEXT_BLOCK(iter_b)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to check iterator block b") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "unable to check iterator block b"); /* Did we run out of blocks at the same time? */ if ((status_a == FALSE) && (status_b == FALSE)) @@ -1833,11 +1834,11 @@ H5S_select_shape_same(H5S_t *space1, H5S_t *space2) /* Advance to next block in selection iterators */ if (H5S_SELECT_ITER_NEXT_BLOCK(iter_a) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, - "unable to advance to next iterator block a") + "unable to advance to next iterator block a"); if (H5S_SELECT_ITER_NEXT_BLOCK(iter_b) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, - "unable to advance to next iterator block b") + "unable to advance to next iterator block b"); } /* end else */ } /* end while */ } /* end else */ @@ -1886,12 +1887,12 @@ H5Sselect_shape_same(hid_t space1_id, hid_t space2_id) H5TRACE2("t", "ii", space1_id, space2_id); if (NULL == (space1 = (H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (space2 = (H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if ((ret_value = H5S_select_shape_same(space1, space2)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't compare selections") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't compare selections"); done: FUNC_LEAVE_API(ret_value) @@ -1940,7 +1941,7 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en /* Get low & high bounds for dataspace selection */ if (H5S_SELECT_BOUNDS(space, low, high) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds for dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get selection bounds for dataspace"); /* Loop over selection bounds and block, checking for overlap */ for (u = 0; u < space->extent.rank; u++) @@ -1951,7 +1952,7 @@ H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en /* Call selection type's intersect routine */ if ((ret_value = (*space->select.type->intersect_block)(space, start, end)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't intersect block with selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't intersect block with selection"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1991,21 +1992,21 @@ H5Sselect_intersect_block(hid_t space_id, const hsize_t *start, const hsize_t *e /* Check arguments */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == start) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "block start array pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "block start array pointer is NULL"); if (NULL == end) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "block end array pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "block end array pointer is NULL"); /* Range check start & end values */ for (u = 0; u < space->extent.rank; u++) if (start[u] > end[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "block start[%u] (%llu) > end[%u] (%llu)", u, - (unsigned long long)start[u], u, (unsigned long long)end[u]) + (unsigned long long)start[u], u, (unsigned long long)end[u]); /* Call internal routine to do comparison */ if ((ret_value = H5S_select_intersect_block(space, start, end)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't compare selection and block") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't compare selection and block"); done: FUNC_LEAVE_API(ret_value) @@ -2090,7 +2091,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign /* 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality of base space"); base_space_rank = (unsigned)sbase_space_rank; assert(base_space_rank != new_space_rank); @@ -2100,12 +2101,12 @@ 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get number of points selected"); assert(npoints <= 1); /* Create new scalar dataspace */ if (NULL == (new_space = H5S_create(H5S_SCALAR))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create scalar dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create scalar dataspace"); /* No need to register the dataspace(i.e. get an ID) as * we will just be discarding it shortly. @@ -2132,13 +2133,13 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign * */ if (H5S_SELECT_PROJECT_SCALAR(base_space, &projected_space_element_offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project scalar selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project scalar selection"); } /* end if */ else { assert(0 == npoints); if (H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't delete default selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't delete default selection"); } /* end else */ } /* end if */ else { /* projected space must be simple */ @@ -2204,7 +2205,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign * so we can create the new simple dataspace. */ if (NULL == (new_space = H5S_create_simple(new_space_rank, new_space_dims, new_space_maxdims))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* No need to register the dataspace(i.e. get an ID) as * we will just be discarding it shortly. @@ -2215,7 +2216,7 @@ H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, unsign * dataspace into the projected dataspace. */ if (H5S_SELECT_PROJECT_SIMPLE(base_space, new_space, &projected_space_element_offset) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project simple selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "unable to project simple selection"); /* If we get this far, we have created the new dataspace, and projected * the selection in the base dataspace into the new dataspace. @@ -2312,25 +2313,25 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf) /* Allocate the selection iterator */ if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Initialize iterator */ if (H5S_select_iter_init(iter, space, fill_size, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator"); iter_init = TRUE; /* Selection iteration info has been initialized */ /* Get the number of elements in selection */ if ((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected"); /* Compute the number of bytes to process */ H5_CHECKED_ASSIGN(max_elem, size_t, nelmts, hssize_t); /* Allocate the offset & length arrays */ if (NULL == (len = H5FL_SEQ_MALLOC(size_t, H5D_IO_VECTOR_SIZE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate length vector array") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate length vector array"); if (NULL == (off = H5FL_SEQ_MALLOC(hsize_t, H5D_IO_VECTOR_SIZE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate offset vector array") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate offset vector array"); /* Loop, while elements left in selection */ while (max_elem > 0) { @@ -2341,7 +2342,7 @@ H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *_buf) /* Get the sequences of bytes */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, (size_t)H5D_IO_VECTOR_SIZE, max_elem, &nseq, &nelem, off, len) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Loop over sequences */ for (curr_seq = 0; curr_seq < nseq; curr_seq++) { @@ -2430,22 +2431,22 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); if (NULL == (ds_iter = H5FL_CALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate selection iterator"); /* Create new space, using dst extent. Start with "all" selection. */ if (NULL == (new_space = H5S_create(H5S_SIMPLE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create output dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "unable to create output dataspace"); if (H5S__extent_copy_real(&new_space->extent, &dst_space->extent, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy destination space extent"); /* If the intersecting space is "all", the intersection must be equal to the * source space and the projection must be equal to the destination space */ if (H5S_GET_SELECT_TYPE(src_intersect_space) == H5S_SEL_ALL) { /* Copy the destination selection. */ if (H5S_select_copy(new_space, dst_space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy destination space selection"); } /* end if */ /* If any of the selections contain no elements, the projection must be * "none" */ @@ -2453,7 +2454,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i (H5S_GET_SELECT_NPOINTS(dst_space) == 0)) { /* Change to "none" selection */ if (H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); } /* end if */ else { /* Handle scalar dataspaces. It should not be possible for the source @@ -2475,21 +2476,21 @@ 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") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get source space bounds"); 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) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't check for intersection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't check for intersection"); /* Select all or none as appropriate */ if (intersect) { if (H5S_select_all(new_space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't select all") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't select all"); } /* end if */ else if (H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); } /* end if */ else { /* If the source intersect space is a point selection, convert it to a @@ -2504,11 +2505,11 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i /* Create dataspace and copy extent */ if (NULL == (tmp_src_intersect_space = H5S_create(H5S_SIMPLE))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, - "unable to create temporary source intersect dataspace") + "unable to create temporary source intersect dataspace"); if (H5S__extent_copy_real(&tmp_src_intersect_space->extent, &src_intersect_space->extent, FALSE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, - "unable to copy source intersect space extent") + "unable to copy source intersect space extent"); /* Iterate over points */ for (curr_pnt = src_intersect_space->select.sel_info.pnt_lst->head; curr_pnt; @@ -2517,7 +2518,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (H5S_hyper_add_span_element(tmp_src_intersect_space, src_intersect_space->extent.rank, curr_pnt->pnt) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, - "can't add point to temporary dataspace selection") + "can't add point to temporary dataspace selection"); /* Redirect local src_intersect_space pointer (will not affect * calling function) */ @@ -2536,16 +2537,16 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i /* Start with "none" selection */ if (H5S_select_none(new_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); /* Initialize iterators */ if (H5S_select_iter_init(ss_iter, src_space, 1, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, - "can't initialize source space selection iterator") + "can't initialize source space selection iterator"); ss_iter_init = TRUE; if (H5S_select_iter_init(ds_iter, dst_space, 1, H5S_SEL_ITER_SHARE_WITH_DATASPACE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, - "can't initialize destination space selection iterator") + "can't initialize destination space selection iterator"); ds_iter_init = TRUE; /* Iterate over points */ @@ -2556,33 +2557,33 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i /* Get SS coords */ if (H5S_SELECT_ITER_COORDS(ss_iter, coords) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, - "can't get source selection coordinates") + "can't get source selection coordinates"); /* Check for intersection */ if ((intersect = H5S_SELECT_INTERSECT_BLOCK(src_intersect_space, coords, coords)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't check for intersection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "can't check for intersection"); /* Add point if it intersects */ if (intersect) { /* Get DS coords */ if (H5S_SELECT_ITER_COORDS(ds_iter, coords) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, - "can't get destination selection coordinates") + "can't get destination selection coordinates"); /* Add point to new_space */ if (H5S_select_elements(new_space, H5S_SELECT_APPEND, 1, coords) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, - "can't add point to new selection") + "can't add point to new selection"); } /* end if */ /* Advance iterators */ if (H5S_SELECT_ITER_NEXT(ss_iter, 1) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, - "can't advacne source selection iterator") + "can't advacne source selection iterator"); ss_iter->elmt_left--; if (H5S_SELECT_ITER_NEXT(ds_iter, 1) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, - "can't advacne destination selection iterator") + "can't advacne destination selection iterator"); ds_iter->elmt_left--; } while (ss_iter->elmt_left > 0); assert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0); @@ -2597,7 +2598,7 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i if (H5S__hyper_project_intersection(src_space, dst_space, src_intersect_space, new_space, share_selection) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, - "can't project hyperslab onto destination selection") + "can't project hyperslab onto destination selection"); } /* end else */ } /* end else */ } /* end else */ @@ -2669,30 +2670,30 @@ H5Sselect_project_intersection(hid_t src_space_id, hid_t dst_space_id, hid_t src /* Check args */ if (NULL == (src_space = (H5S_t *)H5I_object_verify(src_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (dst_space = (H5S_t *)H5I_object_verify(dst_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); if (NULL == (src_intersect_space = (H5S_t *)H5I_object_verify(src_intersect_space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); /* Check numbers of points selected matches in source and destination */ if (H5S_GET_SELECT_NPOINTS(src_space) != H5S_GET_SELECT_NPOINTS(dst_space)) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "number of points selected in source space does not match that in destination space") + "number of points selected in source space does not match that in destination space"); /* Check numbers of dimensions matches in source and source intersect spaces */ if (H5S_GET_EXTENT_NDIMS(src_space) != H5S_GET_EXTENT_NDIMS(src_intersect_space)) HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, - "rank of source space does not match rank of source intersect space") + "rank of source space does not match rank of source intersect space"); /* Perform operation */ if (H5S_select_project_intersection(src_space, dst_space, src_intersect_space, &proj_space, FALSE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project dataspace intersection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCLIP, FAIL, "can't project dataspace intersection"); /* Register */ if ((ret_value = H5I_register(H5I_DATASPACE, proj_space, TRUE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); done: if (ret_value < 0) @@ -2745,12 +2746,12 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) if (subtract_space->select.type->type == H5S_SEL_ALL) { /* Change to "none" selection */ if (H5S_select_none(space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection"); } /* end if */ /* If either selection is a point selection, fail currently */ else if ((subtract_space->select.type->type == H5S_SEL_POINTS) || (space->select.type->type == H5S_SEL_POINTS)) { - HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported") + HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported"); } /* end if */ else { /* Check for all selection in space, convert to hyperslab */ @@ -2774,7 +2775,7 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) /* Convert to hyperslab selection */ if (H5S_select_hyperslab(space, H5S_SELECT_SET, tmp_start, tmp_stride, tmp_count, tmp_block) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection"); } /* end if */ assert(space->select.type->type == H5S_SEL_HYPERSLABS); @@ -2782,7 +2783,7 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space) /* Both spaces are now hyperslabs, perform the operation */ if (H5S__modify_select(space, H5S_SELECT_NOTB, subtract_space) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't subtract hyperslab") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCLIP, FAIL, "can't subtract hyperslab"); } /* end else */ } /* end if */ @@ -2821,27 +2822,27 @@ H5Ssel_iter_create(hid_t space_id, size_t elmt_size, unsigned flags) /* Check args */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, H5I_INVALID_HID, "not a dataspace"); if (elmt_size == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, H5I_INVALID_HID, "element size must be greater than 0") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, H5I_INVALID_HID, "element size must be greater than 0"); if (flags != (flags & H5S_SEL_ITER_ALL_PUBLIC_FLAGS)) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, H5I_INVALID_HID, "invalid selection iterator flag") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, H5I_INVALID_HID, "invalid selection iterator flag"); /* Allocate the iterator */ if (NULL == (sel_iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, H5I_INVALID_HID, "can't allocate selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, H5I_INVALID_HID, "can't allocate selection iterator"); /* Add flag to indicate that this iterator is from an API call */ flags |= H5S_SEL_ITER_API_CALL; /* Initialize the selection iterator */ if (H5S_select_iter_init(sel_iter, space, elmt_size, flags) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to initialize selection iterator"); /* Register */ if ((ret_value = H5I_register(H5I_SPACE_SEL_ITER, sel_iter, TRUE)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, H5I_INVALID_HID, - "unable to register dataspace selection iterator ID") + "unable to register dataspace selection iterator ID"); done: FUNC_LEAVE_API(ret_value) @@ -2904,20 +2905,20 @@ H5Ssel_iter_get_seq_list(hid_t sel_iter_id, size_t maxseq, size_t maxelmts, size /* Check args */ if (NULL == (sel_iter = (H5S_sel_iter_t *)H5I_object_verify(sel_iter_id, H5I_SPACE_SEL_ITER))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator"); if (NULL == nseq) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "'nseq' pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "'nseq' pointer is NULL"); if (NULL == nelmts) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "'nbytes' pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "'nbytes' pointer is NULL"); if (NULL == off) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "offset array pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "offset array pointer is NULL"); if (NULL == len) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "length array pointer is NULL") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "length array pointer is NULL"); /* Get the sequences of bytes */ if (maxseq > 0 && maxelmts > 0 && sel_iter->elmt_left > 0) { if (H5S_SELECT_ITER_GET_SEQ_LIST(sel_iter, maxseq, maxelmts, nseq, nelmts, off, len) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "sequence length generation failed"); } /* end if */ else *nseq = *nelmts = 0; @@ -2971,15 +2972,15 @@ H5S_select_contig_block(H5S_t *space, hbool_t *is_contig, hsize_t *off, size_t * /* Allocate and initialize the iterator */ if (NULL == (iter = H5FL_MALLOC(H5S_sel_iter_t))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate iterator"); if (H5S_select_iter_init(iter, space, 1, 0) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize memory selection information") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize memory selection information"); iter_init = TRUE; /* Get list of sequences for selection, to check if it is contiguous */ if (H5S_SELECT_ITER_GET_SEQ_LIST(iter, (size_t)1, (size_t)-1, &nseq_tmp, &nelem_tmp, &sel_off, &sel_len) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "sequence length generation failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL, "sequence length generation failed"); /* If the first sequence includes all the elements selected in this piece, it it contiguous */ H5_CHECK_OVERFLOW(space->select.num_elem, hsize_t, size_t); @@ -3036,18 +3037,18 @@ H5Ssel_iter_reset(hid_t sel_iter_id, hid_t space_id) /* Check args */ if (NULL == (sel_iter = (H5S_sel_iter_t *)H5I_object_verify(sel_iter_id, H5I_SPACE_SEL_ITER))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace"); /* Call selection type-specific release routine */ if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, - "problem releasing a selection iterator's type-specific info") + "problem releasing a selection iterator's type-specific info"); /* Simply re-initialize iterator */ if (H5S_select_iter_init(sel_iter, space, sel_iter->elmt_size, sel_iter->flags) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to re-initialize selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to re-initialize selection iterator"); done: FUNC_LEAVE_API(ret_value) @@ -3103,7 +3104,7 @@ H5S_sel_iter_close(H5S_sel_iter_t *sel_iter) /* Call selection type-specific release routine */ if (H5S_SELECT_ITER_RELEASE(sel_iter) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, - "problem releasing a selection iterator's type-specific info") + "problem releasing a selection iterator's type-specific info"); /* Release the structure */ sel_iter = H5FL_FREE(H5S_sel_iter_t, sel_iter); @@ -3140,11 +3141,11 @@ H5Ssel_iter_close(hid_t sel_iter_id) /* Check args */ if (NULL == H5I_object_verify(sel_iter_id, H5I_SPACE_SEL_ITER)) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "not a dataspace selection iterator"); /* When the reference count reaches zero the resources are freed */ if (H5I_dec_app_ref(sel_iter_id) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "problem freeing dataspace selection iterator ID") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "problem freeing dataspace selection iterator ID"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Stest.c b/src/H5Stest.c index 3326410..e5888ef 100644 --- a/src/H5Stest.c +++ b/src/H5Stest.c @@ -90,7 +90,7 @@ H5S__get_rebuild_status_test(hid_t space_id, H5S_diminfo_valid_t *status1, H5S_d /* Get dataspace structures */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); *status1 = space->select.sel_info.hslab->diminfo_valid; @@ -136,7 +136,7 @@ H5S__get_diminfo_status_test(hid_t space_id, H5S_diminfo_valid_t *status) /* Get dataspace structures */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); *status = space->select.sel_info.hslab->diminfo_valid; @@ -182,13 +182,13 @@ H5S__check_spans_tail_ptr(const H5S_hyper_span_info_t *span_lst) if (NULL != cur_elem->down) if ((ret_value = H5S__check_spans_tail_ptr(cur_elem->down)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the selection has inconsistent tail pointers") + "the selection has inconsistent tail pointers"); cur_elem = cur_elem->next; } /* end while */ if (actual_tail != span_lst->tail) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the selection has inconsistent tail pointers") + "the selection has inconsistent tail pointers"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -230,7 +230,7 @@ H5S__check_points_tail_ptr(const H5S_pnt_list_t *pnt_lst) } /* end while */ if (actual_tail != pnt_lst->tail) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the selection has inconsistent tail pointers") + "the selection has inconsistent tail pointers"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -279,7 +279,7 @@ H5S__check_internal_consistency(const H5S_t *space) /* Check the bound box */ if (H5S_get_select_bounds(space, low_bounds, high_bounds) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, "the bound box could not be retrieved") + HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, "the bound box could not be retrieved"); if (space->select.type->type == H5S_SEL_HYPERSLABS) { H5S_hyper_sel_t *hslab = space->select.sel_info.hslab; @@ -289,11 +289,11 @@ H5S__check_internal_consistency(const H5S_t *space) if ((hsize_t)((hssize_t)hslab->diminfo.low_bounds[u] + space->select.offset[u]) != low_bounds[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the lower bound box of the selection is inconsistent") + "the lower bound box of the selection is inconsistent"); if ((hsize_t)((hssize_t)hslab->diminfo.high_bounds[u] + space->select.offset[u]) != high_bounds[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the higher bound box of the selection is inconsistent") + "the higher bound box of the selection is inconsistent"); } /* end for */ } /* end if */ else { @@ -301,11 +301,11 @@ H5S__check_internal_consistency(const H5S_t *space) if ((hsize_t)((hssize_t)hslab->span_lst->low_bounds[u] + space->select.offset[u]) != low_bounds[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the lower bound box of the selection is inconsistent") + "the lower bound box of the selection is inconsistent"); if ((hsize_t)((hssize_t)hslab->span_lst->high_bounds[u] + space->select.offset[u]) != high_bounds[u]) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the higher bound box of the selection is inconsistent") + "the higher bound box of the selection is inconsistent"); } /* end for */ } /* end else */ @@ -313,7 +313,7 @@ H5S__check_internal_consistency(const H5S_t *space) if ((NULL != hslab) && (NULL != hslab->span_lst)) if (H5S__check_spans_tail_ptr(hslab->span_lst) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the selection has inconsistent tail pointers") + "the selection has inconsistent tail pointers"); } /* end if */ else if (space->select.type->type == H5S_SEL_POINTS) { H5S_pnt_list_t *pnt_lst = space->select.sel_info.pnt_lst; @@ -321,7 +321,7 @@ H5S__check_internal_consistency(const H5S_t *space) if (NULL != pnt_lst) if (H5S__check_points_tail_ptr(pnt_lst) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "the selection has inconsistent tail pointers") + "the selection has inconsistent tail pointers"); } /* end else-if */ done: @@ -357,12 +357,12 @@ H5S__internal_consistency_test(hid_t space_id) /* Get dataspace structures */ if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Check if the dataspace selections are the same shape */ if (FAIL == H5S__check_internal_consistency(space)) HGOTO_ERROR(H5E_DATASPACE, H5E_INCONSISTENTSTATE, FAIL, - "The dataspace has inconsistent internal state") + "The dataspace has inconsistent internal state"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5T.c b/src/H5T.c index 046331d..1c5c3f5 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -301,14 +301,14 @@ { \ /* Base off of existing datatype */ \ if (NULL == (dt = H5T_copy(BASE, H5T_COPY_TRANSIENT))) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "duplicating base type failed") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "duplicating base type failed"); \ } #define H5T_INIT_TYPE_ALLOC_CREATE(BASE) \ { \ /* Allocate new datatype info */ \ if (NULL == (dt = H5T__alloc())) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed"); \ } #define H5T_INIT_TYPE(GUTS, GLOBAL, CRT_TMPL, BASE, SIZE_TMPL, SIZE) \ @@ -327,7 +327,7 @@ \ /* Register result */ \ if (((GLOBAL) = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype atom"); \ } /******************/ @@ -607,12 +607,12 @@ H5T__init_inf(void) /* Get the float datatype */ if (NULL == (dst_p = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); dst = &dst_p->shared->u.atomic; /* Check that we can re-order the bytes correctly */ if (H5T_ORDER_LE != H5T_native_order_g && H5T_ORDER_BE != H5T_native_order_g) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); /* +Inf */ d = (uint8_t *)&H5T_NATIVE_FLOAT_POS_INF_g; @@ -648,12 +648,12 @@ H5T__init_inf(void) /* Get the double datatype */ if (NULL == (dst_p = (H5T_t *)H5I_object(H5T_NATIVE_DOUBLE_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); dst = &dst_p->shared->u.atomic; /* Check that we can re-order the bytes correctly */ if (H5T_ORDER_LE != H5T_native_order_g && H5T_ORDER_BE != H5T_native_order_g) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); /* +Inf */ d = (uint8_t *)&H5T_NATIVE_DOUBLE_POS_INF_g; @@ -746,7 +746,7 @@ H5T_init(void) /* Initialize the ID group for the file IDs */ if (H5I_register_type(H5I_DATATYPE_CLS) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface"); /* Make certain there aren't too many classes of datatypes defined */ /* Only 16 (numbered 0-15) are supported in the current file format */ @@ -757,39 +757,39 @@ H5T_init(void) * the library configuration by H5detect. */ if (H5T__init_native() < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize interface"); /* Initialize all other native types */ if (H5T__init_native_internal() < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize integers") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize integers"); /* Get the atomic datatype structures needed by the initialization code below */ if (NULL == (native_schar = (H5T_t *)H5I_object(H5T_NATIVE_SCHAR_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_uchar = (H5T_t *)H5I_object(H5T_NATIVE_UCHAR_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_short = (H5T_t *)H5I_object(H5T_NATIVE_SHORT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_ushort = (H5T_t *)H5I_object(H5T_NATIVE_USHORT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_int = (H5T_t *)H5I_object(H5T_NATIVE_INT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_uint = (H5T_t *)H5I_object(H5T_NATIVE_UINT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_long = (H5T_t *)H5I_object(H5T_NATIVE_LONG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_ulong = (H5T_t *)H5I_object(H5T_NATIVE_ULONG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_llong = (H5T_t *)H5I_object(H5T_NATIVE_LLONG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_ullong = (H5T_t *)H5I_object(H5T_NATIVE_ULLONG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_float = (H5T_t *)H5I_object(H5T_NATIVE_FLOAT_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_double = (H5T_t *)H5I_object(H5T_NATIVE_DOUBLE_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (NULL == (native_ldouble = (H5T_t *)H5I_object(H5T_NATIVE_LDOUBLE_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); /*------------------------------------------------------------ * Derived native types @@ -992,19 +992,19 @@ H5T_init(void) /* Deprecated object reference type */ H5T_INIT_TYPE(OBJREF, H5T_STD_REF_OBJ_g, ALLOC, -, NOSET, -) if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); objref = dt; /* Keep type for later */ /* Deprecated region reference type */ H5T_INIT_TYPE(REGREF, H5T_STD_REF_DSETREG_g, ALLOC, -, NOSET, -) if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); regref = dt; /* Keep type for later */ /* Opaque reference type */ H5T_INIT_TYPE(REF, H5T_STD_REF_g, ALLOC, -, NOSET, -) if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); ref = dt; /* Keep type for later */ /* @@ -1014,13 +1014,13 @@ H5T_init(void) fixedpt = native_int; floatpt = native_float; if (NULL == (compound = H5T__create(H5T_COMPOUND, (size_t)1))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == (enum_type = H5T__create(H5T_ENUM, (size_t)1))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == (vlen = H5T__vlen_create(native_int))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == (array = H5T__array_create(native_int, 1, dim))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); status = 0; status |= H5T__register_int(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T__conv_i_i); @@ -1383,7 +1383,7 @@ H5T_init(void) status |= H5T__init_inf(); if (status < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)"); /* Register datatype creation property class properties here. See similar * code in H5D_init(), etc. for example. @@ -1396,7 +1396,7 @@ H5T_init(void) /* Register the default datatype creation property list */ if ((H5P_LST_DATATYPE_CREATE_ID_g = H5P_create_id(H5P_CLS_DATATYPE_CREATE_g, FALSE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class") + HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class"); } /* end if */ done: @@ -1709,17 +1709,17 @@ H5T__close_cb(H5T_t *dt, void **request) if (NULL != dt->vol_obj) { /* Close the connector-managed datatype data */ if (H5VL_datatype_close(dt->vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype"); /* Free the VOL object */ if (H5VL_free_object(dt->vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object"); dt->vol_obj = NULL; } /* end if */ /* Close the datatype */ if (H5T_close(dt) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1753,15 +1753,15 @@ H5Tcreate(H5T_class_t type, size_t size) /* check args. We support string (fixed-size or variable-length) now. */ if (size <= 0 && size != H5T_VARIABLE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive"); /* create the type */ if (NULL == (dt = H5T__create(type, size))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type"); /* Get an ID for the datatype */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype ID"); done: FUNC_LEAVE_API(ret_value) @@ -1800,7 +1800,7 @@ H5Tcopy(hid_t obj_id) case H5I_DATATYPE: /* The argument is a datatype handle */ if (NULL == (dt = (H5T_t *)H5I_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "obj_id is not a datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "obj_id is not a datatype ID"); break; case H5I_DATASET: { @@ -1809,7 +1809,7 @@ H5Tcopy(hid_t obj_id) /* The argument is a dataset handle */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(obj_id, H5I_DATASET))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "type_id is not a dataset ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "type_id is not a dataset ID"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATASET_GET_TYPE; @@ -1820,13 +1820,13 @@ H5Tcopy(hid_t obj_id) */ if (H5VL_dataset_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, - "unable to get datatype from the dataset") + "unable to get datatype from the dataset"); dset_tid = vol_cb_args.args.get_type.type_id; /* Unwrap the type ID */ if (NULL == (dt = (H5T_t *)H5I_object(dset_tid))) HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, - "received invalid datatype from the dataset") + "received invalid datatype from the dataset"); } break; case H5I_UNINIT: @@ -1847,7 +1847,7 @@ H5Tcopy(hid_t obj_id) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype or dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype or dataset"); } /* end switch */ /* Copy datatype */ @@ -1856,14 +1856,14 @@ H5Tcopy(hid_t obj_id) /* Get an ID for the copied datatype */ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype atom") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype atom"); done: /* If we got a type ID from a passed-in dataset, we need to close that */ if (dset_tid != H5I_INVALID_HID) if (H5I_dec_app_ref(dset_tid) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADID, FAIL, "problem freeing temporary dataset type ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADID, FAIL, "problem freeing temporary dataset type ID"); /* Close the new datatype on errors */ if (H5I_INVALID_HID == ret_value) @@ -1893,13 +1893,13 @@ H5Tclose(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_IMMUTABLE == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype"); /* When the reference count reaches zero the resources are freed */ if (H5I_dec_app_ref(type_id) < 0) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id"); done: FUNC_LEAVE_API(ret_value) @@ -1929,13 +1929,13 @@ H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_IMMUTABLE == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "immutable datatype"); /* Get dataset object's connector */ if (NULL == (vol_obj = H5VL_vol_object(type_id))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get VOL object for dataset") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get VOL object for dataset"); /* Prepare for possible asynchronous operation */ if (H5ES_NONE != es_id) { @@ -1950,13 +1950,13 @@ H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* When the reference count reaches zero the resources are freed */ if (H5I_dec_app_ref_async(type_id, token_ptr) < 0) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "problem freeing id"); /* If a token was created, add the token to the event set */ if (NULL != token) if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, type_id, es_id)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: if (connector && H5VL_conn_dec_rc(connector) < 0) @@ -1988,9 +1988,9 @@ H5Tequal(hid_t type1_id, hid_t type2_id) /* check args */ if (NULL == (dt1 = (H5T_t *)H5I_object_verify(type1_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (NULL == (dt2 = (H5T_t *)H5I_object_verify(type2_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); ret_value = (0 == H5T_cmp(dt1, dt2, FALSE)) ? TRUE : FALSE; @@ -2024,12 +2024,12 @@ H5Tlock(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_NAMED == dt->shared->state || H5T_STATE_OPEN == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to lock named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to lock named datatype"); if (H5T_lock(dt, TRUE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient datatype"); done: FUNC_LEAVE_API(ret_value) @@ -2057,7 +2057,7 @@ H5Tget_class(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype"); /* Set return value */ ret_value = H5T_get_class(dt, FALSE); @@ -2121,13 +2121,13 @@ H5Tdetect_class(hid_t type, H5T_class_t cls) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype"); if (!(cls > H5T_NO_CLASS && cls < H5T_NCLASSES)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a datatype class"); /* Set return value */ if ((ret_value = H5T_detect_class(dt, cls, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5T_NO_CLASS, "can't get datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5T_NO_CLASS, "can't get datatype class"); done: FUNC_LEAVE_API(ret_value) @@ -2226,11 +2226,11 @@ H5Tis_variable_str(hid_t dtype_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Set return value */ if ((ret_value = H5T_is_variable_str(dt)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't determine if datatype is VL-string") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't determine if datatype is VL-string"); done: FUNC_LEAVE_API(ret_value) @@ -2277,7 +2277,7 @@ H5Tget_size(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); /* size */ ret_value = H5T_GET_SIZE(dt); @@ -2318,21 +2318,21 @@ H5Tset_size(hid_t type_id, size_t size) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only"); if (size <= 0 && size != H5T_VARIABLE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive"); if (size == H5T_VARIABLE && !H5T_IS_STRING(dt->shared)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length"); if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); if (H5T_REFERENCE == dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype"); /* Modify the datatype */ if (H5T__set_size(dt, size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for datatype"); done: FUNC_LEAVE_API(ret_value) @@ -2361,11 +2361,11 @@ H5Tget_super(hid_t type) H5TRACE1("i", "i", type); if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype"); if (NULL == (super = H5T_get_super(dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "not a datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "not a datatype"); if ((ret_value = H5I_register(H5I_DATATYPE, super, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register parent datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register parent datatype"); done: if (H5I_INVALID_HID == ret_value) @@ -2437,7 +2437,7 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T /* Register conversion */ if (H5T__register(pers, name, src, dst, &conv_func) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to register internal datatype conversion routine") + "unable to register internal datatype conversion routine"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2484,7 +2484,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con if (H5T_cmp(src, dst, FALSE)) { /* Locate or create a new conversion path */ if (NULL == (new_path = H5T__path_find_real(src, dst, name, conv))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to locate/allocate conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to locate/allocate conversion path"); /* Notify all other functions to recalculate private data since some * functions might cache a list of conversion functions. For @@ -2504,7 +2504,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con H5T_soft_t *x; if (NULL == (x = (H5T_soft_t *)H5MM_realloc(H5T_g.soft, na * sizeof(H5T_soft_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); H5T_g.asoft = na; H5T_g.soft = x; } /* end if */ @@ -2532,7 +2532,7 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con if ((tmp_sid = H5I_register(H5I_DATATYPE, H5T_copy(old_path->src, H5T_COPY_ALL), FALSE)) < 0 || (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") + "unable to register data types for conv query"); memset(&cdata, 0, sizeof cdata); cdata.command = H5T_CONV_INIT; if (conv->is_app) { @@ -2556,12 +2556,12 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con /* Create a new conversion path */ if (NULL == (new_path = H5FL_CALLOC(H5T_path_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); HDstrncpy(new_path->name, name, (size_t)H5T_NAMELEN); new_path->name[H5T_NAMELEN - 1] = '\0'; if (NULL == (new_path->src = H5T_copy(old_path->src, H5T_COPY_ALL)) || NULL == (new_path->dst = H5T_copy(old_path->dst, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy data types") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy data types"); new_path->conv = *conv; new_path->is_hard = FALSE; new_path->cdata = cdata; @@ -2656,15 +2656,15 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_c /* Check args */ if (H5T_PERS_HARD != pers && H5T_PERS_SOFT != pers) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid function persistence") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid function persistence"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conversion must have a name for debugging") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conversion must have a name for debugging"); if (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (!func) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified"); /* Set up conversion function wrapper */ conv_func.is_app = TRUE; @@ -2672,7 +2672,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_c /* Go register the function */ if (H5T__register(pers, name, src, dst, &conv_func) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register conversion function") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register conversion function"); done: FUNC_LEAVE_API(ret_value) @@ -2802,12 +2802,12 @@ H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T /* Check arguments */ if (src_id > 0 && (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "src is not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "src is not a data type"); if (dst_id > 0 && (NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst is not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst is not a data type"); if (H5T__unregister(pers, name, src, dst, func) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "internal unregister function failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "internal unregister function failed"); done: FUNC_LEAVE_API(ret_value) @@ -2841,13 +2841,13 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata /*out*/) /* Check args */ if (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (!pcdata) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer"); /* Find it */ if (NULL == (path = H5T_path_find(src, dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found"); if (pcdata) *pcdata = &(path->cdata); @@ -2885,11 +2885,11 @@ H5Tcompiler_conv(hid_t src_id, hid_t dst_id) /* Check args */ if (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); /* Find it */ if ((ret_value = H5T__compiler_conv(src, dst)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found"); done: FUNC_LEAVE_API(ret_value) @@ -2928,21 +2928,21 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *backgroun /* Check args */ if (NULL == (src = (H5T_t *)H5I_object_verify(src_id, H5I_DATATYPE)) || NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset transfer property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset transfer property list"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Find the conversion function */ if (NULL == (tpath = H5T_path_find(src, dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst data types") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert between src and dst data types"); if (H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, buf, background) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); done: FUNC_LEAVE_API(ret_value) @@ -2971,17 +2971,17 @@ H5Treclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) /* Check args */ if (H5I_DATATYPE != H5I_get_type(type_id) || buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); if (!(H5S_has_extent(space))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set"); /* Get the default dataset transfer property list if the user didn't provide one */ if (H5P_DEFAULT == dxpl_id) dxpl_id = H5P_DATASET_XFER_DEFAULT; else if (TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); @@ -3016,13 +3016,13 @@ H5Tencode(hid_t obj_id, void *buf, size_t *nalloc) /* Check argument and retrieve object */ if (NULL == (dtype = (H5T_t *)H5I_object_verify(obj_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (nalloc == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL pointer for buffer size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL pointer for buffer size"); /* Go encode the datatype */ if (H5T_encode(dtype, (unsigned char *)buf, nalloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode datatype"); done: FUNC_LEAVE_API(ret_value) @@ -3051,7 +3051,7 @@ H5Tdecode(const void *buf) /* Check args */ if (buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer"); /* Create datatype by decoding buffer * There is no way to get the size of the buffer, so we pass in @@ -3060,11 +3060,11 @@ H5Tdecode(const void *buf) * takes a size parameter. */ if (NULL == (dt = H5T_decode(SIZE_MAX, (const unsigned char *)buf))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object"); /* Register the type and return the ID */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type"); done: FUNC_LEAVE_API(ret_value) @@ -3098,11 +3098,11 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) /* Allocate "fake" file structure */ if (NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct"); /* Find out the size of buffer needed */ if ((buf_size = H5O_msg_raw_size(f, H5O_DTYPE_ID, TRUE, obj)) == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size"); /* Don't encode if buffer size isn't big enough or buffer is empty */ if (!buf || *nalloc < (buf_size + 1 + 1)) @@ -3116,7 +3116,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) /* Encode into user's buffer */ if (H5O_msg_encode(f, H5O_DTYPE_ID, TRUE, buf, obj) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode object"); } /* end else */ done: @@ -3149,23 +3149,23 @@ H5T_decode(size_t buf_size, const unsigned char *buf) /* Allocate "fake" file structure */ if (NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "can't allocate fake file struct"); /* Decode the type of the information */ if (*buf++ != H5O_DTYPE_ID) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADMESG, NULL, "not an encoded datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADMESG, NULL, "not an encoded datatype"); /* Decode the version of the datatype information */ if (*buf++ != H5T_ENCODE_VERSION) - HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype"); /* Decode the serialized datatype message */ if (NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, NULL, H5O_DTYPE_ID, buf_size, buf))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object"); /* Mark datatype as being in memory now */ if (H5T_set_loc(ret_value, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location"); /* No VOL object */ ret_value->vol_obj = NULL; @@ -3206,7 +3206,7 @@ H5T__create(H5T_class_t type, size_t size) H5T_t *origin_dt = NULL; if (NULL == (origin_dt = (H5T_t *)H5I_object(H5T_C_S1))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "can't get structure for string type") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "can't get structure for string type"); /* Copy the default string datatype */ if (NULL == (dt = H5T_copy(origin_dt, H5T_COPY_TRANSIENT))) @@ -3214,16 +3214,16 @@ H5T__create(H5T_class_t type, size_t size) /* Modify the datatype */ if (H5T__set_size(dt, size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set size for string type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to set size for string type"); } break; case H5T_BITFIELD: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "type class is not appropriate - use H5Tcopy()") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "type class is not appropriate - use H5Tcopy()"); case H5T_OPAQUE: case H5T_COMPOUND: if (NULL == (dt = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); dt->shared->type = type; if (type == H5T_COMPOUND) { @@ -3253,27 +3253,27 @@ H5T__create(H5T_class_t type, size_t size) subtype = H5T_NATIVE_LLONG_g; #endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ else - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no applicable native integer type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no applicable native integer type"); if (NULL == (dt = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); dt->shared->type = type; if (NULL == (sub_t_obj = (H5T_t *)H5I_object(subtype))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "unable to get datatype object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "unable to get datatype object"); if (NULL == (dt->shared->parent = H5T_copy(sub_t_obj, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy base datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy base datatype"); } break; case H5T_VLEN: /* Variable length datatype */ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tvlen_create()") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tvlen_create()"); case H5T_ARRAY: /* Array datatype */ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tarray_create2()") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tarray_create2()"); case H5T_NO_CLASS: case H5T_REFERENCE: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "unknown data type class") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "unknown data type class"); } /* end switch */ /* Set the size except VL string */ @@ -3323,9 +3323,9 @@ H5T__initiate_copy(const H5T_t *old_dt) /* Allocate space */ if (NULL == (new_dt = H5FL_MALLOC(H5T_t))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_t memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_t memory allocation failed"); if (NULL == (new_dt->shared = H5FL_MALLOC(H5T_shared_t))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_shared_t memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "H5T_shared_t memory allocation failed"); /* Copy shared information */ *(new_dt->shared) = *(old_dt->shared); @@ -3373,7 +3373,7 @@ H5T__copy_transient(H5T_t *old_dt) /* Copy datatype, with correct method */ if (NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'transient' copy of datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'transient' copy of datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3398,7 +3398,7 @@ H5T__copy_all(H5T_t *old_dt) /* Copy datatype, with correct method */ if (NULL == (ret_value = H5T_copy(old_dt, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'all' copy of datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't make 'all' copy of datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3434,7 +3434,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo /* Copy parent information */ if (old_dt->shared->parent) if (NULL == (new_dt->shared->parent = (*copyfn)(old_dt->shared->parent))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy datatype's parent type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy datatype's parent type"); switch (new_dt->shared->type) { case H5T_COMPOUND: { @@ -3449,7 +3449,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo if (new_dt->shared->u.compnd.nalloc > 0) { if (NULL == (new_dt->shared->u.compnd.memb = H5MM_malloc(new_dt->shared->u.compnd.nalloc * sizeof(H5T_cmemb_t)))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed"); H5MM_memcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb, new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t)); @@ -3461,17 +3461,17 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo if (NULL == (s = H5MM_xstrdup(new_dt->shared->u.compnd.memb[i].name))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, - "can't copy string for compound field's name") + "can't copy string for compound field's name"); new_dt->shared->u.compnd.memb[i].name = s; 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy compound field's datatype"); new_dt->shared->u.compnd.memb[i].type = tmp; assert(tmp != NULL); /* Range check against compound member's offset */ if ((accum_change < 0) && ((ssize_t)new_dt->shared->u.compnd.memb[i].offset < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); /* Apply the accumulated size change to the offset of the field */ new_dt->shared->u.compnd.memb[i].offset += (size_t)accum_change; @@ -3487,7 +3487,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo /* check if we couldn't find a match */ if (old_match < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "fields in datatype corrupted") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "fields in datatype corrupted"); } /* end if */ else old_match = (int)i; @@ -3508,7 +3508,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo /* Range check against datatype size */ if ((accum_change < 0) && ((ssize_t)new_dt->shared->size < accum_change)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "invalid field size in datatype"); /* Apply the accumulated size change to the size of the compound struct */ new_dt->shared->size += (size_t)accum_change; @@ -3524,17 +3524,17 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo if (NULL == (new_dt->shared->u.enumer.name = H5MM_malloc(new_dt->shared->u.enumer.nalloc * sizeof(char *)))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, - "enam name array memory allocation failed") + "enam name array memory allocation failed"); if (NULL == (new_dt->shared->u.enumer.value = H5MM_malloc(new_dt->shared->u.enumer.nalloc * new_dt->shared->size))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, - "enam value array memory allocation failed") + "enam value array memory allocation failed"); H5MM_memcpy(new_dt->shared->u.enumer.value, old_dt->shared->u.enumer.value, new_dt->shared->u.enumer.nmembs * new_dt->shared->size); for (i = 0; i < new_dt->shared->u.enumer.nmembs; i++) { if (NULL == (s = H5MM_xstrdup(old_dt->shared->u.enumer.name[i]))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, - "can't copy string for enum value's name") + "can't copy string for enum value's name"); new_dt->shared->u.enumer.name[i] = s; } } @@ -3549,7 +3549,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo if (set_memory_type) /* H5T_copy converts any type into a memory type */ if (H5T_set_loc(new_dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid datatype location"); break; case H5T_OPAQUE: @@ -3580,15 +3580,15 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo * type and the new type is also named. */ if (H5O_loc_reset(&new_dt->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to initialize location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to initialize location"); if (H5G_name_reset(&new_dt->path) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to reset path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to reset path"); if (new_dt->shared->state == H5T_STATE_NAMED || new_dt->shared->state == H5T_STATE_OPEN) { if (H5O_loc_copy_deep(&(new_dt->oloc), &(old_dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy object location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy object location"); if (H5G_name_copy(&(new_dt->path), &(old_dt->path), H5_COPY_DEEP) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to copy path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to copy path"); } /* end if */ /* Copy shared location information if the new type is named or if it is @@ -3597,7 +3597,7 @@ H5T__complete_copy(H5T_t *new_dt, const H5T_t *old_dt, H5T_shared_t *reopened_fo if ((old_dt->sh_loc.type == H5O_SHARE_TYPE_SOHM || old_dt->sh_loc.type == H5O_SHARE_TYPE_HERE) || new_dt->shared->state == H5T_STATE_NAMED || new_dt->shared->state == H5T_STATE_OPEN) { if (H5O_set_shared(&(new_dt->sh_loc), &(old_dt->sh_loc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy shared information") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy shared information"); } /* end if */ else /* Reset shared component info */ @@ -3632,7 +3632,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) /* Allocate and copy core datatype information */ if (NULL == (new_dt = H5T__initiate_copy(old_dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info"); /* Check what sort of copy we are making */ switch (method) { @@ -3657,12 +3657,12 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid copy method type"); } /* end switch */ /* Finish making the copy of the datatype */ if (H5T__complete_copy(new_dt, old_dt, NULL, (method == H5T_COPY_TRANSIENT), copyfn) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization"); /* Set return value */ ret_value = new_dt; @@ -3705,7 +3705,7 @@ H5T_copy_reopen(H5T_t *old_dt) /* Allocate and copy core datatype information */ if (NULL == (new_dt = H5T__initiate_copy(old_dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy core datatype info"); /* * Return a transient type (locked or unlocked) or an opened named @@ -3720,16 +3720,16 @@ H5T_copy_reopen(H5T_t *old_dt) /* Open named datatype again */ if (H5O_open(&old_dt->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reopen named data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reopen named data type"); /* Insert opened named datatype into opened object list for the file */ if (H5FO_insert(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr, new_dt->shared, FALSE) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL, - "can't insert datatype into list of open objects") + "can't insert datatype into list of open objects"); /* Increment object count for the object in the top file */ if (H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count"); new_dt->shared->fo_count = 1; } /* end if */ @@ -3738,7 +3738,7 @@ H5T_copy_reopen(H5T_t *old_dt) * we had been using and use the one that already exists. * Not terribly efficient. */ if (new_dt->shared->owned_vol_obj && H5VL_free_object(new_dt->shared->owned_vol_obj) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object"); new_dt->shared = H5FL_FREE(H5T_shared_t, new_dt->shared); new_dt->shared = reopened_fo; @@ -3748,12 +3748,12 @@ H5T_copy_reopen(H5T_t *old_dt) if (H5FO_top_count(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) == 0) { /* Open the object through this top file */ if (H5O_open(&old_dt->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header"); } /* end if */ /* Increment object count for the object in the top file */ if (H5FO_top_incr(old_dt->sh_loc.file, old_dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count"); } /* end else */ /* Set state for new datatype */ @@ -3766,7 +3766,7 @@ H5T_copy_reopen(H5T_t *old_dt) /* Finish making the copy of the datatype */ if (H5T__complete_copy(new_dt, old_dt, reopened_fo, TRUE, H5T_copy_reopen) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't complete datatype initialization"); /* Set return value */ ret_value = new_dt; @@ -3821,7 +3821,7 @@ H5T_lock(H5T_t *dt, hbool_t immutable) /*void*/ break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype state") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype state"); } done: @@ -3847,14 +3847,14 @@ H5T__alloc(void) /* Allocate & initialize datatype wrapper info */ if (NULL == (dt = H5FL_CALLOC(H5T_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5O_loc_reset(&(dt->oloc)); H5G_name_reset(&(dt->path)); H5O_msg_reset_share(H5O_DTYPE_ID, dt); /* Allocate & initialize shared datatype structure */ if (NULL == (dt->shared = H5FL_CALLOC(H5T_shared_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); dt->shared->version = H5O_DTYPE_VERSION_1; /* No VOL object initially */ @@ -3902,7 +3902,7 @@ H5T__free(H5T_t *dt) /* Don't free locked datatypes */ if (H5T_STATE_IMMUTABLE == dt->shared->state) - HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close immutable datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close immutable datatype"); /* Close the datatype */ switch (dt->shared->type) { @@ -3945,12 +3945,12 @@ H5T__free(H5T_t *dt) /* Close the parent */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type"); dt->shared->parent = NULL; /* Close the owned VOL object */ if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object"); dt->shared->owned_vol_obj = NULL; done: @@ -4035,7 +4035,7 @@ H5T_close(H5T_t *dt) /* Decrement the ref. count for this object in the top file */ if (H5FO_top_decr(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't decrement count for object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "can't decrement count for object"); /* Close things down if this is the last reference to the open named datatype */ if (0 == dt->shared->fo_count) { @@ -4043,17 +4043,17 @@ H5T_close(H5T_t *dt) /* Uncork cache entries with object address tag for named datatype */ if (H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status"); if (corked) if (H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__UNCORK, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTUNCORK, FAIL, "unable to uncork an object"); /* Remove the datatype from the list of opened objects in the file */ if (H5FO_delete(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, - "can't remove datatype from list of open objects") + "can't remove datatype from list of open objects"); if (H5O_close(&dt->oloc, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close data type object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close data type object header"); /* Mark named datatype closed now */ dt->shared->state = H5T_STATE_NAMED; @@ -4063,12 +4063,12 @@ H5T_close(H5T_t *dt) if (H5FO_top_count(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) == 0) { /* Close object location for named datatype */ if (H5O_close(&dt->oloc, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to close"); } /* end if */ else /* Free object location (i.e. "unhold" the file if appropriate) */ if (H5O_loc_free(&(dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "problem attempting to free location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "problem attempting to free location"); } /* end else */ } /* end if */ @@ -4835,7 +4835,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst) /* Call the internal routine, with additional parameters */ if (NULL == (ret_value = H5T__path_find_real(src, dst, NULL, &conv_func))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "can't find datatype conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "can't find datatype conversion path"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4892,10 +4892,11 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co if (0 == H5T_g.npaths) { if (NULL == (H5T_g.path = (H5T_path_t **)H5MM_malloc(128 * sizeof(H5T_path_t *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed for type conversion path table") + "memory allocation failed for type conversion path table"); H5T_g.apaths = 128; if (NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed for no-op conversion path"); HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op"); H5T_g.path[0]->conv.is_app = FALSE; H5T_g.path[0]->conv.u.lib_func = H5T__conv_noop; @@ -4959,7 +4960,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co if (!table || (table && conv->is_app && conv->u.app_func) || (table && !table->is_hard && !conv->is_app && conv->u.lib_func)) { if (NULL == (path = H5FL_CALLOC(H5T_path_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for type conversion path"); if (name && *name) { HDstrncpy(path->name, name, (size_t)H5T_NAMELEN); path->name[H5T_NAMELEN - 1] = '\0'; @@ -4967,9 +4968,9 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co else HDsnprintf(path->name, sizeof(path->name), "NONAME"); if (NULL == (path->src = H5T_copy(src, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path"); if (NULL == (path->dst = H5T_copy(dst, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path"); } /* end if */ else path = table; @@ -4985,19 +4986,19 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co 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") + "unable to register source conversion type for query"); if (path->dst && (dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, - "unable to register destination conversion type for query") + "unable to register destination conversion type for query"); path->cdata.command = H5T_CONV_INIT; if (conv->is_app) { if ((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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); } /* end if */ else if ((conv->u.lib_func)(src_id, dst_id, &(path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); if (src_id >= 0) H5I_dec_ref(src_id); if (dst_id >= 0) @@ -5021,10 +5022,10 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co continue; if ((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 src conversion type for query") + "unable to register src conversion type for query"); if ((dst_id = H5I_register(H5I_DATATYPE, H5T_copy(path->dst, H5T_COPY_ALL), FALSE)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, - "unable to register dst conversion type for query") + "unable to register dst conversion type for query"); path->cdata.command = H5T_CONV_INIT; 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, @@ -5053,7 +5054,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co src_id = dst_id = -1; } /* end for */ if (!path->conv.u.app_func) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path"); /* Check if paths were inserted into the table through a recursive call * and re-compute the correct location for this path if so. - QAK, 1/26/02 @@ -5118,7 +5119,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co H5T_path_t **x; if (NULL == (x = (H5T_path_t **)H5MM_realloc(H5T_g.path, na * sizeof(H5T_path_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); H5T_g.apaths = na; H5T_g.path = x; } /* end if */ @@ -5256,7 +5257,7 @@ H5T__compiler_conv(H5T_t *src, H5T_t *dst) /* Find it */ if (NULL == (path = H5T_path_find(src, dst))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found"); ret_value = (htri_t)path->is_hard; @@ -5300,11 +5301,11 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, size_t if (tpath->conv.is_app) { if ((tpath->conv.u.app_func)(src_id, dst_id, &(tpath->cdata), nelmts, buf_stride, bkg_stride, buf, bkg, H5CX_get_dxpl()) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); } /* end if */ else if ((tpath->conv.u.lib_func)(src_id, dst_id, &(tpath->cdata), nelmts, buf_stride, bkg_stride, buf, bkg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); #ifdef H5T_DEBUG if (H5DEBUG(T)) { /* Stop timer */ @@ -5346,14 +5347,14 @@ H5T_oloc(H5T_t *dt) case H5T_STATE_TRANSIENT: case H5T_STATE_RDONLY: case H5T_STATE_IMMUTABLE: - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype"); case H5T_STATE_NAMED: case H5T_STATE_OPEN: assert(dt->sh_loc.type == H5O_SHARE_TYPE_COMMITTED); ret_value = &dt->oloc; break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state"); } /* end switch */ done: @@ -5383,13 +5384,13 @@ H5T_nameof(H5T_t *dt) case H5T_STATE_TRANSIENT: case H5T_STATE_RDONLY: case H5T_STATE_IMMUTABLE: - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "not a named datatype"); case H5T_STATE_NAMED: case H5T_STATE_OPEN: ret_value = &(dt->path); break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "invalid datatype state"); } /* end switch */ done: @@ -5478,9 +5479,9 @@ H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f) H5O_msg_reset_share(H5O_DTYPE_ID, dt); if (H5O_loc_free(&dt->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to initialize location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to initialize location"); if (H5G_name_free(&dt->path) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to reset path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to reset path"); /* If the datatype is committed through the VOL, close it */ if (NULL != dt->vol_obj) { @@ -5488,11 +5489,11 @@ H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f) /* Close the datatype through the VOL*/ if (H5VL_datatype_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to close datatype"); /* Free the datatype and set the VOL object pointer to NULL */ if (H5VL_free_object(vol_obj) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDEC, FAIL, "unable to free VOL object"); dt->vol_obj = NULL; } /* end if */ @@ -5636,7 +5637,7 @@ H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Mark the VL, compound or array type */ if ((changed = H5T_set_loc(dt->shared->parent, file, loc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if (changed > 0) ret_value = changed; @@ -5961,7 +5962,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version) /* 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) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5994,12 +5995,12 @@ H5T_set_version(H5F_t *f, H5T_t *dt) if (vers > dt->shared->version) { /* Upgrade the format version for the datatype */ if (H5T__upgrade_version(dt, vers) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding"); } /* Version bounds check */ if (dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)]) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6092,7 +6093,7 @@ H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj) * used in the "loc" for vlens and references, so if this is being * overwritten we don't need the old one anyways. */ if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object"); /* Take ownership */ dt->shared->owned_vol_obj = vol_obj; diff --git a/src/H5Tarray.c b/src/H5Tarray.c index be3d98e..2c3d7c1 100644 --- a/src/H5Tarray.c +++ b/src/H5Tarray.c @@ -90,22 +90,22 @@ H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]) /* Check args */ if (ndims < 1 || ndims > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dimensionality") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dimensionality"); if (!dim) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no dimensions specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no dimensions specified"); for (u = 0; u < ndims; u++) if (!(dim[u] > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "zero-sized dimension specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "zero-sized dimension specified"); if (NULL == (base = (H5T_t *)H5I_object_verify(base_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an valid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an valid base datatype"); /* Create the array datatype */ if (NULL == (dt = H5T__array_create(base, ndims, dim))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype"); /* Register the type */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype"); done: if (ret_value < 0) @@ -143,12 +143,12 @@ H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]) /* Build new type */ if (NULL == (ret_value = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); ret_value->shared->type = H5T_ARRAY; /* Copy the base type of the array */ if (NULL == (ret_value->shared->parent = H5T_copy(base, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy base datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy base datatype"); /* Set the array parameters */ ret_value->shared->u.array.ndims = ndims; @@ -194,9 +194,9 @@ H5Tget_array_ndims(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (dt->shared->type != H5T_ARRAY) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype"); /* Retrieve the number of dimensions */ ret_value = H5T__get_array_ndims(dt); @@ -249,13 +249,13 @@ H5Tget_array_dims2(hid_t type_id, hsize_t dims[] /*out*/) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (dt->shared->type != H5T_ARRAY) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype"); /* Retrieve the sizes of the dimensions */ if ((ret_value = H5T__get_array_dims(dt, dims)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes"); done: FUNC_LEAVE_API(ret_value) } /* end H5Tget_array_dims2() */ @@ -322,22 +322,22 @@ H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */], /* Check args */ if (ndims < 1 || ndims > H5S_MAX_RANK) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dimensionality") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid dimensionality"); if (!dim) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no dimensions specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no dimensions specified"); for (u = 0; u < (unsigned)ndims; u++) if (!(dim[u] > 0)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "zero-sized dimension specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "zero-sized dimension specified"); if (NULL == (base = (H5T_t *)H5I_object_verify(base_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an valid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an valid base datatype"); /* Create the array datatype */ if (NULL == (dt = H5T__array_create(base, (unsigned)ndims, dim))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to create datatype"); /* Register the type */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register datatype"); done: if (ret_value < 0) @@ -368,13 +368,13 @@ H5Tget_array_dims1(hid_t type_id, hsize_t dims[] /*out*/, int H5_ATTR_UNUSED per /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object"); if (dt->shared->type != H5T_ARRAY) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype"); /* Retrieve the sizes of the dimensions */ if ((ret_value = H5T__get_array_dims(dt, dims)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Tbit.c b/src/H5Tbit.c index 18e0234..29d5347 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -188,11 +188,11 @@ H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size) /* Wrap the local buffer for serialized header info */ if (NULL == (wb = H5WB_wrap(tmp_buf, sizeof(tmp_buf)))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't wrap buffer") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough */ if (NULL == (shift_buf = (uint8_t *)H5WB_actual(wb, buf_size))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "can't get actual buffer") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "can't get actual buffer"); /* Shift vector by making copies */ if (shift_dist > 0) { /* left shift */ diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 160e45f..2973f5e 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -109,41 +109,41 @@ H5T__commit_api_common(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_is_named(dt)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed"); /* Get correct property list */ if (H5P_DEFAULT == lcpl_id) lcpl_id = H5P_LINK_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list"); /* Get correct property list */ if (H5P_DEFAULT == tcpl_id) tcpl_id = H5P_DATATYPE_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list"); /* Set the LCPL for the API context */ H5CX_set_lcpl(lcpl_id); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, TRUE, &tapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set object access arguments") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set object access arguments"); /* Commit the type */ if (NULL == (data = H5VL_datatype_commit(*vol_obj_ptr, &loc_params, name, type_id, lcpl_id, tcpl_id, tapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype"); /* Set up VOL object */ if (NULL == (new_obj = H5VL_create_object(data, (*vol_obj_ptr)->connector))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype"); /* Set the committed type object to the VOL connector pointer in the H5T_t struct */ dt->vol_obj = new_obj; @@ -173,7 +173,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t t /* Commit the dataset synchronously */ if ((ret_value = H5T__commit_api_common(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, NULL, NULL)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype synchronously") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype synchronously"); done: FUNC_LEAVE_API(ret_value) @@ -208,7 +208,7 @@ H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, h /* Commit the datatype asynchronously */ if ((ret_value = H5T__commit_api_common(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype asynchronously") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to commit datatype asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -216,7 +216,7 @@ H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, h if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE10(__func__, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -263,7 +263,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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create and link to named datatype"); assert(ocrt_info.new_obj); done: @@ -329,24 +329,24 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id) /* Check arguments */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_is_named(type)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed"); /* Get correct property list */ if (H5P_DEFAULT == tcpl_id) tcpl_id = H5P_DATATYPE_CREATE_DEFAULT; else if (TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list"); if (H5P_DEFAULT == tapl_id) tapl_id = H5P_DATATYPE_ACCESS_DEFAULT; else if (TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&tapl_id, H5P_CLS_TACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info"); /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_SELF; @@ -354,16 +354,16 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id) /* Get the file object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier"); /* Commit the datatype */ if (NULL == (dt = H5VL_datatype_commit(vol_obj, &loc_params, NULL, type_id, H5P_LINK_CREATE_DEFAULT, tcpl_id, tapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype"); /* Setup VOL object */ if (NULL == (new_obj = H5VL_create_object(dt, vol_obj->connector))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype"); /* Set the committed type object to the VOL connector pointer in the H5T_t struct */ type->vol_obj = new_obj; @@ -396,17 +396,17 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id) /* Commit the type */ if (H5T__commit(file, type, tcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype"); /* Release the datatype's object header */ /* Get the new committed datatype's object location */ if (NULL == (oloc = H5T_oloc(type))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get object location of committed datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get object location of committed datatype"); /* Decrement refcount on committed datatype's object header in memory */ if (H5O_dec_rc_by_loc(oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -439,7 +439,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id) /* Check if we are allowed to write to this file */ if (0 == (H5F_INTENT(file) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "no write intent on file"); /* * Check arguments. We cannot commit an immutable type because H5Tclose() @@ -447,30 +447,30 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id) * a named type should always succeed. */ if (H5T_STATE_NAMED == type->shared->state || H5T_STATE_OPEN == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is already committed"); if (H5T_STATE_IMMUTABLE == type->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is immutable") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is immutable"); /* Check for a "sensible" datatype to store on disk */ if (H5T_is_sensible(type) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datatype is not sensible") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datatype is not sensible"); /* Mark datatype as being on disk now. This step changes the size of * datatype as stored on disk. */ if (H5T_set_loc(type, H5F_VOL_OBJ(file), H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype on disk"); /* Reset datatype location and path */ if (H5O_loc_reset(&temp_oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize location") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize location"); if (H5G_name_reset(&temp_path) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize path") + HGOTO_ERROR(H5E_SYM, H5E_CANTRESET, FAIL, "unable to initialize path"); loc_init = TRUE; /* Set the version for datatype */ if (H5T_set_version(file, type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set version of datatype"); /* Calculate message size information, for creating object header */ dtype_size = H5O_msg_size_f(file, tcpl_id, H5O_DTYPE_ID, type, (size_t)0); @@ -481,16 +481,16 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id) * type message and then give the object header a name. */ if (H5O_create(file, dtype_size, (size_t)1, tcpl_id, &temp_oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create datatype object header"); if (H5O_msg_create(&temp_oloc, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT | H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, type) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to update type header message"); /* Copy the new object header's location into the datatype, taking ownership of it */ if (H5O_loc_copy_shallow(&(type->oloc), &temp_oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location"); if (H5G_name_copy(&(type->path), &temp_path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy datatype location"); loc_init = FALSE; /* Set the shared info fields */ @@ -500,15 +500,15 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id) /* Add datatype to the list of open objects in the file */ if (H5FO_top_incr(type->sh_loc.file, type->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, FAIL, "can't incr object ref. count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, FAIL, "can't incr object ref. count"); if (H5FO_insert(type->sh_loc.file, type->sh_loc.u.loc.oh_addr, type->shared, TRUE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert datatype into list of open objects") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert datatype into list of open objects"); /* Mark datatype as being on memory again. Since this datatype may still be * used in memory after committed to disk, change its size back as in memory. */ if (H5T_set_loc(type, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype in memory") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "cannot mark datatype in memory"); done: if (ret_value < 0) { @@ -552,7 +552,7 @@ H5Tcommitted(hid_t type_id) /* Check arguments */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Set return value */ ret_value = H5T_is_named(type); @@ -584,7 +584,7 @@ H5T_link(const H5T_t *type, int adjust) /* Adjust the link count on the named datatype */ if ((ret_value = H5O_link(&type->oloc, adjust)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_LINKCOUNT, (-1), "unable to adjust named datatype link count") + HGOTO_ERROR(H5E_DATATYPE, H5E_LINKCOUNT, (-1), "unable to adjust named datatype link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -616,22 +616,22 @@ H5T__open_api_common(hid_t loc_id, const char *name, hid_t tapl_id, void **token /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string"); /* Set up object access arguments */ if (H5VL_setup_acc_args(loc_id, H5P_CLS_TACC, FALSE, &tapl_id, vol_obj_ptr, &loc_params) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments"); /* Open the datatype */ if (NULL == (dt = H5VL_datatype_open(*vol_obj_ptr, &loc_params, name, tapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype"); /* Register the type and return the ID */ if ((ret_value = H5VL_register(H5I_DATATYPE, dt, (*vol_obj_ptr)->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype"); done: /* Cleanup on error */ @@ -665,7 +665,7 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id) /* Open the datatype synchronously */ if ((ret_value = H5T__open_api_common(loc_id, name, tapl_id, NULL, NULL)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, - "unable to open named datatype synchronously") + "unable to open named datatype synchronously"); done: FUNC_LEAVE_API(ret_value) } /* end H5Topen2() */ @@ -700,7 +700,7 @@ H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* Open the datatype asynchronously */ if ((ret_value = H5T__open_api_common(loc_id, name, tapl_id, token_ptr, &vol_obj)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, - "unable to open named datatype asynchronously") + "unable to open named datatype asynchronously"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -710,8 +710,8 @@ H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, H5I_INVALID_HID, - "can't decrement count on datatype ID") - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") + "can't decrement count on datatype ID"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set"); } /* end if */ done: @@ -746,11 +746,11 @@ H5Tget_create_plist(hid_t dtype_id) /* Check arguments */ if (NULL == (type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype"); /* Check if the datatype is committed */ if (FAIL == (is_named = H5T_is_named(type))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't check whether datatype is committed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't check whether datatype is committed"); /* If the datatype is not committed/named, just copy the default * creation property list and return that. @@ -760,10 +760,10 @@ H5Tget_create_plist(hid_t dtype_id) /* Copy the default datatype creation property list */ if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list"); if ((ret_value = H5P_copy_plist(tcpl_plist, TRUE)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, - "unable to copy the creation property list") + "unable to copy the creation property list"); } /* end if */ /* If the datatype is committed, retrieve further information */ else { @@ -776,7 +776,7 @@ H5Tget_create_plist(hid_t dtype_id) /* Get the property list through the VOL */ if (H5VL_datatype_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info"); /* Set return value */ ret_value = vol_cb_args.args.get_tcpl.tcpl_id; @@ -806,9 +806,9 @@ H5Tflush(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (!H5T_is_named(dt)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a committed datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a committed datatype"); /* Flush metadata for named datatype */ if (dt->vol_obj) { @@ -816,14 +816,14 @@ H5Tflush(hid_t type_id) /* Set up collective metadata if appropriate */ if (H5CX_set_loc(type_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATATYPE_FLUSH; vol_cb_args.args.flush.type_id = type_id; if (H5VL_datatype_specific(dt->vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype"); } done: @@ -850,9 +850,9 @@ H5Trefresh(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (!H5T_is_named(dt)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a committed datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a committed datatype"); /* Refresh the datatype's metadata */ if (dt->vol_obj) { @@ -860,14 +860,14 @@ H5Trefresh(hid_t type_id) /* Set up collective metadata if appropriate */ if (H5CX_set_loc(type_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATATYPE_REFRESH; vol_cb_args.args.refresh.type_id = type_id; if (H5VL_datatype_specific(dt->vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype"); } done: @@ -905,17 +905,17 @@ H5T__get_create_plist(const H5T_t *type) /* Copy the default datatype creation property list */ if (NULL == (tcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_DATATYPE_CREATE_ID_g))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get default creation property list"); if ((new_tcpl_id = H5P_copy_plist(tcpl_plist, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list"); /* Get property list object for new TCPL */ if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_tcpl_id))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list"); /* Retrieve any object creation properties */ if (H5O_get_create_plist(&type->oloc, new_plist) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info"); /* Set the return value */ ret_value = new_tcpl_id; @@ -966,18 +966,18 @@ H5T__open_name(const H5G_loc_t *loc, const char *name) * from it. */ if (H5G_loc_find(loc, name, &type_loc /*out*/) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found"); obj_found = TRUE; /* Check that the object found is the correct type */ if (H5O_obj_type(&oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "can't get object type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, NULL, "can't get object type"); if (obj_type != H5O_TYPE_NAMED_DATATYPE) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "not a named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, NULL, "not a named datatype"); /* Open it */ if (NULL == (dt = H5T_open(&type_loc))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype"); ret_value = dt; @@ -1020,44 +1020,45 @@ H5T_open(const H5G_loc_t *loc) /* Open the datatype object */ if (NULL == (dt = H5T__open_oid(loc))) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found"); /* Add the datatype to the list of opened objects in the file */ if (H5FO_insert(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr, dt->shared, FALSE) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL, "can't insert datatype into list of open objects") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, NULL, + "can't insert datatype into list of open objects"); /* Increment object count for the object in the top file */ if (H5FO_top_incr(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count"); /* Mark any datatypes as being in memory now */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location"); dt->shared->fo_count = 1; } /* end if */ else { if (NULL == (dt = H5FL_MALLOC(H5T_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for datatype") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for datatype"); dt->vol_obj = NULL; #if defined(H5_USING_MEMCHECKER) || !defined(NDEBUG) /* Clear object location */ if (H5O_loc_reset(&(dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reset location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reset location"); /* Clear path name */ if (H5G_name_reset(&(dt->path)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reset path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to reset path"); #endif /* H5_USING_MEMCHECKER */ /* Shallow copy (take ownership) of the object location object */ if (H5O_loc_copy_shallow(&dt->oloc, loc->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location"); /* Shallow copy (take ownership) of the group hier. path */ if (H5G_name_copy(&(dt->path), loc->path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy path"); /* Set the shared component info */ H5T_update_shared(dt); @@ -1067,7 +1068,7 @@ H5T_open(const H5G_loc_t *loc) /* Mark any datatypes as being in memory now */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location"); /* Increment ref. count on shared info */ shared_fo->fo_count++; @@ -1076,12 +1077,12 @@ H5T_open(const H5G_loc_t *loc) if (H5FO_top_count(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) == 0) { /* Open the object through this top file */ if (H5O_open(&(dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open object header"); } /* end if */ /* Increment object count for the object in the top file */ if (H5FO_top_incr(dt->sh_loc.file, dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, NULL, "can't increment object count"); } /* end else */ ret_value = dt; @@ -1131,22 +1132,22 @@ H5T__open_oid(const H5G_loc_t *loc) /* Open named datatype object in file */ if (H5O_open(loc->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype"); /* Deserialize the datatype message into a datatype in memory */ if (NULL == (dt = (H5T_t *)H5O_msg_read(loc->oloc, H5O_DTYPE_ID, NULL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to load type message from object header") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to load type message from object header"); /* Mark the type as named and open */ dt->shared->state = H5T_STATE_OPEN; /* Shallow copy (take ownership) of the object location object */ if (H5O_loc_copy_shallow(&dt->oloc, loc->oloc) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy object location"); /* Shallow copy (take ownership) of the group hier. path */ if (H5G_name_copy(&(dt->path), loc->path, H5_COPY_SHALLOW) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy path") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy path"); /* Set the shared component info */ H5T_update_shared(dt); @@ -1211,11 +1212,11 @@ H5T_construct_datatype(H5VL_object_t *vol_obj) /* Get required buf size for encoding the datatype */ if (H5VL_datatype_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to get datatype serialized size") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to get datatype serialized size"); /* Allocate buffer to store binary description of the datatype */ if (NULL == (buf = (void *)H5MM_calloc(nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for datatype") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for datatype"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_DATATYPE_GET_BINARY; @@ -1224,11 +1225,11 @@ H5T_construct_datatype(H5VL_object_t *vol_obj) /* get binary description of the datatype */ if (H5VL_datatype_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to get serialized datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to get serialized datatype"); /* Construct datatype, from serialized form in buffer */ if (NULL == (dt = H5T_decode(nalloc, buf))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't decode datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "can't decode datatype"); dt->vol_obj = vol_obj; /* Set return value */ @@ -1313,17 +1314,17 @@ H5T_save_refresh_state(hid_t tid, H5O_shared_t *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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not a datatype ID"); vol_dt = H5T_get_actual_type(dt); if (NULL == vol_dt) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID"); /* Increase the count on the file object */ vol_dt->shared->fo_count += 1; /* Increment object count for the object in the top file */ if (H5FO_top_incr(vol_dt->sh_loc.file, vol_dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, FAIL, "can't increment object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINC, FAIL, "can't increment object count"); /* Cache the H5O_shared_t data */ H5MM_memcpy(cached_H5O_shared, &(vol_dt->sh_loc), sizeof(H5O_shared_t)); @@ -1353,17 +1354,17 @@ H5T_restore_refresh_state(hid_t tid, H5O_shared_t *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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid not a datatype ID"); vol_dt = H5T_get_actual_type(dt); if (NULL == vol_dt) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "tid is not not a named datatype ID"); /* Restore the H5O_shared_t data */ H5MM_memcpy(&(vol_dt->sh_loc), cached_H5O_shared, sizeof(H5O_shared_t)); /* Decrement the ref. count for this object in the top file */ if (H5FO_top_decr(vol_dt->sh_loc.file, vol_dt->sh_loc.u.loc.oh_addr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "can't decrement object count") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "can't decrement object count"); /* Decrease the count on the file object */ vol_dt->shared->fo_count -= 1; @@ -1412,12 +1413,12 @@ H5T_invoke_vol_optional(H5T_t *dt, H5VL_optional_args_t *args, hid_t dxpl_id, vo /* Check that datatype is committed */ if (!H5T_is_named(dt)) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a committed datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a committed datatype"); /* Only invoke callback if VOL object is set for the datatype */ if (dt->vol_obj) if (H5VL_datatype_optional_op(dt->vol_obj, args, dxpl_id, req, vol_obj_ptr) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c index b1652c4..725525b 100644 --- a/src/H5Tcompound.c +++ b/src/H5Tcompound.c @@ -92,9 +92,9 @@ H5Tget_member_offset(hid_t type_id, unsigned membno) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_COMPOUND != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a compound datatype"); if (membno >= dt->shared->u.compnd.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid member number"); /* Value */ ret_value = H5T_GET_MEMBER_OFFSET(dt->shared, membno); @@ -152,9 +152,9 @@ H5Tget_member_class(hid_t type_id, unsigned membno) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_COMPOUND != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a compound datatype"); if (membno >= dt->shared->u.compnd.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5T_NO_CLASS, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5T_NO_CLASS, "invalid member number"); /* Get the type's class. We have to use this function to get type class * because of the concern of variable-length string. @@ -192,17 +192,17 @@ H5Tget_member_type(hid_t type_id, unsigned membno) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_COMPOUND != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a compound datatype"); if (membno >= dt->shared->u.compnd.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid member number"); /* Retrieve the datatype for the member */ if (NULL == (memb_dt = H5T__reopen_member_type(dt, membno))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to retrieve member type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5I_INVALID_HID, "unable to retrieve member type"); /* Get an ID for the datatype */ if ((ret_value = H5I_register(H5I_DATATYPE, memb_dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable register datatype ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable register datatype ID"); done: if (ret_value < 0) @@ -238,7 +238,7 @@ H5T_get_member_type(const H5T_t *dt, unsigned membno) /* Copy datatype */ if (NULL == (ret_value = H5T_copy(dt->shared->u.compnd.memb[membno].type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy member datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy member datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -271,7 +271,7 @@ H5T__reopen_member_type(const H5T_t *dt, unsigned membno) /* Copy datatype, possibly re-opening it */ if (NULL == (ret_value = H5T_copy_reopen(dt->shared->u.compnd.memb[membno].type))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to reopen member datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to reopen member datatype"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -329,20 +329,20 @@ H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id) /* Check args */ if (parent_id == member_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't insert compound datatype within itself") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't insert compound datatype within itself"); if (NULL == (parent = (H5T_t *)H5I_object_verify(parent_id, H5I_DATATYPE)) || H5T_COMPOUND != parent->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype"); if (H5T_STATE_TRANSIENT != parent->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "parent type read-only") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "parent type read-only"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no member name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no member name"); if (NULL == (member = (H5T_t *)H5I_object_verify(member_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Insert */ if (H5T__insert(parent, name, offset, member) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "unable to insert member") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "unable to insert member"); done: FUNC_LEAVE_API(ret_value) @@ -370,11 +370,11 @@ H5Tpack(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_detect_class(dt, H5T_COMPOUND, TRUE) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype"); /* Pack */ if (H5T__pack(dt) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack compound datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack compound datatype"); done: FUNC_LEAVE_API(ret_value) @@ -411,7 +411,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) /* Does NAME already exist in PARENT? */ for (i = 0; i < parent->shared->u.compnd.nmembs; i++) if (!HDstrcmp(parent->shared->u.compnd.memb[i].name, name)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member name is not unique") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member name is not unique"); /* Does the new member overlap any existing member ? */ total_size = member->shared->size; @@ -420,11 +420,11 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) (offset + total_size) > parent->shared->u.compnd.memb[i].offset) || (parent->shared->u.compnd.memb[i].offset <= offset && (parent->shared->u.compnd.memb[i].offset + parent->shared->u.compnd.memb[i].size) > offset)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member overlaps with another member") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member overlaps with another member"); /* Does the new member overlap the end of the compound type? */ if ((offset + total_size) > parent->shared->size) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member extends past end of compound type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member extends past end of compound type"); /* Increase member array if necessary */ if (parent->shared->u.compnd.nmembs >= parent->shared->u.compnd.nalloc) { @@ -432,7 +432,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) H5T_cmemb_t *x = (H5T_cmemb_t *)H5MM_realloc(parent->shared->u.compnd.memb, na * sizeof(H5T_cmemb_t)); if (!x) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed"); parent->shared->u.compnd.nalloc = na; parent->shared->u.compnd.memb = x; } /* end if */ @@ -442,9 +442,9 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) parent->shared->u.compnd.memb[idx].offset = offset; parent->shared->u.compnd.memb[idx].size = total_size; if (NULL == (parent->shared->u.compnd.memb[idx].name = H5MM_xstrdup(name))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "couldn't duplicate name string") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "couldn't duplicate name string"); if (NULL == (parent->shared->u.compnd.memb[idx].type = H5T_copy(member, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "couldn't copy datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "couldn't copy datatype"); parent->shared->u.compnd.sorted = H5T_SORT_NONE; parent->shared->u.compnd.nmembs++; @@ -468,7 +468,7 @@ H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) * more efficient, so might as well upgrade all members also... -QAK) */ if (H5T__upgrade_version(parent, member->shared->version) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade member encoding version") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade member encoding version"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -500,11 +500,11 @@ H5T__pack(const H5T_t *dt) /* Check for packing unmodifiable datatype */ if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "datatype is read-only"); if (dt->shared->parent) { if (H5T__pack(dt->shared->parent) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack parent of datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to pack parent of datatype"); /* Adjust size of datatype appropriately */ if (dt->shared->type == H5T_ARRAY) @@ -520,7 +520,7 @@ H5T__pack(const H5T_t *dt) for (i = 0; i < dt->shared->u.compnd.nmembs; i++) { if (H5T__pack(dt->shared->u.compnd.memb[i].type) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to pack part of a compound datatype") + "unable to pack part of a compound datatype"); /* Update the member size */ dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].type)->shared->size; @@ -528,7 +528,7 @@ H5T__pack(const H5T_t *dt) /* Remove padding between members */ if (H5T__sort_value(dt, NULL) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed"); for (i = 0, offset = 0; i < dt->shared->u.compnd.nmembs; i++) { dt->shared->u.compnd.memb[i].offset = offset; offset += dt->shared->u.compnd.memb[i].size; diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 547147c..f6b9b91 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -191,7 +191,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else if (*(S) < (ST)(D_MIN)) { \ @@ -201,7 +201,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MIN); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -228,7 +228,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -258,7 +258,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = 0; \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -319,7 +319,7 @@ /* Let compiler convert if case is ignored by user handler */ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if (except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -381,7 +381,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = 0; \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else if (sizeof(ST) > sizeof(DT) && *(S) > (ST)(D_MAX)) { \ @@ -391,7 +391,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -435,7 +435,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = 0; \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -466,7 +466,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -505,7 +505,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = H5_GLUE3(H5T_NATIVE_, DTYPE, _POS_INF_g); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else if (*(S) < (ST)(D_MIN)) { \ @@ -515,7 +515,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = H5_GLUE3(H5T_NATIVE_, DTYPE, _NEG_INF_g); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -613,7 +613,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(*(S)); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -649,7 +649,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MAX); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else if (*(S) < (ST)(D_MIN)) { \ @@ -659,7 +659,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(D_MIN); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else if (*(S) != (ST)((DT)(*(S)))) { \ @@ -669,7 +669,7 @@ /* Let compiler convert if case is ignored by user handler*/ \ *(D) = (DT)(*(S)); \ else if (except_ret == H5T_CONV_ABORT) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); \ /* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \ } \ else \ @@ -730,9 +730,9 @@ if (NULL == (st = (H5T_t *)H5I_object(src_id)) || \ NULL == (dt = (H5T_t *)H5I_object(dst_id))) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ - "unable to dereference datatype object ID") \ + "unable to dereference datatype object ID"); \ if (st->shared->size != sizeof(ST) || dt->shared->size != sizeof(DT)) \ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "disagreement about datatype size") \ + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "disagreement about datatype size"); \ CI_ALLOC_PRIV \ break; \ \ @@ -769,13 +769,13 @@ /* Get conversion exception callback property */ \ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, \ - "unable to get conversion exception callback") \ + "unable to get conversion exception callback"); \ \ /* Get source and destination datatypes */ \ if (NULL == (st = (H5T_t *)H5I_object(src_id)) || \ NULL == (dt = (H5T_t *)H5I_object(dst_id))) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \ - "unable to dereference datatype object ID") \ + "unable to dereference datatype object ID"); \ \ H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \ \ @@ -1145,7 +1145,7 @@ H5T__conv_noop(hid_t H5_ATTR_UNUSED src_id, hid_t H5_ATTR_UNUSED dst_id, H5T_cda break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -1181,21 +1181,21 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt case H5T_CONV_INIT: /* Capability query */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (src->shared->size != dst->shared->size || 0 != src->shared->u.atomic.offset || 0 != dst->shared->u.atomic.offset) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); if ((src->shared->type == H5T_REFERENCE && dst->shared->type != H5T_REFERENCE) || (dst->shared->type == H5T_REFERENCE && src->shared->type != H5T_REFERENCE)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); if (src->shared->type != H5T_REFERENCE && !((H5T_ORDER_BE == src->shared->u.atomic.order && H5T_ORDER_LE == dst->shared->u.atomic.order) || (H5T_ORDER_LE == src->shared->u.atomic.order && H5T_ORDER_BE == dst->shared->u.atomic.order))) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); if (src->shared->size != 1 && src->shared->size != 2 && src->shared->size != 4 && src->shared->size != 8 && src->shared->size != 16) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); switch (src->shared->type) { case H5T_INTEGER: case H5T_BITFIELD: @@ -1212,7 +1212,7 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt src->shared->u.atomic.u.f.msize != dst->shared->u.atomic.u.f.msize || src->shared->u.atomic.u.f.norm != dst->shared->u.atomic.u.f.norm || src->shared->u.atomic.u.f.pad != dst->shared->u.atomic.u.f.pad) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); break; case H5T_NO_CLASS: @@ -1225,7 +1225,7 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); } cdata->need_bkg = H5T_BKG_NO; break; @@ -1233,13 +1233,13 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt case H5T_CONV_CONV: /* The conversion */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Check for "no op" reference conversion */ if (src->shared->type == H5T_REFERENCE) { /* Sanity check */ if (dst->shared->type != H5T_REFERENCE) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype"); /* Check if we are on a little-endian machine (the order that * the addresses in the file must be) and just get out now, there @@ -1543,7 +1543,7 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "invalid conversion size") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "invalid conversion size"); } /* end switch */ break; @@ -1552,7 +1552,7 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -1588,14 +1588,14 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s case H5T_CONV_INIT: /* Capability query */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (src->shared->size != dst->shared->size || 0 != src->shared->u.atomic.offset || 0 != dst->shared->u.atomic.offset || !((H5T_ORDER_BE == src->shared->u.atomic.order && H5T_ORDER_LE == dst->shared->u.atomic.order) || (H5T_ORDER_LE == src->shared->u.atomic.order && H5T_ORDER_BE == dst->shared->u.atomic.order))) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); switch (src->shared->type) { case H5T_INTEGER: case H5T_BITFIELD: @@ -1611,7 +1611,7 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s src->shared->u.atomic.u.f.msize != dst->shared->u.atomic.u.f.msize || src->shared->u.atomic.u.f.norm != dst->shared->u.atomic.u.f.norm || src->shared->u.atomic.u.f.pad != dst->shared->u.atomic.u.f.pad) { - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); } /* end if */ break; @@ -1626,7 +1626,7 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion not supported"); } /* end switch */ cdata->need_bkg = H5T_BKG_NO; break; @@ -1634,7 +1634,7 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s case H5T_CONV_CONV: /* The conversion */ if (NULL == (src = (H5T_t *)H5I_object(src_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); buf_stride = buf_stride ? buf_stride : src->shared->size; md = src->shared->size / 2; @@ -1648,7 +1648,7 @@ H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -1690,11 +1690,11 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_INIT: /* Capability query */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_ORDER_LE != src->shared->u.atomic.order && H5T_ORDER_BE != src->shared->u.atomic.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (H5T_ORDER_LE != dst->shared->u.atomic.order && H5T_ORDER_BE != dst->shared->u.atomic.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); cdata->need_bkg = H5T_BKG_NO; break; @@ -1704,7 +1704,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_CONV: /* Get the datatypes */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* * Do we process the values from beginning to end or vice versa? Also, @@ -1735,7 +1735,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); /* Allocate space for order-reversed source buffer */ src_rev = (uint8_t *)H5MM_calloc(src->shared->size); @@ -1805,7 +1805,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz dst->shared->u.atomic.prec); } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it*/ reverse = FALSE; @@ -1833,7 +1833,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_PAD_BACKGROUND: case H5T_NPAD: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported LSB padding") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported LSB padding"); } /* end switch */ msb_pad_offset = dst->shared->u.atomic.offset + dst->shared->u.atomic.prec; switch (dst->shared->u.atomic.msb_pad) { @@ -1849,7 +1849,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_PAD_BACKGROUND: case H5T_NPAD: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported MSB padding") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported MSB padding"); } /* end switch */ /* @@ -1890,7 +1890,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -2001,7 +2001,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) NULL == (priv->src2dst = (int *)H5MM_malloc(src_nmembs * sizeof(int))) || NULL == (priv->src_memb_id = (hid_t *)H5MM_malloc(src_nmembs * sizeof(hid_t))) || NULL == (priv->dst_memb_id = (hid_t *)H5MM_malloc(dst_nmembs * sizeof(hid_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); src2dst = priv->src2dst; priv->src_nmembs = src_nmembs; @@ -2062,7 +2062,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) H5MM_xfree(priv->memb_path); if (NULL == (priv->memb_path = (H5T_path_t **)H5MM_malloc(src->shared->u.compnd.nmembs * sizeof(H5T_path_t *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); for (i = 0; i < src_nmembs; i++) { if (src2dst[i] >= 0) { @@ -2071,7 +2071,7 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) if (NULL == (priv->memb_path[i] = tpath)) { cdata->priv = H5T__conv_struct_free(priv); - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert member datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert member datatype"); } /* end if */ } /* end if */ } /* end for */ @@ -2223,14 +2223,14 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * that remains (almost) constant for this conversion path. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_COMPOUND != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype"); if (H5T_COMPOUND != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype"); if (H5T__conv_struct_init(src, dst, cdata) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); break; case H5T_CONV_FREE: @@ -2245,12 +2245,12 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Conversion. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); /* * Insure that members are sorted. @@ -2305,7 +2305,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, (size_t)0, /*no striding (packed array)*/ xbuf + src_memb->offset, xbkg + dst_memb->offset) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert compound datatype member") + "unable to convert compound datatype member"); memmove(xbuf + offset, xbuf + src_memb->offset, dst_memb->size); offset += dst_memb->size; } /* end if */ @@ -2336,7 +2336,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, (size_t)0, /*no striding (packed array)*/ xbuf + offset, xbkg + dst_memb->offset) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert compound datatype member") + "unable to convert compound datatype member"); } /* end if */ else offset -= dst_memb->size; @@ -2368,7 +2368,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -2448,15 +2448,15 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * that remains (almost) constant for this conversion path. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_COMPOUND != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype"); if (H5T_COMPOUND != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype"); /* Initialize data which is relatively constant */ if (H5T__conv_struct_init(src, dst, cdata) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); priv = (H5T_conv_struct_t *)(cdata->priv); src2dst = priv->src2dst; @@ -2490,7 +2490,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm if (dst_memb->size > src->shared->size - offset) { cdata->priv = H5T__conv_struct_free(priv); HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "conversion is unsupported by this function") + "conversion is unsupported by this function"); } /* end if */ } /* end if */ } /* end for */ @@ -2509,11 +2509,11 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * Conversion. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Update cached data if necessary */ if (cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); priv = (H5T_conv_struct_t *)(cdata->priv); assert(priv); src2dst = priv->src2dst; @@ -2579,7 +2579,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm priv->dst_memb_id[src2dst[u]], nelmts, buf_stride, bkg_stride, xbuf, xbkg) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert compound datatype member") + "unable to convert compound datatype member"); for (elmtno = 0; elmtno < nelmts; elmtno++) { memmove(xbkg, xbuf, dst_memb->size); xbuf += buf_stride; @@ -2616,7 +2616,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm priv->dst_memb_id[src2dst[i]], nelmts, buf_stride, bkg_stride, xbuf, xbkg) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert compound datatype member") + "unable to convert compound datatype member"); for (elmtno = 0; elmtno < nelmts; elmtno++) { memmove(xbkg, xbuf, dst_memb->size); xbuf += buf_stride; @@ -2639,7 +2639,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -2672,7 +2672,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) cdata->need_bkg = H5T_BKG_NO; if (NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (0 == src->shared->u.enumer.nmembs) HGOTO_DONE(SUCCEED); @@ -2684,14 +2684,14 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) H5T__sort_name(src, NULL); H5T__sort_name(dst, NULL); if (NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); for (i = 0, j = 0; i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs; i++, j++) { while (j < dst->shared->u.enumer.nmembs && HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]) != 0) j++; if (j >= dst->shared->u.enumer.nmembs) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "source type is not a subset of destination type") + "source type is not a subset of destination type"); priv->src2dst[i] = (int)j; } /* end for */ @@ -2745,7 +2745,7 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) priv->base = domain[0]; priv->length = length; if (NULL == (map = (int *)H5MM_malloc(length * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); for (i = 0; i < length; i++) map[i] = -1; /*entry unused*/ for (i = 0; i < src->shared->u.enumer.nmembs; i++) { @@ -2823,14 +2823,14 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si * integer conversion. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_ENUM != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); if (H5T_ENUM != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); if (H5T__conv_enum_init(src, dst, cdata) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data"); break; case H5T_CONV_FREE: @@ -2849,11 +2849,11 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si case H5T_CONV_CONV: 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_ENUM != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); if (H5T_ENUM != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); /* priv->src2dst map was computed for certain sort keys. Make sure those same * sort keys are used here during conversion. See H5T__conv_enum_init(). But @@ -2887,7 +2887,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); for (i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) { if (priv->length) { @@ -2917,7 +2917,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si 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") + "can't handle conversion exception"); } else H5MM_memcpy(d, @@ -2954,7 +2954,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si 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") + "can't handle conversion exception"); } /* end if */ else { assert(priv->src2dst[md] >= 0); @@ -2970,7 +2970,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -3011,11 +3011,11 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * path SRC_ID->DST_ID. If not, return failure. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_ENUM != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "source type is not a H5T_ENUM datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "source type is not a H5T_ENUM datatype"); if (H5T_INTEGER != dst->shared->type && H5T_FLOAT != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "destination is not an integer type") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "destination is not an integer type"); cdata->need_bkg = H5T_BKG_NO; break; @@ -3025,29 +3025,29 @@ H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne case H5T_CONV_CONV: 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src_parent = src->shared->parent; if (NULL == (tpath = H5T_path_find(src_parent, dst))) { HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dest datatype") + "unable to convert between src and dest datatype"); } else if (!H5T_path_noop(tpath)) { if ((src_parent_id = H5I_register(H5I_DATATYPE, H5T_copy(src_parent, H5T_COPY_ALL), FALSE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, - "unable to register types for conversion") + "unable to register types for conversion"); /* Convert the data */ if (H5T_convert(tpath, src_parent_id, dst_id, nelmts, buf_stride, bkg_stride, _buf, bkg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); } break; default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -3119,17 +3119,17 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si * conversion path. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_VLEN != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype"); if (H5T_VLEN != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype"); if (H5T_VLEN_STRING == src->shared->u.vlen.type && H5T_VLEN_STRING == dst->shared->u.vlen.type) { if ((H5T_CSET_ASCII == src->shared->u.vlen.cset && H5T_CSET_UTF8 == dst->shared->u.vlen.cset) || (H5T_CSET_ASCII == dst->shared->u.vlen.cset && H5T_CSET_UTF8 == src->shared->u.vlen.cset)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "The library doesn't convert between strings of ASCII and UTF") + "The library doesn't convert between strings of ASCII and UTF"); } /* end if */ /* Variable-length types don't need a background buffer */ @@ -3146,7 +3146,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si * Conversion. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Initialize source & destination strides */ if (buf_stride) { @@ -3177,19 +3177,19 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Set up conversion path for base elements */ if (NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent))) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dest datatypes") + "unable to convert between src and dest datatypes"); else if (!H5T_path_noop(tpath)) { H5T_t *tsrc_cpy = NULL, *tdst_cpy = NULL; if (NULL == (tsrc_cpy = H5T_copy(src->shared->parent, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion"); /* References need to know about the src file */ if (tsrc_cpy->shared->type == H5T_REFERENCE) if (H5T_set_loc(tsrc_cpy, src->shared->u.vlen.file, src->shared->u.vlen.loc) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location"); if (NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion"); /* References need to know about the dst file */ if (tdst_cpy->shared->type == H5T_REFERENCE) if (H5T_set_loc(tdst_cpy, dst->shared->u.vlen.file, dst->shared->u.vlen.loc) < 0) @@ -3198,7 +3198,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) || ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, FALSE)) < 0)) HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, - "unable to register types for conversion") + "unable to register types for conversion"); } /* end else-if */ else noop_conv = TRUE; @@ -3206,18 +3206,18 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Check if we need a temporary buffer for this conversion */ if ((parent_is_vlen = H5T_detect_class(dst->shared->parent, H5T_VLEN, FALSE)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_SYSTEM, FAIL, - "internal error when detecting variable-length class") + "internal error when detecting variable-length class"); if (tpath->cdata.need_bkg || parent_is_vlen) { /* Set up initial background buffer */ tmp_buf_size = MAX(src_base_size, dst_base_size); if (NULL == (tmp_buf = H5FL_BLK_CALLOC(vlen_seq, tmp_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); } /* end if */ /* Get the allocation info */ if (H5CX_get_vlen_alloc_info(&vl_alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info"); /* Set flags to indicate we are writing to or reading from the file */ if (dst->shared->u.vlen.file != NULL) @@ -3275,25 +3275,25 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Check for "nil" source sequence */ if ((*(src->shared->u.vlen.cls->isnull))(src->shared->u.vlen.file, s, &is_nil) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check if VL data is 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check if VL data is 'nil'"); else if (is_nil) { /* Write "nil" sequence to destination location */ if ((*(dst->shared->u.vlen.cls->setnull))(dst->shared->u.vlen.file, d, b) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'"); } /* end else-if */ else { size_t seq_len; /* The number of elements in the current sequence */ /* Get length of element sequences */ if ((*(src->shared->u.vlen.cls->getlen))(src->shared->u.vlen.file, s, &seq_len) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length"); /* If we are reading from memory and there is no conversion, just get the pointer to * sequence */ if (write_to_file && noop_conv) { /* Get direct pointer to sequence */ if (NULL == (conv_buf = (*(src->shared->u.vlen.cls->getptr))(s))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer"); } /* end if */ else { size_t src_size, dst_size; /*source & destination total size in bytes*/ @@ -3308,7 +3308,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE; if (NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); } /* end if */ else if (conv_buf_size < MAX(src_size, dst_size)) { /* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */ @@ -3316,14 +3316,14 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si H5T_VLEN_MIN_CONF_BUF_SIZE; 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") + "memory allocation failed for type conversion"); memset(conv_buf, 0, conv_buf_size); } /* end else-if */ /* Read in VL sequence */ if ((*(src->shared->u.vlen.cls->read))(src->shared->u.vlen.file, s, conv_buf, src_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data") + HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data"); } /* end else */ if (!noop_conv) { @@ -3334,7 +3334,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si tmp_buf_size = conv_buf_size; 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") + "memory allocation failed for type conversion"); memset(tmp_buf, 0, tmp_buf_size); } /* end if */ @@ -3347,7 +3347,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Get length of background element sequence */ if ((*(dst->shared->u.vlen.cls->getlen))(dst->shared->u.vlen.file, b, &bg_seq_len) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length"); /* Read sequence if length > 0 */ if (bg_seq_len > 0) { @@ -3356,7 +3356,7 @@ 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") + "memory allocation failed for type conversion"); memset(tmp_buf, 0, tmp_buf_size); } /* end if */ @@ -3364,7 +3364,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si if ((*(dst->shared->u.vlen.cls->read))(dst->shared->u.vlen.file, b, tmp_buf, bg_seq_len * dst_base_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data") + HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data"); } /* end if */ /* If the sequence gets shorter, pad out the original sequence with zeros */ @@ -3376,13 +3376,13 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Convert VL sequence */ if (H5T_convert(tpath, tsrc_id, tdst_id, seq_len, (size_t)0, (size_t)0, conv_buf, tmp_buf) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); } /* end if */ /* Write sequence to destination location */ if ((*(dst->shared->u.vlen.cls->write))(dst->shared->u.vlen.file, &vl_alloc_info, d, conv_buf, b, seq_len, dst_base_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data") + HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data"); if (!noop_conv) { /* For nested VL case, free leftover heap objects from the deeper level if the @@ -3399,7 +3399,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si /* Delete sequence in destination location */ if ((*(dst->shared->u.vlen.cls->del))(dst->shared->u.vlen.file, tmp) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, - "unable to remove heap object") + "unable to remove heap object"); } /* end for */ } /* end if */ } /* end if */ @@ -3425,7 +3425,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si break; default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -3480,18 +3480,18 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s * conversion path. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); 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) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "array datatypes do not have the same number of dimensions") + "array datatypes do not have the same number of dimensions"); for (u = 0; u < src->shared->u.array.ndims; u++) if (src->shared->u.array.dim[u] != dst->shared->u.array.dim[u]) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "array datatypes do not have the same sizes of dimensions") + "array datatypes do not have the same sizes of dimensions"); /* Array datatypes don't need a background buffer */ cdata->need_bkg = H5T_BKG_NO; @@ -3507,7 +3507,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s * Conversion. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* * Do we process the values from beginning to end or vice @@ -3536,7 +3536,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s /* Set up conversion path for base elements */ if (NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent))) { HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "unable to convert between src and dest datatypes") + "unable to convert between src and dest datatypes"); } else if (!H5T_path_noop(tpath)) { if ((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->shared->parent, H5T_COPY_ALL), @@ -3544,7 +3544,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s (tdst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->shared->parent, H5T_COPY_ALL), FALSE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, - "unable to register types for conversion") + "unable to register types for conversion"); } /* Check if we need a background buffer for this conversion */ @@ -3555,7 +3555,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size); if (NULL == (bkg_buf = H5FL_BLK_CALLOC(array_seq, bkg_buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed for type conversion") + "memory allocation failed for type conversion"); } /* end if */ /* Perform the actual conversion */ @@ -3566,7 +3566,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s /* Convert array */ if (H5T_convert(tpath, tsrc_id, tdst_id, src->shared->u.array.nelem, (size_t)0, bkg_stride, dp, bkg_buf) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Advance the source & destination pointers */ sp += src_delta; @@ -3581,7 +3581,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, s break; default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -3631,14 +3631,14 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz * conversion path. */ 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_REFERENCE != src->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype"); if (H5T_REFERENCE != dst->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_REFERENCE datatype"); /* Only allow for source reference that is not an opaque type, destination must be opaque */ if (!dst->shared->u.atomic.u.r.opaque) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not an H5T_STD_REF datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not an H5T_STD_REF datatype"); /* Reference types don't need a background buffer */ cdata->need_bkg = H5T_BKG_NO; @@ -3652,7 +3652,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz * Conversion. */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); assert(src->shared->u.atomic.u.r.cls); @@ -3729,28 +3729,29 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Check for "nil" source reference */ if ((*(src->shared->u.atomic.u.r.cls->isnull))(src->shared->u.atomic.u.r.file, s, &is_nil) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check if reference data is 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, + "can't check if reference data is 'nil'"); if (is_nil) { /* Write "nil" reference to destination location */ if ((*(dst->shared->u.atomic.u.r.cls->setnull))(dst->shared->u.atomic.u.r.file, d, b) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, - "can't set reference data to 'nil'") + "can't set reference data to 'nil'"); } /* end else-if */ else { /* Get size of references */ if (0 == (buf_size = src->shared->u.atomic.u.r.cls->getsize( src->shared->u.atomic.u.r.file, s, src->shared->size, dst->shared->u.atomic.u.r.file, &dst_copy))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference"); /* Check if conversion buffer is large enough, resize if necessary. */ if (conv_buf_size < buf_size) { conv_buf_size = buf_size; 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") + "memory allocation failed for type conversion"); memset(conv_buf, 0, conv_buf_size); } /* end if */ @@ -3761,7 +3762,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz if (src->shared->u.atomic.u.r.cls->read( src->shared->u.atomic.u.r.file, s, src->shared->size, dst->shared->u.atomic.u.r.file, conv_buf, buf_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read reference data") + HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read reference data"); } /* end else */ if (dst_copy && (dst->shared->u.atomic.u.r.loc == H5T_LOC_DISK)) @@ -3772,7 +3773,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz src->shared->u.atomic.u.r.file, conv_buf, buf_size, src->shared->u.atomic.u.r.rtype, dst->shared->u.atomic.u.r.file, d, dst->shared->size, b) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write reference data") + HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write reference data"); } /* end else */ } /* end else */ @@ -3791,7 +3792,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz break; default: /* Some other command we don't know about yet.*/ - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -3840,13 +3841,13 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz switch (cdata->command) { case H5T_CONV_INIT: 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_ORDER_LE != src->shared->u.atomic.order && H5T_ORDER_BE != src->shared->u.atomic.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (H5T_ORDER_LE != dst->shared->u.atomic.order && H5T_ORDER_BE != dst->shared->u.atomic.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (dst->shared->size > sizeof dbuf) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large"); cdata->need_bkg = H5T_BKG_NO; break; @@ -3856,7 +3857,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_CONV: /* Get the datatypes */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* * Do we process the values from beginning to end or vice versa? Also, @@ -3896,7 +3897,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); /* Allocate space for order-reversed source buffer */ src_rev = (uint8_t *)H5MM_calloc(src->shared->size); @@ -3989,7 +3990,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4022,7 +4023,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4046,7 +4047,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz H5T__bit_set(d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, TRUE); else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4080,7 +4081,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4125,7 +4126,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4165,7 +4166,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) /*Don't reverse because user handles it already*/ reverse = FALSE; @@ -4228,7 +4229,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -4291,17 +4292,17 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_INIT: if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; if (H5T_ORDER_LE != src.order && H5T_ORDER_BE != src.order && H5T_ORDER_VAX != src.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (H5T_ORDER_LE != dst.order && H5T_ORDER_BE != dst.order && H5T_ORDER_VAX != dst.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (dst_p->shared->size > sizeof(dbuf)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large"); if (8 * sizeof(expo) - 1 < src.u.f.esize || 8 * sizeof(expo) - 1 < dst.u.f.esize) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large"); cdata->need_bkg = H5T_BKG_NO; break; @@ -4312,7 +4313,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get the datatypes */ if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; expo_max = ((hssize_t)1 << dst.u.f.esize) - 1; @@ -4354,7 +4355,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); /* Allocate space for order-reversed source buffer */ src_rev = (uint8_t *)H5MM_calloc(src_p->shared->size); @@ -4465,7 +4466,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); goto padding; } @@ -4504,7 +4505,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz goto next; } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); goto padding; /* Temporary solution to handle VAX special values. @@ -4535,7 +4536,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz goto next; } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); goto padding; } @@ -4571,7 +4572,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "normalization method not implemented yet") + "normalization method not implemented yet"); } /* @@ -4593,7 +4594,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "normalization method not implemented yet") + "normalization method not implemented yet"); } /* @@ -4649,7 +4650,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz msize = 0; } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { reverse = FALSE; goto next; @@ -4740,7 +4741,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { reverse = FALSE; goto next; @@ -4812,7 +4813,7 @@ next: break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -4851,27 +4852,27 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz switch (cdata->command) { case H5T_CONV_INIT: 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (8 * src->shared->size != src->shared->u.atomic.prec || 8 * dst->shared->size != dst->shared->u.atomic.prec) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad precision") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad precision"); if (0 != src->shared->u.atomic.offset || 0 != dst->shared->u.atomic.offset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad offset"); if (H5T_CSET_ASCII != src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != src->shared->u.atomic.u.s.cset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad source character set"); if (H5T_CSET_ASCII != dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 != dst->shared->u.atomic.u.s.cset) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad destination character set"); if ((H5T_CSET_ASCII == src->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == dst->shared->u.atomic.u.s.cset) || (H5T_CSET_ASCII == dst->shared->u.atomic.u.s.cset && H5T_CSET_UTF8 == src->shared->u.atomic.u.s.cset)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "The library doesn't convert between strings of ASCII and UTF") + "The library doesn't convert between strings of ASCII and UTF"); if (src->shared->u.atomic.u.s.pad < 0 || src->shared->u.atomic.u.s.pad >= H5T_NSTR || dst->shared->u.atomic.u.s.pad < 0 || dst->shared->u.atomic.u.s.pad >= H5T_NSTR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad character padding") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad character padding"); cdata->need_bkg = H5T_BKG_NO; break; @@ -4881,7 +4882,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_CONV: /* Get the datatypes */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* * Do we process the values from beginning to end or vice versa? Also, @@ -4924,7 +4925,8 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Allocate the overlap buffer */ if (NULL == (dbuf = (uint8_t *)H5MM_calloc(dst->shared->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for string conversion") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed for string conversion"); /* The conversion loop. */ for (elmtno = 0; elmtno < nelmts; elmtno++) { @@ -4999,7 +5001,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_STR_ERROR: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "source string padding method not supported") + "source string padding method not supported"); } /* end switch */ /* Terminate or pad the destination */ @@ -5036,7 +5038,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_STR_ERROR: default: HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "destination string padding method not supported") + "destination string padding method not supported"); } /* end switch */ /* @@ -5053,7 +5055,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -5075,10 +5077,8 @@ done: */ herr_t H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -); -} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_schar @@ -5091,12 +5091,9 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX); -} +herr_t H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_short @@ -5109,12 +5106,9 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -); -} +herr_t H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ushort @@ -5128,11 +5122,9 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -); -} + H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_short @@ -5145,12 +5137,9 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX); -} +herr_t H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ushort @@ -5164,11 +5153,9 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -); -} + H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_int @@ -5181,12 +5168,9 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SCHAR, INT, signed char, int, -, -); -} +herr_t H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, INT, signed char, int, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_uint @@ -5199,12 +5183,9 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -); -} +herr_t H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_int @@ -5217,12 +5198,9 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX); -} +herr_t H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_uint @@ -5235,12 +5213,9 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -); -} +herr_t H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_long @@ -5253,12 +5228,9 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -); -} +herr_t H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ulong @@ -5271,12 +5243,9 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -); -} +herr_t H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_long @@ -5290,11 +5259,9 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX); -} + H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ulong @@ -5307,12 +5274,9 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -); -} +herr_t H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_llong @@ -5326,11 +5290,9 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -); -} + H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ullong @@ -5344,11 +5306,9 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -); -} + H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_llong @@ -5361,12 +5321,9 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX); -} +herr_t H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ullong @@ -5380,11 +5337,9 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -); -} + H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_schar @@ -5397,12 +5352,9 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX); -} +herr_t H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_uchar @@ -5415,12 +5367,9 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX); -} +herr_t H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_schar @@ -5434,11 +5383,9 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX); -} + H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_uchar @@ -5452,11 +5399,9 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX); -} + H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ushort @@ -5470,11 +5415,9 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -); -} + H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_short @@ -5488,11 +5431,9 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX); -} + H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_int @@ -5505,12 +5446,9 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SHORT, INT, short, int, -, -); -} +herr_t H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, INT, short, int, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_uint @@ -5523,12 +5461,9 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -); -} +herr_t H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_int @@ -5542,11 +5477,9 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX); -} + H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_uint @@ -5560,11 +5493,9 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -); -} + H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_long @@ -5577,12 +5508,9 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SHORT, LONG, short, long, -, -); -} +herr_t H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, LONG, short, long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ulong @@ -5595,12 +5523,9 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -); -} +herr_t H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_long @@ -5613,12 +5538,9 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX); -} +herr_t H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ulong @@ -5632,11 +5554,9 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -); -} + H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_llong @@ -5649,12 +5569,9 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(SHORT, LLONG, short, long long, -, -); -} +herr_t H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(SHORT, LLONG, short, long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ullong @@ -5668,11 +5585,9 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -); -} + H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_llong @@ -5686,11 +5601,9 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX); -} + H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ullong @@ -5704,11 +5617,9 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -); -} + H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_schar @@ -5721,12 +5632,9 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX); -} +herr_t H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_uchar @@ -5740,11 +5648,9 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX); -} + H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_schar @@ -5757,12 +5663,9 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX); -} +herr_t H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_uchar @@ -5775,12 +5678,9 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX); -} +herr_t H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_short @@ -5793,12 +5693,9 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX); -} +herr_t H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ushort @@ -5811,12 +5708,9 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX); -} +herr_t H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_short @@ -5829,12 +5723,9 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX); -} +herr_t H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ushort @@ -5847,12 +5738,9 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX); -} +herr_t H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_uint @@ -5865,12 +5753,9 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_su(INT, UINT, int, unsigned, -, -); -} +herr_t H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_su(INT, UINT, int, unsigned, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_int @@ -5883,12 +5768,9 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX); -} +herr_t H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_long @@ -5901,12 +5783,9 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(INT, LONG, int, long, -, -); -} +herr_t H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(INT, LONG, int, long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ulong @@ -5919,12 +5798,9 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(INT, LONG, int, unsigned long, -, -); -} +herr_t H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(INT, LONG, int, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_long @@ -5937,12 +5813,9 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX); -} +herr_t H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ulong @@ -5955,12 +5828,9 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -); -} +herr_t H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_llong @@ -5973,12 +5843,9 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(INT, LLONG, int, long long, -, -); -} +herr_t H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(INT, LLONG, int, long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ullong @@ -5991,12 +5858,9 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -); -} +herr_t H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_llong @@ -6009,12 +5873,9 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX); -} +herr_t H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ullong @@ -6027,12 +5888,9 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -); -} +herr_t H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_schar @@ -6045,12 +5903,9 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX); -} +herr_t H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_uchar @@ -6063,12 +5918,9 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX); -} +herr_t H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_schar @@ -6081,12 +5933,9 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX); -} +herr_t H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_uchar @@ -6099,12 +5948,9 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX); -} +herr_t H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_short @@ -6118,11 +5964,9 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX); -} + H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ushort @@ -6135,12 +5979,9 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX); -} +herr_t H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_short @@ -6153,12 +5994,9 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX); -} +herr_t H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ushort @@ -6172,11 +6010,9 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX); -} + H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_int @@ -6189,12 +6025,9 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX); -} +herr_t H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_uint @@ -6207,12 +6040,9 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX); -} +herr_t H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_int @@ -6225,12 +6055,9 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX); -} +herr_t H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_uint @@ -6243,12 +6070,9 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX); -} +herr_t H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ulong @@ -6261,12 +6085,9 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -); -} +herr_t H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_long @@ -6280,11 +6101,9 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX); -} + H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_llong @@ -6297,12 +6116,9 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sS(LONG, LLONG, long, long long, -, -); -} +herr_t H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sS(LONG, LLONG, long, long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ullong @@ -6316,11 +6132,9 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -); -} + H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_llong @@ -6333,12 +6147,9 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX); -} +herr_t H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ullong @@ -6352,11 +6163,9 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -); -} + H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_schar @@ -6369,12 +6178,9 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX); -} +herr_t H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_uchar @@ -6387,12 +6193,9 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX); -} +herr_t H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_schar @@ -6406,11 +6209,9 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX); -} + H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_uchar @@ -6424,11 +6225,9 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX); -} + H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_short @@ -6441,12 +6240,9 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX); -} +herr_t H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ushort @@ -6460,11 +6256,9 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX); -} + H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_short @@ -6478,11 +6272,9 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX); -} + H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_ushort @@ -6496,11 +6288,9 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX); -} + H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_int @@ -6514,11 +6304,9 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX); -} + H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_uint @@ -6532,11 +6320,9 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX); -} + H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_int @@ -6549,12 +6335,9 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX); -} +herr_t H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_uint @@ -6567,12 +6350,9 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX); -} +herr_t H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_long @@ -6585,12 +6365,9 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX); -} +herr_t H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ulong @@ -6603,12 +6380,9 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX); -} +herr_t H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_long @@ -6621,12 +6395,9 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX); -} +herr_t H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_ulong @@ -6640,11 +6411,9 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX); -} + H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_ullong @@ -6658,11 +6427,9 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -); -} + H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_llong @@ -6676,11 +6443,9 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX); -} + H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_float_double @@ -6692,12 +6457,9 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -); -} +herr_t H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ldouble @@ -6710,11 +6472,9 @@ H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_fF(FLOAT, LDOUBLE, float, long double, -, -); -} + H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_fF(FLOAT, LDOUBLE, float, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_double_float @@ -6727,11 +6487,9 @@ H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX); -} + H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ldouble @@ -6744,11 +6502,9 @@ H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -); -} + H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_fF(DOUBLE, LDOUBLE, double, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_float @@ -6761,11 +6517,9 @@ H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ff(LDOUBLE, FLOAT, long double, float, -FLT_MAX, FLT_MAX); -} + H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ff(LDOUBLE, FLOAT, long double, float, -FLT_MAX, FLT_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_double @@ -6778,11 +6532,9 @@ H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_Ff(LDOUBLE, DOUBLE, long double, double, -DBL_MAX, DBL_MAX); -} + H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_Ff(LDOUBLE, DOUBLE, long double, double, -DBL_MAX, DBL_MAX)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_float @@ -6794,12 +6546,9 @@ H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -); -} +herr_t H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_double @@ -6811,12 +6560,9 @@ H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -); -} +herr_t H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_schar_ldouble @@ -6829,11 +6575,9 @@ H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -); -} + H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_float @@ -6845,12 +6589,9 @@ H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -); -} +herr_t H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_double @@ -6863,11 +6604,9 @@ H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -); -} + H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uchar_ldouble @@ -6880,11 +6619,9 @@ H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -); -} + H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_float @@ -6896,12 +6633,9 @@ H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SHORT, FLOAT, short, float, -, -); -} +herr_t H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, FLOAT, short, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_double @@ -6913,12 +6647,9 @@ H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -); -} +herr_t H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_short_ldouble @@ -6931,11 +6662,9 @@ H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -); -} + H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_float @@ -6948,11 +6677,9 @@ H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -); -} + H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_double @@ -6965,11 +6692,9 @@ H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -); -} + H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ushort_ldouble @@ -6982,11 +6707,9 @@ H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -); -} + H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_float @@ -6998,12 +6721,9 @@ H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(INT, FLOAT, int, float, -, -); -} +herr_t H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, FLOAT, int, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_double @@ -7015,12 +6735,9 @@ H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(INT, DOUBLE, int, double, -, -); -} +herr_t H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, DOUBLE, int, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_int_ldouble @@ -7032,12 +6749,9 @@ H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -); -} +herr_t H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_float @@ -7049,12 +6763,9 @@ H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -); -} +herr_t H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_double @@ -7066,12 +6777,9 @@ H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -); -} +herr_t H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_uint_ldouble @@ -7084,11 +6792,9 @@ H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -); -} + H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_float @@ -7100,12 +6806,9 @@ H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(LONG, FLOAT, long, float, -, -); -} +herr_t H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, FLOAT, long, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_double @@ -7117,12 +6820,9 @@ H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(LONG, DOUBLE, long, double, -, -); -} +herr_t H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, DOUBLE, long, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_long_ldouble @@ -7134,12 +6834,9 @@ H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -); -} +herr_t H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_float @@ -7151,12 +6848,9 @@ H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -); -} +herr_t H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_double @@ -7169,11 +6863,9 @@ H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -); -} + H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ulong_ldouble @@ -7186,11 +6878,9 @@ H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -); -} + H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_float @@ -7202,12 +6892,9 @@ H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -); -} +herr_t H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_llong_double @@ -7220,10 +6907,10 @@ H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) + H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -); + H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -) } /*------------------------------------------------------------------------- @@ -7241,7 +6928,7 @@ herr_t H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -); + H5T_CONV_xF(LLONG, LDOUBLE, long long, long double, -, -) } #endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ @@ -7257,10 +6944,8 @@ H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n */ herr_t H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -); -} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -)} /*------------------------------------------------------------------------- * Function: H5T__conv_ullong_double @@ -7273,10 +6958,10 @@ H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) + H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -); + H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -) } /*------------------------------------------------------------------------- @@ -7294,7 +6979,7 @@ herr_t H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { - H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -); + H5T_CONV_xF(ULLONG, LDOUBLE, unsigned long long, long double, -, -) } #endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/ @@ -7310,12 +6995,9 @@ H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t */ herr_t H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_uchar @@ -7327,14 +7009,10 @@ H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_schar @@ -7346,14 +7024,11 @@ H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_uchar @@ -7366,13 +7041,10 @@ H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_schar @@ -7385,13 +7057,10 @@ H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, + SCHAR_MAX) H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_uchar @@ -7403,14 +7072,11 @@ H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_short @@ -7422,14 +7088,10 @@ H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ushort @@ -7442,13 +7104,10 @@ H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_short @@ -7461,13 +7120,10 @@ H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ushort @@ -7480,13 +7136,10 @@ H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_short @@ -7498,14 +7151,11 @@ H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_ushort @@ -7518,13 +7168,10 @@ H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, + USHRT_MAX) H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_int @@ -7536,14 +7183,10 @@ H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_uint @@ -7555,14 +7198,10 @@ H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_int @@ -7574,14 +7213,10 @@ H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_uint @@ -7593,14 +7228,10 @@ H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_int @@ -7612,14 +7243,10 @@ H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_uint @@ -7631,14 +7258,11 @@ H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_long @@ -7650,14 +7274,10 @@ H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ulong @@ -7669,14 +7289,10 @@ H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_long @@ -7688,14 +7304,10 @@ H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ulong @@ -7708,13 +7320,10 @@ H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_long @@ -7727,13 +7336,10 @@ H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} + H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_ldouble_ulong @@ -7745,14 +7351,11 @@ H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_llong @@ -7764,14 +7367,10 @@ H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_float_ullong @@ -7783,14 +7382,11 @@ H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_llong @@ -7802,14 +7398,11 @@ H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -herr_t -H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) -{ - H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") -} +herr_t H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, + size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg){ + H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal")} /*------------------------------------------------------------------------- * Function: H5T__conv_double_ullong @@ -7822,12 +7415,11 @@ H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, - size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) + H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX) H5_GCC_CLANG_DIAG_ON("float-equal") } /*------------------------------------------------------------------------- @@ -7846,8 +7438,8 @@ H5T__conv_ldouble_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/ @@ -7867,8 +7459,8 @@ H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") - H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX); - H5_GCC_CLANG_DIAG_ON("float-equal") + H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX) + H5_GCC_CLANG_DIAG_ON("float-equal") } #endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/ @@ -7922,15 +7514,15 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_INIT: if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; if (H5T_ORDER_LE != src.order && H5T_ORDER_BE != src.order && H5T_ORDER_VAX != src.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (dst_p->shared->size > sizeof(dbuf)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large"); if (8 * sizeof(expo) - 1 < src.u.f.esize) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large"); cdata->need_bkg = H5T_BKG_NO; break; @@ -7941,7 +7533,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get the datatypes */ if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; @@ -7979,7 +7571,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); /* Allocate space for order-reversed source buffer */ src_rev = (uint8_t *)H5MM_calloc(src_p->shared->size); @@ -8082,7 +7674,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } else { /* +Infinity */ if (cb_struct.func) { /*If user's exception handler is present, use it*/ @@ -8106,7 +7698,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } goto padding; } @@ -8138,7 +7730,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } else { /* +Infinity */ if (cb_struct.func) { /*If user's exception handler is present, use it*/ @@ -8162,7 +7754,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } goto padding; } @@ -8185,7 +7777,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz goto next; } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); goto padding; } @@ -8209,7 +7801,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "normalization method not implemented yet") + "normalization method not implemented yet"); } /* @@ -8278,7 +7870,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz d, cb_struct.user_data); if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { /*No need to reverse the order of destination because user handles it*/ reverse = FALSE; @@ -8306,7 +7898,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } else if (first < dst.prec) { if (truncated && @@ -8328,7 +7920,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); } } } @@ -8355,7 +7947,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { /*No need to reverse the order of destination because user handles it*/ reverse = FALSE; @@ -8378,7 +7970,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz H5T__bit_set(d, (dst.offset + dst.prec - 1), (size_t)1, TRUE); else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { /*No need to reverse the order of destination because user handles it*/ reverse = FALSE; @@ -8401,7 +7993,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz H5T__bit_set(d, dst.offset, dst.prec - 1, TRUE); else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { /*No need to reverse the order of destination because user handles it*/ reverse = FALSE; @@ -8424,7 +8016,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { /*No need to reverse the order of destination because user handles it*/ reverse = FALSE; @@ -8483,7 +8075,7 @@ next: break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -8547,15 +8139,15 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz case H5T_CONV_INIT: if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; if (H5T_ORDER_LE != dst.order && H5T_ORDER_BE != dst.order && H5T_ORDER_VAX != dst.order) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported byte order"); if (dst_p->shared->size > sizeof(dbuf)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large"); if (8 * sizeof(expo) - 1 < src.u.f.esize) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "exponent field is too large"); cdata->need_bkg = H5T_BKG_NO; break; @@ -8566,7 +8158,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get the datatypes */ if (NULL == (src_p = (H5T_t *)H5I_object(src_id)) || NULL == (dst_p = (H5T_t *)H5I_object(dst_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); src = src_p->shared->u.atomic; dst = dst_p->shared->u.atomic; @@ -8604,7 +8196,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz /* Get conversion exception callback property */ if (H5CX_get_dt_conv_cb(&cb_struct) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback"); /* Allocate space for order-reversed source buffer */ src_rev = (uint8_t *)H5MM_calloc(src_p->shared->size); @@ -8701,7 +8293,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz is_max_neg = 0; } if (sfirst < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "zero bit not found") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "zero bit not found"); /* Sign bit has been negated if bit vector isn't 0x80...00. Set all bits in front of * sign bit to 0 in the temporary buffer because they're all negated from the previous @@ -8724,7 +8316,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz } else { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "normalization method not implemented yet") + "normalization method not implemented yet"); } /* Handle mantissa part here */ @@ -8753,7 +8345,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz goto padding; } else if (except_ret == H5T_CONV_ABORT) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); /* If user's exception handler does deal with it, we do it by dropping off the * extra bits at the end and do rounding. If we have .50...0(decimal) after radix @@ -8820,7 +8412,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, - "can't handle conversion exception") + "can't handle conversion exception"); else if (except_ret == H5T_CONV_HANDLED) { reverse = FALSE; goto padding; @@ -8906,7 +8498,7 @@ padding: break; default: - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ done: @@ -8986,11 +8578,11 @@ H5T_reclaim(hid_t type_id, H5S_t *space, void *buf) 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); /* Get the allocation info */ if (H5CX_get_vlen_alloc_info(&vl_alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info"); /* Call H5S_select_iterate with args, etc. */ dset_op.op_type = H5S_SEL_ITER_OP_LIB; @@ -9026,14 +8618,14 @@ H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned H5_ATTR_UNUSED ndim, const 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim ref elements"); } else { 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) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements"); } done: diff --git a/src/H5Tcset.c b/src/H5Tcset.c index 4a11202..60eea69 100644 --- a/src/H5Tcset.c +++ b/src/H5Tcset.c @@ -46,12 +46,12 @@ H5Tget_cset(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_CSET_ERROR, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_CSET_ERROR, "not a data type"); while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_CSET_ERROR, - "operation not defined for data type class") + "operation not defined for data type class"); /* result */ if (H5T_IS_FIXED_STRING(dt->shared)) @@ -85,15 +85,15 @@ H5Tset_cset(hid_t type_id, H5T_cset_t cset) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); if (cset < H5T_CSET_ASCII || cset >= H5T_NCSET) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal character set type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal character set type"); while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for data type class") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for data type class"); /* Commit */ if (H5T_IS_FIXED_STRING(dt->shared)) diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c index 99e1e13..6fd4d45 100644 --- a/src/H5Tdeprec.c +++ b/src/H5Tdeprec.c @@ -104,32 +104,32 @@ H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id) /* Check arguments */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_is_named(dt)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed"); /* Set up collective metadata if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info"); loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); /* get the object from the loc_id */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Commit the datatype */ if (NULL == (data = H5VL_datatype_commit(vol_obj, &loc_params, name, type_id, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype"); /* Set up VOL object */ if (NULL == (new_obj = H5VL_create_object(data, vol_obj->connector))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't create VOL object for committed datatype"); /* Set the committed type object to the VOL connector pointer in the H5T_t struct */ dt->vol_obj = new_obj; @@ -164,23 +164,23 @@ H5Topen1(hid_t loc_id, const char *name) /* Check args */ if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name"); loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); /* Get the location object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Open the datatype */ if (NULL == (dt = H5VL_datatype_open(vol_obj, &loc_params, name, H5P_DATATYPE_ACCESS_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype"); /* Register the type and return the ID */ if ((ret_value = H5VL_register(H5I_DATATYPE, dt, vol_obj->connector, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype"); done: /* Cleanup on error */ diff --git a/src/H5Tenum.c b/src/H5Tenum.c index 3a1e51a..3544ef5 100644 --- a/src/H5Tenum.c +++ b/src/H5Tenum.c @@ -52,15 +52,15 @@ H5Tenum_create(hid_t parent_id) /* Check args */ if (NULL == (parent = (H5T_t *)H5I_object_verify(parent_id, H5I_DATATYPE)) || H5T_INTEGER != parent->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an integer data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not an integer data type"); /* Build new type */ if (NULL == (dt = H5T__enum_create(parent))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "cannot create enum type") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "cannot create enum type"); /* Register the type */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type ID") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type ID"); done: FUNC_LEAVE_API(ret_value) @@ -90,7 +90,7 @@ H5T__enum_create(const H5T_t *parent) /* Build new type */ if (NULL == (ret_value = H5T__alloc())) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + 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); assert(ret_value->shared->parent); @@ -127,17 +127,17 @@ H5Tenum_insert(hid_t type, const char *name, const void *value) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_ENUM != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified"); if (!value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value specified"); /* Do work */ if (H5T__enum_insert(dt, name, value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert new enumeration member") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert new enumeration member"); done: FUNC_LEAVE_API(ret_value) @@ -172,9 +172,9 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition"); 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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition"); } /* Increase table sizes */ @@ -184,11 +184,11 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value) unsigned n = MAX(32, 2 * dt->shared->u.enumer.nalloc); if (NULL == (names = (char **)H5MM_realloc(dt->shared->u.enumer.name, n * sizeof(char *)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); dt->shared->u.enumer.name = names; if (NULL == (values = (uint8_t *)H5MM_realloc(dt->shared->u.enumer.value, n * dt->shared->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); dt->shared->u.enumer.value = values; dt->shared->u.enumer.nalloc = n; } @@ -225,16 +225,16 @@ H5Tget_member_value(hid_t type, unsigned membno, void *value /*out*/) H5TRACE3("e", "iIux", type, membno, value); if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_ENUM != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class"); if (membno >= dt->shared->u.enumer.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid member number"); if (!value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null value buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null value buffer"); if (H5T__get_member_value(dt, membno, value) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get member value") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get member value"); done: FUNC_LEAVE_API(ret_value) } @@ -293,16 +293,16 @@ H5Tenum_nameof(hid_t type, const void *value, char *name /*out*/, size_t size) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_ENUM != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type"); if (!value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value supplied"); if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name buffer supplied") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name buffer supplied"); if (NULL == H5T__enum_nameof(dt, value, name, size)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "nameof query failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "nameof query failed"); done: FUNC_LEAVE_API(ret_value) @@ -349,14 +349,14 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t /* Sanity check */ if (dt->shared->u.enumer.nmembs == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "datatype has no members") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "datatype has no members"); /* Do a binary search over the values to find the correct one. Do sorting * and search on the copied datatype to protect the original order. */ if (NULL == (copied_dt = H5T_copy(dt, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy data type"); if (H5T__sort_value(copied_dt, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOMPARE, NULL, "value sort failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOMPARE, NULL, "value sort failed"); lt = 0; rt = copied_dt->shared->u.enumer.nmembs; @@ -374,7 +374,7 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t /* Value was not yet defined. This fixes bug # 774, 2002/06/05 EIP */ if (cmp != 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "value is currently not defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "value is currently not defined"); /* Save result name */ if (!name) { @@ -384,7 +384,7 @@ H5T__enum_nameof(const H5T_t *dt, const void *value, char *name /*out*/, size_t } /* end if */ HDstrncpy(name, copied_dt->shared->u.enumer.name[md], size); if (HDstrlen(copied_dt->shared->u.enumer.name[md]) >= size) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, NULL, "name has been truncated") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, NULL, "name has been truncated"); /* Set return value */ ret_value = name; @@ -424,16 +424,16 @@ H5Tenum_valueof(hid_t type, const char *name, void *value /*out*/) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_ENUM != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an enumeration data type"); if (!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); if (!value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value buffer"); if (H5T__enum_valueof(dt, name, value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "valueof query failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "valueof query failed"); done: FUNC_LEAVE_API(ret_value) @@ -470,14 +470,14 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/) /* Sanity check */ if (dt->shared->u.enumer.nmembs == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "datatype has no members") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "datatype has no members"); /* Do a binary search over the names to find the correct one. Do sorting * and search on the copied datatype to protect the original order. */ if (NULL == (copied_dt = H5T_copy(dt, H5T_COPY_ALL))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy data type"); if (H5T__sort_name(copied_dt, NULL) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed"); lt = 0; rt = copied_dt->shared->u.enumer.nmembs; @@ -497,7 +497,7 @@ H5T__enum_valueof(const H5T_t *dt, const char *name, void *value /*out*/) } /* Value was not yet defined. This fixes bug # 774, 2002/06/05 EIP */ if (cmp != 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "string doesn't exist in the enumeration type") + HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "string doesn't exist in the enumeration type"); H5MM_memcpy(value, (uint8_t *)copied_dt->shared->u.enumer.value + (md * copied_dt->shared->size), copied_dt->shared->size); diff --git a/src/H5Tfields.c b/src/H5Tfields.c index de8b517..9d423d1 100644 --- a/src/H5Tfields.c +++ b/src/H5Tfields.c @@ -48,10 +48,10 @@ H5Tget_nmembers(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if ((ret_value = H5T_get_nmembers(dt)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "cannot return member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "cannot return member number"); done: FUNC_LEAVE_API(ret_value) @@ -86,7 +86,7 @@ H5T_get_nmembers(const H5T_t *dt) else if (H5T_ENUM == dt->shared->type) ret_value = (int)dt->shared->u.enumer.nmembs; else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "operation not supported for type class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "operation not supported for type class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -118,10 +118,10 @@ H5Tget_member_name(hid_t type_id, unsigned membno) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype"); if (NULL == (ret_value = H5T__get_member_name(dt, membno))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get member name") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get member name"); done: FUNC_LEAVE_API(ret_value) @@ -154,13 +154,13 @@ H5T__get_member_name(H5T_t const *dt, unsigned membno) switch (dt->shared->type) { case H5T_COMPOUND: if (membno >= dt->shared->u.compnd.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid member number"); ret_value = H5MM_xstrdup(dt->shared->u.compnd.memb[membno].name); break; case H5T_ENUM: if (membno >= dt->shared->u.enumer.nmembs) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid member number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid member number"); ret_value = H5MM_xstrdup(dt->shared->u.enumer.name[membno]); break; @@ -176,7 +176,7 @@ H5T__get_member_name(H5T_t const *dt, unsigned membno) case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "operation not supported for type class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "operation not supported for type class"); } /*lint !e788 All appropriate cases are covered */ done: @@ -209,7 +209,7 @@ H5Tget_member_index(hid_t type_id, const char *name) /* Check arguments */ assert(name); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Locate member by name */ switch (dt->shared->type) { @@ -236,7 +236,7 @@ H5Tget_member_index(hid_t type_id, const char *name) case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "operation not supported for this type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "operation not supported for this type"); } /*lint !e788 All appropriate cases are covered */ done: diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c index d0f3452..12f600b 100644 --- a/src/H5Tfixed.c +++ b/src/H5Tfixed.c @@ -44,7 +44,7 @@ H5Tget_sign(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype"); ret_value = H5T_get_sign(dt); @@ -79,7 +79,7 @@ H5T_get_sign(H5T_t const *dt) /* Check args */ if (H5T_INTEGER != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class"); /* Sign */ ret_value = dt->shared->u.atomic.u.i.sign; @@ -108,17 +108,17 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only"); if (sign < H5T_SGN_NONE || sign >= H5T_NSGN) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type"); if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_INTEGER != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class"); /* Commit */ dt->shared->u.atomic.u.i.sign = sign; diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c index 82878ca..01a5607 100644 --- a/src/H5Tfloat.c +++ b/src/H5Tfloat.c @@ -51,11 +51,11 @@ H5Tget_fields(hid_t type_id, size_t *spos /*out*/, size_t *epos /*out*/, size_t /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class"); /* Get values */ if (spos) @@ -99,27 +99,27 @@ H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class"); if (epos + esize > dt->shared->u.atomic.prec) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "exponent bit field size/location is invalid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "exponent bit field size/location is invalid"); if (mpos + msize > dt->shared->u.atomic.prec) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mantissa bit field size/location is invalid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mantissa bit field size/location is invalid"); if (spos >= dt->shared->u.atomic.prec) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign location is not valid") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign location is not valid"); /* Check for overlap */ if (spos >= epos && spos < epos + esize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign bit appears within exponent field") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign bit appears within exponent field"); if (spos >= mpos && spos < mpos + msize) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign bit appears within mantissa field") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "sign bit appears within mantissa field"); if ((mpos < epos && mpos + msize > epos) || (epos < mpos && epos + esize > mpos)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "exponent and mantissa fields overlap") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "exponent and mantissa fields overlap"); /* Commit */ dt->shared->u.atomic.u.f.sign = spos; @@ -154,11 +154,11 @@ H5Tget_ebias(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, 0, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, 0, "operation not defined for datatype class"); /* bias */ H5_CHECKED_ASSIGN(ret_value, size_t, dt->shared->u.atomic.u.f.ebias, uint64_t); @@ -187,13 +187,13 @@ H5Tset_ebias(hid_t type_id, size_t ebias) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class"); /* Commit */ dt->shared->u.atomic.u.f.ebias = ebias; @@ -225,11 +225,11 @@ H5Tget_norm(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NORM_ERROR, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NORM_ERROR, "not a datatype"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_NORM_ERROR, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_NORM_ERROR, "operation not defined for datatype class"); /* norm */ ret_value = dt->shared->u.atomic.u.f.norm; @@ -259,15 +259,15 @@ H5Tset_norm(hid_t type_id, H5T_norm_t norm) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only"); if (norm < H5T_NORM_IMPLIED || norm > H5T_NORM_NONE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal normalization") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal normalization"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class"); /* Commit */ dt->shared->u.atomic.u.f.norm = norm; @@ -301,11 +301,11 @@ H5Tget_inpad(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_PAD_ERROR, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_PAD_ERROR, "not a datatype"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_PAD_ERROR, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_PAD_ERROR, "operation not defined for datatype class"); /* pad */ ret_value = dt->shared->u.atomic.u.f.pad; @@ -337,15 +337,15 @@ H5Tset_inpad(hid_t type_id, H5T_pad_t pad) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only"); if (pad < H5T_PAD_ZERO || pad >= H5T_NPAD) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal internal pad type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal internal pad type"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_FLOAT != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "operation not defined for datatype class"); /* Commit */ dt->shared->u.atomic.u.f.pad = pad; diff --git a/src/H5Tnative.c b/src/H5Tnative.c index bac956c..76ef403 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -77,17 +77,17 @@ H5Tget_native_type(hid_t type_id, H5T_direction_t direction) /* Check arguments */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a data type"); if (direction != H5T_DIR_DEFAULT && direction != H5T_DIR_ASCEND && direction != H5T_DIR_DESCEND) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not valid direction value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not valid direction value"); /* Get the native type */ if (NULL == (new_dt = H5T__get_native_type(dt, direction, NULL, NULL, &comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "cannot retrieve native type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "cannot retrieve native type"); /* Get an ID for the new type */ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type"); done: /* Error cleanup */ @@ -138,72 +138,72 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali assert(dtype); if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, FALSE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class"); if (0 == (size = H5T_get_size(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid size") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid size"); switch (h5_class) { case H5T_INTEGER: { H5T_sign_t sign; /* Signedness of integer type */ if (H5T_SGN_ERROR == (sign = H5T_get_sign(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid signess") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid signess"); prec = dtype->shared->u.atomic.prec; if (NULL == (ret_value = H5T__get_native_integer(prec, sign, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer type"); } /* end case */ break; case H5T_FLOAT: if (NULL == (ret_value = H5T__get_native_float(size, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); break; case H5T_STRING: if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); if (H5T_IS_VL_STRING(dtype->shared)) { /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char *), (size_t)1, H5T_POINTER_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end if */ else { /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char), size, H5T_NATIVE_SCHAR_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end else */ break; /* The time type will be supported in the future. Simply return "not supported" * message for now.*/ case H5T_TIME: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "time type is not supported yet") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "time type is not supported yet"); case H5T_BITFIELD: { prec = dtype->shared->u.atomic.prec; if (NULL == (ret_value = H5T__get_native_bitfield(prec, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer for bitfield type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer for bitfield type"); } /* end case */ break; case H5T_OPAQUE: if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char), size, H5T_NATIVE_SCHAR_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); break; case H5T_REFERENCE: { @@ -212,11 +212,11 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali size_t ref_size; if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy reference type"); /* Decide if the data type is object reference. */ if (NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_OBJ_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); /* Update size, offset and compound alignment for parent. */ if (0 == H5T_cmp(ret_value, dt, FALSE)) { @@ -226,7 +226,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali else { /* Decide if the data type is dataset region reference. */ if (NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_DSETREG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (0 == H5T_cmp(ret_value, dt, FALSE)) { align = H5T_HDSETREGREF_ALIGN_g; @@ -240,7 +240,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali } /* end else */ if (H5T__cmp_offset(comp_size, offset, ref_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end case */ break; @@ -250,31 +250,31 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali 0; /* The max alignment among compound members. This'll be the compound alignment */ if ((snmemb = H5T_get_nmembers(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "compound data type doesn't have any member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "compound data type doesn't have any member"); H5_CHECKED_ASSIGN(nmemb, unsigned, snmemb, int); if (NULL == (memb_list = (H5T_t **)H5MM_calloc(nmemb * sizeof(H5T_t *)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (memb_offset = (size_t *)H5MM_calloc(nmemb * sizeof(size_t)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (comp_mname = (char **)H5MM_calloc(nmemb * sizeof(char *)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); /* Construct child compound type and retrieve a list of their IDs, offsets, total size, and * alignment for compound type. */ for (u = 0; u < nmemb; u++) { if (NULL == (memb_type = H5T_get_member_type(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed"); if (NULL == (comp_mname[u] = H5T__get_member_name(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed"); if (NULL == (memb_list[u] = H5T__get_native_type(memb_type, direction, &children_st_align, &(memb_offset[u]), &children_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member identifier retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member identifier retrieval failed"); if (H5T_close_real(memb_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); } /* end for */ /* The alignment for whole compound type */ @@ -283,12 +283,12 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Construct new compound type based on native type */ if (NULL == (new_type = H5T__create(H5T_COMPOUND, children_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot create a compound type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot create a compound type"); /* Insert members for the new compound type */ for (u = 0; u < nmemb; u++) if (H5T__insert(new_type, comp_mname[u], memb_offset[u], memb_list[u]) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member to compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member to compound datatype"); /* Update size, offset and compound alignment for parent in the case of * nested compound type. The alignment for a compound type as one field in @@ -310,12 +310,12 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali */ if (H5T__cmp_offset(comp_size, offset, children_size, (size_t)1, children_st_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); /* Close member data type */ for (u = 0; u < nmemb; u++) { if (H5T_close_real(memb_list[u]) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); /* Free member names in list */ comp_mname[u] = (char *)H5MM_xfree(comp_mname[u]); @@ -339,48 +339,48 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve base type for enumerated type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumerate type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumerate type"); if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed"); if ((super_type_id = H5I_register(H5I_DATATYPE, super_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype"); if ((nat_super_type_id = H5I_register(H5I_DATATYPE, nat_super_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype"); /* Allocate room for the enum values */ if (NULL == (tmp_memb_value = H5MM_calloc(H5T_get_size(super_type)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (memb_value = H5MM_calloc(H5T_get_size(nat_super_type)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); /* Construct new enum type based on native type */ if (NULL == (new_type = H5T__enum_create(nat_super_type))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create enum type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create enum type"); /* Find the conversion function */ if (NULL == (tpath = H5T_path_find(super_type, nat_super_type))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, - "unable to convert between src and dst data types") + "unable to convert between src and dst data types"); /* Retrieve member info and insert members into new enum type */ if ((snmemb = H5T_get_nmembers(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member"); H5_CHECKED_ASSIGN(nmemb, unsigned, snmemb, int); for (u = 0; u < nmemb; u++) { if (NULL == (memb_name = H5T__get_member_name(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member name") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member name"); if (H5T__get_member_value(dtype, u, tmp_memb_value) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value"); H5MM_memcpy(memb_value, tmp_memb_value, H5T_get_size(super_type)); if (H5T_convert(tpath, super_type_id, nat_super_type_id, (size_t)1, (size_t)0, (size_t)0, memb_value, NULL) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value"); if (H5T__enum_insert(new_type, memb_name, memb_value) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member"); memb_name = (char *)H5MM_xfree(memb_name); } memb_value = H5MM_xfree(memb_value); @@ -388,10 +388,10 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Close base type */ if (H5I_dec_app_ref(nat_super_type_id) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); /* Close super type */ if (H5I_dec_app_ref(super_type_id) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); ret_value = new_type; } /* end case */ @@ -407,37 +407,37 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve dimension information for array data type */ if ((sarray_rank = H5T__get_array_ndims(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank"); H5_CHECKED_ASSIGN(array_rank, unsigned, sarray_rank, int); if (NULL == (dims = (hsize_t *)H5MM_malloc(array_rank * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (H5T__get_array_dims(dtype, dims) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size"); /* Retrieve base type for array type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for array type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for array type"); if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, &super_align, &super_offset, &super_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed"); /* Close super type */ if (H5T_close_real(super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Create a new array type based on native type */ if (NULL == (new_type = H5T__array_create(nat_super_type, array_rank, dims))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type"); /* Close base type */ if (H5T_close_real(nat_super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); for (u = 0; u < array_rank; u++) nelems *= dims[u]; H5_CHECK_OVERFLOW(nelems, hsize_t, size_t); if (H5T__cmp_offset(comp_size, offset, super_size, (size_t)nelems, super_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); dims = (hsize_t *)H5MM_xfree(dims); @@ -452,31 +452,31 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve base type for array type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for VL type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for VL type"); /* Don't need alignment, offset information if this VL isn't a field of compound type. If it * is, go to a few steps below to compute the information directly. */ if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, NULL, NULL, &super_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed"); /* Close super type */ if (H5T_close_real(super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Create a new array type based on native type */ if (NULL == (new_type = H5T__vlen_create(nat_super_type))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create VL type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create VL type"); /* Close base type */ if (H5T_close_real(nat_super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Update size, offset and compound alignment for parent compound type directly. */ vl_align = H5T_HVL_ALIGN_g; vl_size = sizeof(hvl_t); if (H5T__cmp_offset(comp_size, offset, vl_size, (size_t)1, vl_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); ret_value = new_type; } /* end case */ @@ -485,7 +485,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali case H5T_NO_CLASS: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "data type doesn't match any native type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "data type doesn't match any native type"); } /* end switch */ done: @@ -655,20 +655,20 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, case H5T_NATIVE_INT_MATCH_UNKNOWN: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native integer match") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native integer match"); } /* end switch */ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (NULL == (ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type"); /* compute size and offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -766,19 +766,19 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali case H5T_NATIVE_FLOAT_MATCH_UNKNOWN: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native floating-point match") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native floating-point match"); } /* end switch */ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); /* compute offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -870,14 +870,14 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type"); /* compute size and offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Toffset.c b/src/H5Toffset.c index 475f009..278e32b 100644 --- a/src/H5Toffset.c +++ b/src/H5Toffset.c @@ -62,11 +62,11 @@ H5Tget_offset(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type"); /* Get offset */ if ((ret_value = H5T_get_offset(dt)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't get offset for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't get offset for specified datatype"); done: FUNC_LEAVE_API(ret_value) @@ -109,7 +109,7 @@ H5T_get_offset(const H5T_t *dt) while (dt->shared->parent) dt = dt->shared->parent; if (!H5T_IS_ATOMIC(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type"); /* Offset */ ret_value = (int)dt->shared->u.atomic.offset; @@ -161,20 +161,20 @@ H5Tset_offset(hid_t type_id, size_t offset) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an atomic data type"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); if (H5T_STRING == dt->shared->type && offset != 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset must be zero for this type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "offset must be zero for this type"); if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); if (H5T_COMPOUND == dt->shared->type || H5T_REFERENCE == dt->shared->type || H5T_OPAQUE == dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for this datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for this datatype"); /* Do the real work */ if (H5T__set_offset(dt, offset) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset"); done: FUNC_LEAVE_API(ret_value) @@ -229,7 +229,7 @@ H5T__set_offset(const H5T_t *dt, size_t offset) if (dt->shared->parent) { if (H5T__set_offset(dt->shared->parent, offset) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset for base type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset for base type"); /* Adjust size of datatype appropriately */ if (dt->shared->type == H5T_ARRAY) diff --git a/src/H5Toh.c b/src/H5Toh.c index 42a2633..9269aa7 100644 --- a/src/H5Toh.c +++ b/src/H5Toh.c @@ -93,7 +93,7 @@ H5O__dtype_isa(const H5O_t *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") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to read object header"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -123,7 +123,7 @@ H5O__dtype_open(const H5G_loc_t *obj_loc, H5I_type_t *opened_type) /* Open the datatype */ if (NULL == (type = H5T_open(obj_loc))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open datatype"); ret_value = (void *)type; @@ -160,13 +160,13 @@ H5O__dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc) /* Commit the type to the file */ if (H5T__commit(f, crt_info->dt, crt_info->tcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype"); /* Set up the new named datatype's location */ if (NULL == (obj_loc->oloc = H5T_oloc(crt_info->dt))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get object location of named datatype"); if (NULL == (obj_loc->path = H5T_nameof(crt_info->dt))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get path of named datatype"); /* Set the return value */ ret_value = crt_info->dt; @@ -196,14 +196,14 @@ H5O__dtype_get_oloc(hid_t obj_id) /* Get the datatype */ if (NULL == (dt = (H5T_t *)H5I_object(obj_id))) - HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID") + HGOTO_ERROR(H5E_OHDR, H5E_BADID, NULL, "couldn't get object from ID"); /* If this is a named datatype, get the VOL driver pointer to the datatype */ type = (H5T_t *)H5T_get_actual_type(dt); /* Get the datatype's object header location */ if (NULL == (ret_value = H5T_oloc(type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get object location from object"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Topaque.c b/src/H5Topaque.c index 50102c6..808eb8c 100644 --- a/src/H5Topaque.c +++ b/src/H5Topaque.c @@ -43,17 +43,17 @@ H5Tset_tag(hid_t type_id, const char *tag) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_OPAQUE != dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type"); if (!tag) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag"); if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long"); /* Commit */ H5MM_xfree(dt->shared->u.opaque.tag); @@ -84,15 +84,15 @@ H5Tget_tag(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (H5T_OPAQUE != dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class"); /* result */ if (NULL == (ret_value = H5MM_strdup(dt->shared->u.opaque.tag))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Torder.c b/src/H5Torder.c index 36c2276..ccdf4bf 100644 --- a/src/H5Torder.c +++ b/src/H5Torder.c @@ -85,11 +85,11 @@ H5Tget_order(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_ORDER_ERROR, "not a datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, H5T_ORDER_ERROR, "not a datatype"); /* Get order */ if (H5T_ORDER_ERROR == (ret_value = H5T_get_order(dt))) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "can't get order for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "can't get order for specified datatype"); done: FUNC_LEAVE_API(ret_value) @@ -129,14 +129,14 @@ H5T_get_order(const H5T_t *dtype) /* Retrieve the number of members */ if ((nmemb = H5T_get_nmembers(dtype)) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_ORDER_ERROR, - "can't get number of members from compound data type") + "can't get number of members from compound data type"); /* Get order for each compound member type. */ for (i = 0; i < nmemb; i++) { /* Get order for member */ if ((memb_order = H5T_get_order(dtype->shared->u.compnd.memb[i].type)) == H5T_ORDER_ERROR) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, H5T_ORDER_ERROR, - "can't get order for compound member") + "can't get order for compound member"); /* Ignore the H5T_ORDER_NONE, write down the first non H5T_ORDER_NONE order. */ if (memb_order != H5T_ORDER_NONE && ret_value == H5T_ORDER_NONE) @@ -185,17 +185,17 @@ H5Tset_order(hid_t type_id, H5T_order_t order) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a datatype"); if (order < H5T_ORDER_LE || order > H5T_ORDER_NONE || order == H5T_ORDER_MIXED) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "illegal byte order") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "illegal byte order"); if (NULL != dt->vol_obj) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is already committed"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype is read-only"); /* Call internal routine to set the order */ if (H5T__set_order(dt, order) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't set order") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't set order"); done: FUNC_LEAVE_API(ret_value) @@ -218,7 +218,7 @@ H5T__set_order(H5T_t *dtype, H5T_order_t order) FUNC_ENTER_PACKAGE if (H5T_ENUM == dtype->shared->type && dtype->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined"); /* For derived data type, defer to parent */ while (dtype->shared->parent) @@ -227,7 +227,7 @@ H5T__set_order(H5T_t *dtype, H5T_order_t order) /* Check for setting order on inappropriate datatype */ if (order == H5T_ORDER_NONE && !(H5T_REFERENCE == dtype->shared->type || H5T_OPAQUE == dtype->shared->type || H5T_IS_FIXED_STRING(dtype->shared))) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "illegal byte order for type") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "illegal byte order for type"); /* For atomic data type */ if (H5T_IS_ATOMIC(dtype->shared)) @@ -241,16 +241,16 @@ H5T__set_order(H5T_t *dtype, H5T_order_t order) /* Retrieve the number of fields in the compound datatype */ if ((nmemb = H5T_get_nmembers(dtype)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, - "can't get number of members from compound data type") + "can't get number of members from compound data type"); /* Check for uninitialized compound datatype */ if (nmemb == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNINITIALIZED, FAIL, "no member is in the compound data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNINITIALIZED, FAIL, "no member is in the compound data type"); /* Loop through all fields of compound type, setting the order */ for (i = 0; i < nmemb; i++) if (H5T__set_order(dtype->shared->u.compnd.memb[i].type, order) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set order for compound member") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set order for compound member"); } /* end if */ } /* end else */ diff --git a/src/H5Tpad.c b/src/H5Tpad.c index 6ff8fb4..6487138 100644 --- a/src/H5Tpad.c +++ b/src/H5Tpad.c @@ -44,11 +44,11 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type"); /* Get values */ if (lsb) @@ -80,17 +80,17 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); if (lsb < H5T_PAD_ZERO || lsb >= H5T_NPAD || msb < H5T_PAD_ZERO || msb >= H5T_NPAD) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type"); if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type"); /* Commit */ dt->shared->u.atomic.lsb_pad = lsb; diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c index 9e5f7fe..4feca69 100644 --- a/src/H5Tprecis.c +++ b/src/H5Tprecis.c @@ -51,11 +51,11 @@ H5Tget_precision(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); /* Get precision */ if ((ret_value = H5T_get_precision(dt)) == 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "can't get precision for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "can't get precision for specified datatype"); done: FUNC_LEAVE_API(ret_value) @@ -86,7 +86,7 @@ H5T_get_precision(const H5T_t *dt) while (dt->shared->parent) dt = dt->shared->parent; if (!H5T_IS_ATOMIC(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for specified datatype"); /* Precision */ ret_value = dt->shared->u.atomic.prec; @@ -128,23 +128,23 @@ H5Tset_precision(hid_t type_id, size_t prec) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only"); if (NULL != dt->vol_obj) - HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is committed") + HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is committed"); if (prec == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive"); if (H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined"); if (H5T_STRING == dt->shared->type) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "precision for this type is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "precision for this type is read-only"); if (H5T_COMPOUND == dt->shared->type || H5T_OPAQUE == dt->shared->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype"); /* Do the work */ if (H5T__set_precision(dt, prec) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision"); done: FUNC_LEAVE_API(ret_value) @@ -190,7 +190,7 @@ H5T__set_precision(const H5T_t *dt, size_t prec) if (dt->shared->parent) { if (H5T__set_precision(dt->shared->parent, prec) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type"); /* Adjust size of datatype appropriately */ if (dt->shared->type == H5T_ARRAY) @@ -228,7 +228,7 @@ H5T__set_precision(const H5T_t *dt, size_t prec) dt->shared->u.atomic.u.f.epos + dt->shared->u.atomic.u.f.esize > prec + offset || dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec + offset) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "adjust sign, mantissa, and exponent fields first") + "adjust sign, mantissa, and exponent fields first"); break; case H5T_NO_CLASS: @@ -241,7 +241,7 @@ H5T__set_precision(const H5T_t *dt, size_t prec) case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class"); } /* end switch */ /* Commit */ @@ -250,7 +250,7 @@ H5T__set_precision(const H5T_t *dt, size_t prec) dt->shared->u.atomic.prec = prec; } /* end if */ else - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for specified datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for specified datatype"); } /* end else */ done: diff --git a/src/H5Tref.c b/src/H5Tref.c index 893a2b2..ddc73ac 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -184,7 +184,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Release owned file */ if (dt->shared->owned_vol_obj) { if (H5VL_free_object(dt->shared->owned_vol_obj) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object"); dt->shared->owned_vol_obj = NULL; } /* end if */ @@ -216,7 +216,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) dt->shared->u.atomic.u.r.cls = NULL; } /* end else-if */ else - HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid location") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid location"); break; case H5T_LOC_DISK: /* Disk based reference datatype */ @@ -230,7 +230,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* dt now owns a reference to file */ if (H5T_own_vol_obj(dt, file) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object"); if (dt->shared->u.atomic.u.r.rtype == H5R_OBJECT1) { H5F_t *f; @@ -242,7 +242,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Check if using native VOL connector */ if (H5VL_object_is_native(file, &is_native) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, - "can't query if file uses native VOL connector") + "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -251,7 +251,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Retrieve file from VOL object */ if (NULL == (f = (H5F_t *)H5VL_object_data(file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Size on disk, memory size is different */ dt->shared->size = H5T_REF_OBJ_DISK_SIZE(f); @@ -270,7 +270,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Check if using native VOL connector */ if (H5VL_object_is_native(file, &is_native) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, - "can't query if file uses native VOL connector") + "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -279,7 +279,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Retrieve file from VOL object */ if (NULL == (f = (H5F_t *)H5VL_object_data(file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Size on disk, memory size is different */ dt->shared->size = H5T_REF_DSETREG_DISK_SIZE(f); @@ -300,14 +300,14 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Get container info */ if (H5VL_file_get(file, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info"); /* Retrieve min encode size (when references have no vlen part) */ 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) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't get encode size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't get encode size"); /* Size on disk, memory size is different */ dt->shared->size = @@ -338,7 +338,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) case H5T_LOC_MAXLOC: /* MAXLOC is invalid */ default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid reference datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid reference datatype location"); } /* end switch */ /* Indicate that the location changed */ @@ -429,11 +429,11 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf /* Retrieve VOL object */ if (NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier"); /* Set external flag if referenced file is not destination file */ if (H5VL_file_is_same(vol_obj, dst_file, &files_equal) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, 0, "can't check if files are equal") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, 0, "can't check if files are equal"); flags |= !files_equal ? H5R_IS_EXTERNAL : 0; } @@ -451,14 +451,14 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf /* Check if using native VOL connector */ if (H5VL_object_is_native(dst_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector"); /* Set the file's libver bounds if using the native VOL connector */ if (is_native) { H5F_t *dst_f; /* Native file struct */ if (NULL == (dst_f = (H5F_t *)H5VL_object_data(dst_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object"); H5CX_set_libver_bounds(dst_f); } /* end if */ else @@ -474,13 +474,13 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf /* Get file name */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name"); /* Check if we need to allocate a buffer for the file name */ if (file_name_len >= sizeof(file_name_buf_static)) { /* Allocate file name buffer */ if (NULL == (file_name_buf_dyn = H5MM_malloc(file_name_len + 1))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, 0, "can't allocate space for file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, 0, "can't allocate space for file name"); /* Update VOL callback arguments */ vol_cb_args.args.get_name.buf_size = file_name_len + 1; @@ -488,7 +488,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf /* Get file name again */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name"); file_name = file_name_buf_dyn; } /* end if */ @@ -497,7 +497,7 @@ H5T__ref_mem_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf /* Determine encoding size */ if (H5R__encode(file_name, src_ref, NULL, &ret_value, flags) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, 0, "unable to determine encoding size") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, 0, "unable to determine encoding size"); } /* end if */ else { /* Can do a direct copy and skip blob decoding */ @@ -554,11 +554,11 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s /* Retrieve VOL object */ if (NULL == (vol_obj = H5VL_vol_object(src_ref->loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid location identifier"); /* Set external flag if referenced file is not destination file */ if (H5VL_file_is_same(vol_obj, dst_file, &files_equal) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "can't check if files are equal") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOMPARE, FAIL, "can't check if files are equal"); flags |= !files_equal ? H5R_IS_EXTERNAL : 0; /* Pass the correct encoding version for the selection depending on the @@ -568,14 +568,14 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s /* Check if using native VOL connector */ if (H5VL_object_is_native(dst_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector"); /* Set the file's libver bounds if using the native VOL connector */ if (is_native) { H5F_t *dst_f; if (NULL == (dst_f = (H5F_t *)H5VL_object_data(dst_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object"); H5CX_set_libver_bounds(dst_f); } /* end if */ else @@ -596,13 +596,13 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s /* Get file name */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name"); /* Check if we need to allocate a buffer for the file name */ if (file_name_len >= sizeof(file_name_buf_static)) { /* Allocate file name buffer */ if (NULL == (file_name_buf_dyn = H5MM_malloc(file_name_len + 1))) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, 0, "can't allocate space for file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTALLOC, 0, "can't allocate space for file name"); /* Update VOL callback arguments */ vol_cb_args.args.get_name.buf_size = file_name_len + 1; @@ -610,7 +610,7 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s /* Get file name again */ if (H5VL_file_get(vol_obj, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, NULL) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't get file name"); file_name = file_name_buf_dyn; } /* end if */ @@ -620,7 +620,7 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s /* Encode reference */ if (H5R__encode(file_name, src_ref, (unsigned char *)dst_buf, &dst_size, flags) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "Cannot encode reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, "Cannot encode reference"); done: H5MM_xfree(file_name_buf_dyn); @@ -670,7 +670,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -679,7 +679,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size /* Retrieve file from VOL object */ if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Make sure reference buffer is correctly initialized */ memset(&tmp_ref, 0, sizeof(tmp_ref)); @@ -689,7 +689,7 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size size_t token_size = H5F_SIZEOF_ADDR(src_f); if (H5R__create_object((const H5O_token_t *)src_buf, token_size, &tmp_ref) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference"); } break; case H5R_DATASET_REGION1: { @@ -697,11 +697,11 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size size_t token_size = H5F_SIZEOF_ADDR(src_f); if (H5R__create_region(&src_reg->token, token_size, src_reg->space, &tmp_ref) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference"); /* create_region creates its internal copy of the space */ if (H5S_close(src_reg->space) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "Cannot close dataspace") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "Cannot close dataspace"); } break; case H5R_DATASET_REGION2: @@ -714,26 +714,26 @@ H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size case H5R_ATTR: /* Decode reference */ if (H5R__decode((const unsigned char *)src_buf, &src_size, &tmp_ref) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Cannot decode reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Cannot decode reference"); break; case H5R_BADTYPE: case H5R_MAXTYPE: default: assert("unknown reference type" && 0); - HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)") + HGOTO_ERROR(H5E_REFERENCE, H5E_UNSUPPORTED, FAIL, "internal error (unknown reference type)"); } /* end switch */ /* If no filename set, this is not an external reference */ if (NULL == H5R_REF_FILENAME(&tmp_ref)) { /* TODO temporary hack to retrieve file object */ if ((file_id = H5F_get_file_id(src_file, H5I_FILE, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Attach loc ID to reference and hold reference to it, this is a * user exposed reference so set app_ref to TRUE. */ if (H5R__set_loc_id(&tmp_ref, file_id, TRUE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference"); } /* end if */ /* Set output info */ @@ -795,7 +795,7 @@ H5T__ref_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbool_t /* Check if blob ID is "nil" */ if (H5VL_blob_specific(src_file, (void *)p, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to check if a blob ID is 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to check if a blob ID is 'nil'"); } done: @@ -836,7 +836,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf) /* Remove blob for old data */ if (H5VL_blob_specific(dst_file, (void *)p_bg, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob"); } /* end if */ /* Copy header manually so that it does not get encoded into the blob */ @@ -851,7 +851,7 @@ H5T__ref_disk_setnull(H5VL_object_t *dst_file, void *dst_buf, void *bg_buf) /* Set blob ID to "nil" */ if (H5VL_blob_specific(dst_file, q, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set a blob ID to 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set a blob ID to 'nil'"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -883,7 +883,7 @@ H5T__ref_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_bu /* Set reference type */ ref_type = (H5R_type_t)*p++; if (ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid reference type"); /* Set flags */ flags = (unsigned)*p++; @@ -944,7 +944,7 @@ H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_ /* Retrieve blob */ if (H5VL_blob_get(src_file, p, q, blob_size, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get blob"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -994,7 +994,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, /* Remove blob for old data */ if (H5VL_blob_specific(dst_file, (void *)p_bg, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob"); } /* end if */ /* Copy header manually so that it does not get encoded into the blob */ @@ -1015,7 +1015,7 @@ H5T__ref_disk_write(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, /* Store blob */ if (H5VL_blob_put(dst_file, p, src_size, q, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to put blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to put blob"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1052,7 +1052,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -1061,7 +1061,7 @@ H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, hbo /* Retrieve file from VOL object */ if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Get the object address */ H5F_addr_decode(src_f, &p, &addr); @@ -1102,7 +1102,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -1111,7 +1111,7 @@ H5T__ref_obj_disk_getsize(H5VL_object_t *src_file, const void H5_ATTR_UNUSED *sr /* 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object"); assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f)); @@ -1150,7 +1150,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_ /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -1159,7 +1159,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_ /* Retrieve file from VOL object */ if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); assert(src_size == H5T_REF_OBJ_DISK_SIZE(src_f)); assert(dst_size == H5F_SIZEOF_ADDR(src_f)); @@ -1167,7 +1167,7 @@ H5T__ref_obj_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_ /* Get object address */ if (H5R__decode_token_obj_compat((const unsigned char *)src_buf, &src_size, (H5O_token_t *)dst_buf, H5F_SIZEOF_ADDR(src_f)) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1204,7 +1204,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -1213,7 +1213,7 @@ H5T__ref_dsetreg_disk_isnull(const H5VL_object_t *src_file, const void *src_buf, /* Retrieve file from VOL object */ if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); /* Get the heap address */ H5F_addr_decode(src_f, &p, &addr); @@ -1257,14 +1257,14 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, const void /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, 0, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ 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") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "invalid VOL object"); assert(src_size == H5T_REF_DSETREG_DISK_SIZE(src_f)); } @@ -1308,7 +1308,7 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t /* Check if using native VOL connector */ if (H5VL_object_is_native(src_file, &is_native) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector"); /* Must use native VOL connector for this operation */ assert(is_native); @@ -1317,14 +1317,14 @@ H5T__ref_dsetreg_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t /* Retrieve file from VOL object */ if (NULL == (src_f = (H5F_t *)H5VL_object_data(src_file))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object"); 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, H5F_SIZEOF_ADDR(src_f), &dst_reg->space) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1352,7 +1352,7 @@ H5T__ref_reclaim(void *elem, const H5T_t *dt) 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") + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTFREE, FAIL, "cannot free reference"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c index 36bf37e..89034cc 100644 --- a/src/H5Tstrpad.c +++ b/src/H5Tstrpad.c @@ -47,11 +47,11 @@ H5Tget_strpad(hid_t type_id) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype"); while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class"); /* result */ if (H5T_IS_FIXED_STRING(dt->shared)) @@ -96,15 +96,15 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad) /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); if (H5T_STATE_TRANSIENT != dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only"); if (strpad < H5T_STR_NULLTERM || strpad >= H5T_NSTR) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type"); while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) dt = dt->shared->parent; /*defer to parent*/ if (!H5T_IS_STRING(dt->shared)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class"); /* Commit */ if (H5T_IS_FIXED_STRING(dt->shared)) diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c index 732cc76..73c05cb 100644 --- a/src/H5Tvisit.c +++ b/src/H5Tvisit.c @@ -95,7 +95,7 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) /* If the callback is to be made on the datatype first, do that */ if (is_complex && (visit_flags & H5T_VISIT_COMPLEX_FIRST)) if (op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed"); /* Make callback for each member/child, if requested */ switch (dt->shared->type) { @@ -105,7 +105,7 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) /* Visit each member of the compound datatype */ for (u = 0; u < dt->shared->u.compnd.nmembs; u++) if (H5T__visit(dt->shared->u.compnd.memb[u].type, visit_flags, op, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit member datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit member datatype"); } /* end case */ break; @@ -114,13 +114,13 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) case H5T_ENUM: /* Visit parent type */ if (H5T__visit(dt->shared->parent, visit_flags, op, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype"); break; case H5T_NO_CLASS: case H5T_NCLASSES: /* Not real values */ - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class") + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class"); break; case H5T_INTEGER: @@ -134,14 +134,14 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value) /* Visit "simple" datatypes here */ if (visit_flags & H5T_VISIT_SIMPLE) if (op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed"); break; } /* end switch */ /* If the callback is to be made on the datatype last, do that */ if (is_complex && (visit_flags & H5T_VISIT_COMPLEX_LAST)) if (op(dt, op_value) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "operator callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 826af92..87f0600 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -150,15 +150,15 @@ H5Tvlen_create(hid_t base_id) /* Check args */ if (NULL == (base = (H5T_t *)H5I_object_verify(base_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); /* Create up VL datatype */ if ((dt = H5T__vlen_create(base)) == NULL) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location"); /* Register the type */ if ((ret_value = H5I_register(H5I_DATATYPE, dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype"); done: FUNC_LEAVE_API(ret_value) @@ -189,7 +189,7 @@ H5T__vlen_create(const H5T_t *base) /* Build new type */ if (NULL == (dt = H5T__alloc())) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "memory allocation failed"); dt->shared->type = H5T_VLEN; /* @@ -198,7 +198,7 @@ H5T__vlen_create(const H5T_t *base) */ dt->shared->force_conv = TRUE; if (NULL == (dt->shared->parent = H5T_copy(base, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy base datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "can't copy base datatype"); /* Inherit encoding version from base type */ dt->shared->version = base->shared->version; @@ -208,7 +208,7 @@ H5T__vlen_create(const H5T_t *base) /* Set up VL information */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location"); /* Set return value */ ret_value = dt; @@ -274,7 +274,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Release owned file */ if (dt->shared->owned_vol_obj) { if (H5VL_free_object(dt->shared->owned_vol_obj) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object"); dt->shared->owned_vol_obj = NULL; } /* end if */ @@ -298,7 +298,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* Get container info */ if (H5VL_file_get(file, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get container info"); /* The datatype size is equal to 4 bytes for the sequence length * plus the size of a blob id */ @@ -313,7 +313,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) /* dt now owns a reference to file */ if (H5T_own_vol_obj(dt, file) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't give ownership of VOL object"); break; } @@ -333,7 +333,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc) case H5T_LOC_MAXLOC: /* MAXLOC is invalid */ default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype location") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype location"); } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Indicate that the location changed */ @@ -511,11 +511,11 @@ H5T__vlen_mem_seq_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc if (vl_alloc_info->alloc_func != NULL) { if (NULL == (vl.p = (vl_alloc_info->alloc_func)(len, vl_alloc_info->alloc_info))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, - "application memory allocation routine failed for VL data") + "application memory allocation routine failed for VL data"); } /* end if */ else /* Default to system malloc */ if (NULL == (vl.p = malloc(len))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data"); /* Copy the data into the newly allocated buffer */ H5MM_memcpy(vl.p, buf, len); @@ -686,11 +686,11 @@ H5T__vlen_mem_str_write(H5VL_object_t H5_ATTR_UNUSED *file, const H5T_vlen_alloc if (NULL == (t = (char *)(vl_alloc_info->alloc_func)((seq_len + 1) * base_size, vl_alloc_info->alloc_info))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, - "application memory allocation routine failed for VL data") + "application memory allocation routine failed for VL data"); } /* end if */ else /* Default to system malloc */ if (NULL == (t = (char *)malloc((seq_len + 1) * base_size))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed for VL data"); /* 'write' the string into the buffer, with memcpy() */ len = (seq_len * base_size); @@ -762,7 +762,7 @@ H5T__vlen_disk_isnull(const H5VL_object_t *file, void *_vl, hbool_t *isnull) /* Check if blob ID is "nil" */ if (H5VL_blob_specific(file, vl, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to check if a blob ID is 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to check if a blob ID is 'nil'"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -794,7 +794,7 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg) if (bg != NULL) /* Delete sequence in destination location */ if (H5T__vlen_disk_delete(file, bg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove background heap object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove background heap object"); /* Set the length of the sequence */ UINT32ENCODE(vl, 0); @@ -804,7 +804,7 @@ H5T__vlen_disk_setnull(H5VL_object_t *file, void *_vl, void *bg) /* Set blob ID to "nil" */ if (H5VL_blob_specific(file, vl, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set a blob ID to 'nil'") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set a blob ID to 'nil'"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -837,7 +837,7 @@ H5T__vlen_disk_read(H5VL_object_t *file, void *_vl, void *buf, size_t len) /* Retrieve blob */ if (H5VL_blob_get(file, vl, buf, len, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get blob"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -870,14 +870,14 @@ H5T__vlen_disk_write(H5VL_object_t *file, const H5T_vlen_alloc_info_t H5_ATTR_UN /* Free heap object for old data, if non-NULL */ if (bg != NULL) if (H5T__vlen_disk_delete(file, bg) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove background heap object") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove background heap object"); /* Set the length of the sequence */ UINT32ENCODE(vl, seq_len); /* Store blob */ if (H5VL_blob_put(file, buf, (seq_len * base_size), vl, NULL) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to put blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to put blob"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -918,7 +918,7 @@ H5T__vlen_disk_delete(H5VL_object_t *file, void *_vl) vol_cb_args.op_type = H5VL_BLOB_DELETE; if (H5VL_blob_specific(file, vl, &vol_cb_args) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to delete blob"); } /* end if */ } /* end if */ @@ -964,7 +964,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info for (u = 0; u < dt->shared->u.array.nelem; u++) { off = ((uint8_t *)elem) + u * (dt->shared->parent->shared->size); if (H5T_reclaim_cb(off, dt->shared->parent, 0, NULL, alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free array element") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free array element"); } /* end for */ } /* end if */ break; @@ -979,7 +979,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info /* Calculate the offset member and recurse on it */ off = ((uint8_t *)elem) + dt->shared->u.compnd.memb[u].offset; if (H5T_reclaim_cb(off, dt->shared->u.compnd.memb[u].type, 0, NULL, alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free compound field") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free compound field"); } /* end if */ } /* end for */ break; @@ -999,7 +999,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info while (vl->len > 0) { off = ((uint8_t *)vl->p) + (vl->len - 1) * dt->shared->parent->shared->size; if (H5T_reclaim_cb(off, dt->shared->parent, 0, NULL, alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free VL element") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free VL element"); vl->len--; } /* end while */ } /* end if */ @@ -1038,7 +1038,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info case H5T_NO_CLASS: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype class") + HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype class"); break; } /* end switch */ /*lint !e788 All appropriate cases are covered */ @@ -1073,11 +1073,11 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt) /* Get VL allocation info */ if (H5CX_get_vlen_alloc_info(&vl_alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info"); /* Recurse on buffer to free dynamic fields */ if (H5T__vlen_reclaim(elem, dt, &vl_alloc_info) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5UC.c b/src/H5UC.c index 60a4456..00da530 100644 --- a/src/H5UC.c +++ b/src/H5UC.c @@ -63,7 +63,7 @@ H5UC_create(void *o, H5UC_free_func_t free_func) /* Allocate ref-counted string structure */ if (NULL == (ret_value = H5FL_MALLOC(H5UC_t))) - HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed"); /* Set the internal fields */ ret_value->o = o; @@ -113,7 +113,7 @@ H5UC_decr(H5UC_t *rc) if (rc->n == 0) { if ((rc->free_func)(rc->o) < 0) { rc = H5FL_FREE(H5UC_t, rc); - HGOTO_ERROR(H5E_RS, H5E_CANTFREE, FAIL, "memory release failed") + HGOTO_ERROR(H5E_RS, H5E_CANTFREE, FAIL, "memory release failed"); } /* end if */ rc = H5FL_FREE(H5UC_t, rc); } /* end if */ diff --git a/src/H5VL.c b/src/H5VL.c index fd2f046..53c72f7 100644 --- a/src/H5VL.c +++ b/src/H5VL.c @@ -91,11 +91,11 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id) if (H5P_DEFAULT == vipl_id) vipl_id = H5P_VOL_INITIALIZE_DEFAULT; else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list"); /* Register connector */ if ((ret_value = H5VL__register_connector_by_class(cls, TRUE, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector"); done: FUNC_LEAVE_API(ret_value) @@ -128,20 +128,20 @@ H5VLregister_connector_by_name(const char *name, hid_t vipl_id) /* Check arguments */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null VOL connector name is disallowed") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "null VOL connector name is disallowed"); if (0 == HDstrlen(name)) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "zero-length VOL connector name is disallowed") + "zero-length VOL connector name is disallowed"); /* Check VOL initialization property list */ if (H5P_DEFAULT == vipl_id) vipl_id = H5P_VOL_INITIALIZE_DEFAULT; else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list"); /* Register connector */ if ((ret_value = H5VL__register_connector_by_name(name, TRUE, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector"); done: FUNC_LEAVE_API(ret_value) @@ -175,17 +175,17 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id) /* Check arguments */ if (value < 0) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "negative VOL connector value is disallowed") + "negative VOL connector value is disallowed"); /* Check VOL initialization property list */ if (H5P_DEFAULT == vipl_id) vipl_id = H5P_VOL_INITIALIZE_DEFAULT; else if (TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list"); /* Register connector */ if ((ret_value = H5VL__register_connector_by_value(value, TRUE, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector"); done: FUNC_LEAVE_API(ret_value) @@ -213,7 +213,7 @@ H5VLis_connector_registered_by_name(const char *name) /* Check if connector with this name is registered */ if ((ret_value = H5VL__is_connector_registered_by_name(name)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL"); done: FUNC_LEAVE_API(ret_value) @@ -241,7 +241,7 @@ H5VLis_connector_registered_by_value(H5VL_class_value_t connector_value) /* Check if connector with this value is registered */ if ((ret_value = H5VL__is_connector_registered_by_value(connector_value)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check for VOL"); done: FUNC_LEAVE_API(ret_value) @@ -269,7 +269,7 @@ H5VLget_connector_id(hid_t obj_id) /* Get connector ID */ if ((ret_value = H5VL__get_connector_id(obj_id, TRUE)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id"); done: FUNC_LEAVE_API(ret_value) @@ -299,7 +299,7 @@ H5VLget_connector_id_by_name(const char *name) /* Get connector ID with this name */ if ((ret_value = H5VL__get_connector_id_by_name(name, TRUE)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id"); done: FUNC_LEAVE_API(ret_value) @@ -329,7 +329,7 @@ H5VLget_connector_id_by_value(H5VL_class_value_t connector_value) /* Get connector ID with this value */ if ((ret_value = H5VL__get_connector_id_by_value(connector_value, TRUE)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id"); done: FUNC_LEAVE_API(ret_value) @@ -360,7 +360,7 @@ H5VLpeek_connector_id_by_name(const char *name) /* Get connector ID with this name */ if ((ret_value = H5VL__peek_connector_id_by_name(name)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id"); done: FUNC_LEAVE_API(ret_value) @@ -391,7 +391,7 @@ H5VLpeek_connector_id_by_value(H5VL_class_value_t value) /* Get connector ID with this value */ if ((ret_value = H5VL__peek_connector_id_by_value(value)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL id"); done: FUNC_LEAVE_API(ret_value) @@ -424,7 +424,7 @@ H5VLget_connector_name(hid_t obj_id, char *name /*out*/, size_t size) /* Call internal routine */ if ((ret_value = H5VL__get_connector_name(obj_id, name, size)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "Can't get connector name") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "Can't get connector name"); done: FUNC_LEAVE_API(ret_value) @@ -453,11 +453,11 @@ H5VLclose(hid_t vol_id) /* Check args */ if (NULL == H5I_object_verify(vol_id, H5I_VOL)) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector"); /* Decrement the ref count on the ID, possibly releasing the VOL connector */ if (H5I_dec_app_ref(vol_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to close VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to close VOL connector ID"); done: FUNC_LEAVE_API(ret_value) @@ -491,22 +491,22 @@ H5VLunregister_connector(hid_t vol_id) /* Check arguments */ if (NULL == H5I_object_verify(vol_id, H5I_VOL)) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* For the time being, we disallow unregistering the native VOL connector */ if (H5I_INVALID_HID == (native_id = H5VL__get_connector_id_by_name(H5VL_NATIVE_NAME, FALSE))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to find the native VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to find the native VOL connector ID"); if (vol_id == native_id) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "unregistering the native VOL connector is not allowed") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "unregistering the native VOL connector is not allowed"); /* The H5VL_class_t struct will be freed by this function */ if (H5I_dec_app_ref(vol_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to unregister VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to unregister VOL connector"); done: if (native_id != H5I_INVALID_HID) if (H5I_dec_ref(native_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement count on native_id") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement count on native_id"); FUNC_LEAVE_API(ret_value) } /* end H5VLunregister_connector() */ @@ -536,13 +536,13 @@ H5VLcmp_connector_cls(int *cmp, hid_t connector_id1, hid_t connector_id2) /* Check args and get class pointers */ if (NULL == (cls1 = (H5VL_class_t *)H5I_object_verify(connector_id1, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (NULL == (cls2 = (H5VL_class_t *)H5I_object_verify(connector_id2, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Compare the two VOL connector classes */ if (H5VL_cmp_connector_cls(cmp, cls1, cls2) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); done: FUNC_LEAVE_API(ret_value) @@ -603,14 +603,14 @@ H5VLwrap_register(void *obj, H5I_type_t type) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_VOL, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number") + HGOTO_ERROR(H5E_VOL, H5E_BADRANGE, H5I_INVALID_HID, "invalid type number"); } /* end switch */ if (NULL == obj) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, H5I_INVALID_HID, "obj is NULL") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, H5I_INVALID_HID, "obj is NULL"); /* Wrap the object and register an ID for it */ if ((ret_value = H5VL_wrap_register(type, obj, TRUE)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to wrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to wrap object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -640,7 +640,7 @@ H5VLobject(hid_t id) /* Retrieve the object pointer for the ID */ if (NULL == (ret_value = H5VL_object(id))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to retrieve object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to retrieve object"); done: FUNC_LEAVE_API(ret_value) @@ -666,14 +666,14 @@ H5VLobject_is_native(hid_t obj_id, hbool_t *is_native) H5TRACE2("e", "i*b", obj_id, is_native); if (!is_native) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`is_native` argument is NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`is_native` argument is NULL"); /* Get the location object for the ID */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); if (H5VL_object_is_native(vol_obj, is_native) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine if object is a native connector object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine if object is a native connector object"); done: FUNC_LEAVE_API(ret_value) @@ -703,34 +703,34 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id) /* Check args */ if (!file_obj) - HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "no file object supplied") + HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "no file object supplied"); if (NULL == (dtype = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); /* Create VOL object for file if necessary (force_conv will be TRUE if and * only if file needs to be passed to H5T_set_loc) */ if (H5T_GET_FORCE_CONV(dtype) && (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object"); /* Copy the datatype */ if (NULL == (file_type = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy datatype"); /* Register file type id */ if ((file_type_id = H5I_register(H5I_DATATYPE, file_type, FALSE)) < 0) { (void)H5T_close_real(file_type); - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "unable to register file datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "unable to register file datatype"); } /* end if */ /* Set the location of the datatype to be in the file */ if (H5T_set_loc(file_type, file_vol_obj, H5T_LOC_DISK) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't set datatype location") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't set datatype location"); /* Release our reference to file_type */ if (file_vol_obj) { if (H5VL_free_object(file_vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to free VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to free VOL object"); file_vol_obj = NULL; } /* end if */ @@ -774,11 +774,11 @@ H5VLretrieve_lib_state(void **state /*out*/) /* Check args */ if (NULL == state) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "invalid state pointer") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "invalid state pointer"); /* Retrieve the library state */ if (H5VL_retrieve_lib_state(state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve library state") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve library state"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -808,7 +808,7 @@ H5VLstart_lib_state(void) /* Start a new library state */ if (H5VL_start_lib_state() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't start new library state") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't start new library state"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -838,11 +838,11 @@ H5VLrestore_lib_state(const void *state) /* Check args */ if (NULL == state) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "invalid state pointer") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "invalid state pointer"); /* Restore the library state */ if (H5VL_restore_lib_state(state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't restore library state") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't restore library state"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -877,7 +877,7 @@ H5VLfinish_lib_state(void) /* Reset the library state */ if (H5VL_finish_lib_state() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset library state") + HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset library state"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -909,11 +909,11 @@ H5VLfree_lib_state(void *state) /* Check args */ if (NULL == state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid state pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid state pointer"); /* Free the library state */ if (H5VL_free_lib_state(state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "can't free library state") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "can't free library state"); done: FUNC_LEAVE_API(ret_value) @@ -942,13 +942,13 @@ H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, uint64_t /* Check args */ if (NULL == flags) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid 'flags' pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid 'flags' pointer"); if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier"); /* Query the connector */ if (H5VL_introspect_opt_query(vol_obj, subcls, opt_type, flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to query VOL connector operation") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to query VOL connector operation"); done: FUNC_LEAVE_API(ret_value) @@ -993,20 +993,20 @@ H5VLregister_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_ /* Check args */ if (NULL == op_val) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_val pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_val pointer"); if (NULL == op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer"); if ('\0' == *op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string"); if (!((H5VL_SUBCLS_ATTR == subcls) || (H5VL_SUBCLS_DATASET == subcls) || (H5VL_SUBCLS_DATATYPE == subcls) || (H5VL_SUBCLS_FILE == subcls) || (H5VL_SUBCLS_GROUP == subcls) || (H5VL_SUBCLS_OBJECT == subcls) || (H5VL_SUBCLS_LINK == subcls) || (H5VL_SUBCLS_REQUEST == subcls))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type"); /* Register the operation */ if (H5VL__register_opt_operation(subcls, op_name, op_val) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register dynamic optional operation: '%s'", - op_name) + op_name); done: FUNC_LEAVE_API(ret_value) @@ -1032,19 +1032,19 @@ H5VLfind_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_val /* Check args */ if (NULL == op_val) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_val pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_val pointer"); if (NULL == op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer"); if ('\0' == *op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string"); if (!((H5VL_SUBCLS_ATTR == subcls) || (H5VL_SUBCLS_DATASET == subcls) || (H5VL_SUBCLS_DATATYPE == subcls) || (H5VL_SUBCLS_FILE == subcls) || (H5VL_SUBCLS_GROUP == subcls) || (H5VL_SUBCLS_OBJECT == subcls) || (H5VL_SUBCLS_LINK == subcls) || (H5VL_SUBCLS_REQUEST == subcls))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type"); /* Find the operation */ if (H5VL__find_opt_operation(subcls, op_name, op_val) < 0) - HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "can't find dynamic optional operation: '%s'", op_name) + HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "can't find dynamic optional operation: '%s'", op_name); done: FUNC_LEAVE_API(ret_value) @@ -1070,18 +1070,18 @@ H5VLunregister_opt_operation(H5VL_subclass_t subcls, const char *op_name) /* Check args */ if (NULL == op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name pointer"); if ('\0' == *op_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid op_name string"); if (!((H5VL_SUBCLS_ATTR == subcls) || (H5VL_SUBCLS_DATASET == subcls) || (H5VL_SUBCLS_DATATYPE == subcls) || (H5VL_SUBCLS_FILE == subcls) || (H5VL_SUBCLS_GROUP == subcls) || (H5VL_SUBCLS_OBJECT == subcls) || (H5VL_SUBCLS_LINK == subcls) || (H5VL_SUBCLS_REQUEST == subcls))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid VOL subclass type"); /* Unregister the operation */ if (H5VL__unregister_opt_operation(subcls, op_name) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTREMOVE, FAIL, "can't unregister dynamic optional operation: '%s'", - op_name) + op_name); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index 95df78b..e1dda22 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -226,11 +226,11 @@ H5VLinitialize(hid_t connector_id, hid_t vipl_id) /* Check args */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Invoke class' callback, if there is one */ if (cls->initialize && cls->initialize(vipl_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not initialize") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not initialize"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -257,11 +257,11 @@ H5VLterminate(hid_t connector_id) /* Check args */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Invoke class' callback, if there is one */ if (cls->terminate && cls->terminate() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not terminate cleanly") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not terminate cleanly"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -288,7 +288,7 @@ H5VLget_cap_flags(hid_t connector_id, uint64_t *cap_flags /*out*/) /* Check args */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Retrieve capability flags */ if (cap_flags) @@ -319,7 +319,7 @@ H5VLget_value(hid_t connector_id, H5VL_class_value_t *value /*out*/) /* Check args */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Retrieve connector value */ if (value) @@ -352,11 +352,11 @@ H5VL__common_optional_op(hid_t id, H5I_type_t id_type, H5VL_reg_opt_oper_t reg_o /* Check ID type & get VOL object */ if (NULL == (*vol_obj_ptr = (H5VL_object_t *)H5I_object_verify(id, id_type))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid identifier"); /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(*vol_obj_ptr) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -399,15 +399,15 @@ H5VL_copy_connector_info(const H5VL_class_t *connector, void **dst_info, const v /* Allow the connector to copy or do it ourselves */ if (connector->info_cls.copy) { if (NULL == (new_connector_info = (connector->info_cls.copy)(src_info))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "connector info copy callback failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "connector info copy callback failed"); } /* end if */ else if (connector->info_cls.size > 0) { if (NULL == (new_connector_info = H5MM_malloc(connector->info_cls.size))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "connector info allocation failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "connector info allocation failed"); H5MM_memcpy(new_connector_info, src_info, connector->info_cls.size); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "no way to copy connector info") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "no way to copy connector info"); } /* end if */ /* Set the connector info for the copy */ @@ -438,11 +438,11 @@ H5VLcopy_connector_info(hid_t connector_id, void **dst_vol_info, void *src_vol_i /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Copy the VOL connector's info object */ if (H5VL_copy_connector_info(cls, dst_vol_info, src_vol_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy VOL connector info object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy VOL connector info object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -492,7 +492,7 @@ H5VL_cmp_connector_info(const H5VL_class_t *connector, int *cmp_value, const voi */ if (connector->info_cls.cmp) { if ((connector->info_cls.cmp)(cmp_value, info1, info2) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector info"); } /* end if */ else { assert(connector->info_cls.size > 0); @@ -529,7 +529,7 @@ H5VLcmp_connector_info(int *cmp, hid_t connector_id, const void *info1, const vo /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Compare the two VOL connector info objects */ if (cmp) @@ -562,7 +562,7 @@ H5VL_free_connector_info(hid_t connector_id, const void *info) /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Only free info object, if it's non-NULL */ if (info) { @@ -570,7 +570,7 @@ H5VL_free_connector_info(hid_t connector_id, const void *info) if (cls->info_cls.free) { /* Cast through uintptr_t to de-const memory */ if ((cls->info_cls.free)((void *)(uintptr_t)info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector info free request failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector info free request failed"); } else H5MM_xfree_const(info); @@ -600,7 +600,7 @@ H5VLfree_connector_info(hid_t connector_id, void *info) /* Free the VOL connector info object */ if (H5VL_free_connector_info(connector_id, info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -630,12 +630,12 @@ H5VLconnector_info_to_str(const void *info, hid_t connector_id, char **str) /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allow the connector to serialize info */ if (cls->info_cls.to_str) { if ((cls->info_cls.to_str)(info, str) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "can't serialize connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "can't serialize connector info"); } /* end if */ else *str = NULL; @@ -667,7 +667,7 @@ H5VLconnector_str_to_info(const char *str, hid_t connector_id, void **info /*out /* Call internal routine */ if (H5VL__connector_str_to_info(str, connector_id, info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "can't deserialize connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "can't deserialize connector info"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -694,9 +694,9 @@ H5VLget_object(void *obj, hid_t connector_id) /* Check args */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Check for 'get_object' callback in connector */ if (cls->wrap_cls.get_object) @@ -737,7 +737,7 @@ H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx) /* Invoke connector's callback */ if ((connector->wrap_cls.get_wrap_ctx)(obj, wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "connector wrap context callback failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "connector wrap context callback failed"); } /* end if */ else *wrap_ctx = NULL; @@ -767,11 +767,11 @@ H5VLget_wrap_ctx(void *obj, hid_t connector_id, void **wrap_ctx /*out*/) /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Get the VOL connector's object wrapper */ if (H5VL_get_wrap_ctx(cls, obj, wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to retrieve VOL connector object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to retrieve VOL connector object wrap context"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -802,7 +802,7 @@ H5VL_wrap_object(const H5VL_class_t *connector, void *wrap_ctx, void *obj, H5I_t if (wrap_ctx) { /* Ask the connector to wrap the object */ if (NULL == (ret_value = (connector->wrap_cls.wrap_object)(obj, obj_type, wrap_ctx))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't wrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't wrap object"); } /* end if */ else ret_value = obj; @@ -832,13 +832,13 @@ H5VLwrap_object(void *obj, H5I_type_t obj_type, hid_t connector_id, void *wrap_c /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Wrap the object */ if (NULL == (ret_value = H5VL_wrap_object(cls, wrap_ctx, obj, obj_type))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to wrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to wrap object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -869,7 +869,7 @@ H5VL_unwrap_object(const H5VL_class_t *connector, void *obj) if (connector->wrap_cls.wrap_object) { /* Ask the connector to unwrap the object */ if (NULL == (ret_value = (connector->wrap_cls.unwrap_object)(obj))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't unwrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't unwrap object"); } /* end if */ else ret_value = obj; @@ -899,13 +899,13 @@ H5VLunwrap_object(void *obj, hid_t connector_id) /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Unwrap the object */ if (NULL == (ret_value = H5VL_unwrap_object(cls, obj))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to unwrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "unable to unwrap object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -935,7 +935,7 @@ H5VL_free_wrap_ctx(const H5VL_class_t *connector, void *wrap_ctx) if (wrap_ctx) { /* Free the connector's object wrapping context */ if ((connector->wrap_cls.free_wrap_ctx)(wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector wrap context free request failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "connector wrap context free request failed"); } /* end if */ done: @@ -963,11 +963,11 @@ H5VLfree_wrap_ctx(void *wrap_ctx, hid_t connector_id) /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Release the VOL connector's object wrapper */ if (H5VL_free_wrap_ctx(cls, wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector object wrap context"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -993,12 +993,12 @@ H5VL__attr_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cla /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.create) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'attr create' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'attr create' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->attr_cls.create)(obj, loc_params, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1025,13 +1025,13 @@ H5VL_attr_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_para /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__attr_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "attribute create failed"); done: /* Reset object wrapping info in API context */ @@ -1065,14 +1065,14 @@ H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_ /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__attr_create(obj, loc_params, cls, name, type_id, space_id, acpl_id, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create attribute") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create attribute"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1098,11 +1098,11 @@ H5VL__attr_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'attr open' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'attr open' method"); /* Call the corresponding VOL open callback */ if (NULL == (ret_value = (cls->attr_cls.open)(obj, loc_params, name, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "attribute open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "attribute open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1129,13 +1129,13 @@ H5VL_attr_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__attr_open(vol_obj->data, loc_params, vol_obj->connector->cls, name, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "attribute open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "attribute open failed"); done: /* Reset object wrapping info in API context */ @@ -1167,13 +1167,13 @@ H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__attr_open(obj, loc_params, cls, name, aapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open attribute") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open attribute"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1198,11 +1198,11 @@ H5VL__attr_read(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, void *buf /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.read) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr read' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr read' method"); /* Call the corresponding VOL callback */ if ((cls->attr_cls.read)(obj, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "attribute read failed") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "attribute read failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1228,12 +1228,12 @@ H5VL_attr_read(const H5VL_object_t *vol_obj, hid_t mem_type_id, void *buf, hid_t /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__attr_read(vol_obj->data, vol_obj->connector->cls, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "attribute read failed") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "attribute read failed"); done: /* Reset object wrapping info in API context */ @@ -1264,13 +1264,13 @@ H5VLattr_read(void *obj, hid_t connector_id, hid_t mem_type_id, void *buf, hid_t /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__attr_read(obj, cls, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "unable to read attribute") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "unable to read attribute"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1296,11 +1296,11 @@ H5VL__attr_write(void *obj, const H5VL_class_t *cls, hid_t mem_type_id, const vo /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.write) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr write' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr write' method"); /* Call the corresponding VOL callback */ if ((cls->attr_cls.write)(obj, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "write failed") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1326,12 +1326,12 @@ H5VL_attr_write(const H5VL_object_t *vol_obj, hid_t mem_type_id, const void *buf /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__attr_write(vol_obj->data, vol_obj->connector->cls, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "write failed") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "write failed"); done: /* Reset object wrapping info in API context */ @@ -1363,13 +1363,13 @@ H5VLattr_write(void *obj, hid_t connector_id, hid_t mem_type_id, const void *buf /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__attr_write(obj, cls, mem_type_id, buf, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "unable to write attribute") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "unable to write attribute"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1394,11 +1394,11 @@ H5VL__attr_get(void *obj, const H5VL_class_t *cls, H5VL_attr_get_args_t *args, h /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr get' method"); /* Call the corresponding VOL callback */ if ((cls->attr_cls.get)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1424,12 +1424,12 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_args_t *args, hid_t dx /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__attr_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed"); done: /* Reset object wrapping info in API context */ @@ -1460,15 +1460,15 @@ H5VLattr_get(void *obj, hid_t connector_id, H5VL_attr_get_args_t *args, hid_t dx /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (NULL == args) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument struct"); /* Call the corresponding internal VOL routine */ if (H5VL__attr_get(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to get attribute information") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to get attribute information"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1494,7 +1494,7 @@ H5VL__attr_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr specific' method"); /* Call the corresponding VOL callback */ /* (Must return value from callback, for iterators) */ @@ -1526,7 +1526,7 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -1565,9 +1565,9 @@ H5VLattr_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connecto /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ /* (Must return value from callback, for iterators) */ @@ -1597,7 +1597,7 @@ H5VL__attr_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr optional' method"); /* Call the corresponding VOL callback */ /* (Must return value from callback, for iterators) */ @@ -1628,7 +1628,7 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -1666,9 +1666,9 @@ H5VLattr_optional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, hid /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ /* (Must return value from callback, for iterators) */ @@ -1708,7 +1708,7 @@ H5VLattr_optional_op(const char *app_file, const char *app_func, unsigned app_li /* Call the common VOL connector optional routine */ if ((ret_value = H5VL__common_optional_op(attr_id, H5I_ATTR, H5VL__attr_optional, args, dxpl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -1716,7 +1716,7 @@ H5VLattr_optional_op(const char *app_file, const char *app_func, unsigned app_li if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, attr_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -1741,11 +1741,11 @@ H5VL__attr_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req) /* Check if the corresponding VOL callback exists */ if (NULL == cls->attr_cls.close) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr close' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'attr close' method"); /* Call the corresponding VOL callback */ if ((cls->attr_cls.close)(obj, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "attribute close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "attribute close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1773,7 +1773,7 @@ H5VL_attr_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req) /* Call the corresponding internal VOL routine */ if (H5VL__attr_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "attribute close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "attribute close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1800,13 +1800,13 @@ H5VLattr_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/) /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__attr_close(obj, cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close attribute"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1833,12 +1833,12 @@ H5VL__dataset_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_ /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.create) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'dataset create' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'dataset create' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->dataset_cls.create)(obj, loc_params, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1866,14 +1866,14 @@ H5VL_dataset_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_p /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__dataset_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "dataset create failed"); done: /* Reset object wrapping info in API context */ @@ -1907,14 +1907,14 @@ H5VLdataset_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connect /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__dataset_create(obj, loc_params, cls, name, lcpl_id, type_id, space_id, dcpl_id, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create dataset"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -1940,11 +1940,11 @@ H5VL__dataset_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cl /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'dataset open' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'dataset open' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->dataset_cls.open)(obj, loc_params, name, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "dataset open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "dataset open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1971,13 +1971,13 @@ H5VL_dataset_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_par /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__dataset_open(vol_obj->data, loc_params, vol_obj->connector->cls, name, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "dataset open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "dataset open failed"); done: /* Reset object wrapping info in API context */ @@ -2009,13 +2009,13 @@ H5VLdataset_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__dataset_open(obj, loc_params, cls, name, dapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open dataset"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2041,11 +2041,11 @@ H5VL__dataset_read(size_t count, void *obj[], const H5VL_class_t *cls, hid_t mem /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.read) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset read' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset read' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.read)(count, obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2083,13 +2083,13 @@ H5VL_dataset_read_direct(size_t count, void *obj[], H5VL_t *connector, hid_t mem tmp_vol_obj.connector = connector; tmp_vol_obj.rc = 1; if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_read(count, obj, connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed"); done: /* Reset object wrapping info in API context */ @@ -2126,13 +2126,13 @@ H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_i /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj[0]) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Allocate obj array if necessary */ if (count > 1) if (NULL == (obj = (void **)H5MM_malloc(count * sizeof(void *)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array"); /* Build obj array */ for (i = 0; i < count; i++) { @@ -2143,13 +2143,13 @@ H5VL_dataset_read(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_i if (vol_obj[i]->connector->cls->value != vol_obj[0]->connector->cls->value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datasets are accessed through different VOL connectors and can't be used in the " - "same I/O call") + "same I/O call"); } /* Call the corresponding internal VOL routine */ if (H5VL__dataset_read(count, obj, vol_obj[0]->connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "dataset read failed"); done: /* Reset object wrapping info in API context */ @@ -2187,24 +2187,24 @@ H5VLdataset_read(size_t count, void *obj[], hid_t connector_id, hid_t mem_type_i /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj array not provided"); for (i = 1; i < count; i++) if (NULL == obj[i]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == mem_type_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided"); if (NULL == mem_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided"); if (NULL == file_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided"); if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_read(count, obj, cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to read dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to read dataset"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2230,11 +2230,11 @@ H5VL__dataset_write(size_t count, void *obj[], const H5VL_class_t *cls, hid_t me /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.write) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset write' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset write' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.write)(count, obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2273,13 +2273,13 @@ H5VL_dataset_write_direct(size_t count, void *obj[], H5VL_t *connector, hid_t me tmp_vol_obj.connector = connector; tmp_vol_obj.rc = 1; if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_write(count, obj, connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed"); done: /* Reset object wrapping info in API context */ @@ -2316,13 +2316,13 @@ H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_ /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj[0]) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Allocate obj array if necessary */ if (count > 1) if (NULL == (obj = (void **)H5MM_malloc(count * sizeof(void *)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate space for object array"); /* Build obj array */ for (i = 0; i < count; i++) { @@ -2333,13 +2333,13 @@ H5VL_dataset_write(size_t count, const H5VL_object_t *vol_obj[], hid_t mem_type_ if (vol_obj[i]->connector->cls->value != vol_obj[0]->connector->cls->value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "datasets are accessed through different VOL connectors and can't be used in the " - "same I/O call") + "same I/O call"); } /* Call the corresponding internal VOL routine */ if (H5VL__dataset_write(count, obj, vol_obj[0]->connector->cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "dataset write failed"); done: /* Reset object wrapping info in API context */ @@ -2377,24 +2377,24 @@ H5VLdataset_write(size_t count, void *obj[], hid_t connector_id, hid_t mem_type_ /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "obj array not provided"); for (i = 1; i < count; i++) if (NULL == obj[i]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == mem_type_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_type_id array not provided"); if (NULL == mem_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mem_space_id array not provided"); if (NULL == file_space_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file_space_id array not provided"); if (NULL == buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buf array not provided"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_write(count, obj, cls, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to write dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to write dataset"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2420,11 +2420,11 @@ H5VL__dataset_get(void *obj, const H5VL_class_t *cls, H5VL_dataset_get_args_t *a /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset get' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.get)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2450,12 +2450,12 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_args_t *args, hi /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed"); done: /* Reset object wrapping info in API context */ @@ -2487,13 +2487,13 @@ H5VLdataset_get(void *obj, hid_t connector_id, H5VL_dataset_get_args_t *args, hi /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_get(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute dataset get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute dataset get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2519,11 +2519,11 @@ H5VL__dataset_specific(void *obj, const H5VL_class_t *cls, H5VL_dataset_specific /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset specific' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.specific)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2550,12 +2550,12 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_args_t /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback"); done: /* Reset object wrapping info in API context */ @@ -2587,13 +2587,13 @@ H5VLdataset_specific(void *obj, hid_t connector_id, H5VL_dataset_specific_args_t /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_specific(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2619,11 +2619,11 @@ H5VL__dataset_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset optional' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.optional)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2649,12 +2649,12 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback"); done: /* Reset object wrapping info in API context */ @@ -2686,13 +2686,13 @@ H5VLdataset_optional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_optional(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2727,7 +2727,7 @@ H5VLdataset_optional_op(const char *app_file, const char *app_func, unsigned app /* Call the corresponding internal VOL routine */ if (H5VL__common_optional_op(dset_id, H5I_DATASET, H5VL__dataset_optional, args, dxpl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -2735,7 +2735,7 @@ H5VLdataset_optional_op(const char *app_file, const char *app_func, unsigned app if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, dset_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -2764,11 +2764,11 @@ H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **re /* Check if the corresponding VOL callback exists */ if (NULL == cls->dataset_cls.close) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset close' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'dataset close' method"); /* Call the corresponding VOL callback */ if ((cls->dataset_cls.close)(obj, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "dataset close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "dataset close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2800,12 +2800,12 @@ H5VL_dataset_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__dataset_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "dataset close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "dataset close failed"); done: /* Reset object wrapping info in API context */ @@ -2836,13 +2836,13 @@ H5VLdataset_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__dataset_close(obj, cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close dataset"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2869,12 +2869,12 @@ H5VL__datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, const H5VL /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.commit) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'datatype commit' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'datatype commit' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->datatype_cls.commit)(obj, loc_params, name, type_id, lcpl_id, tcpl_id, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "datatype commit failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "datatype commit failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2901,13 +2901,13 @@ H5VL_datatype_commit(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_ /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__datatype_commit(vol_obj->data, loc_params, vol_obj->connector->cls, name, type_id, lcpl_id, tcpl_id, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "datatype commit failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "datatype commit failed"); done: /* Reset object wrapping info in API context */ @@ -2941,14 +2941,14 @@ H5VLdatatype_commit(void *obj, const H5VL_loc_params_t *loc_params, hid_t connec /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__datatype_commit(obj, loc_params, cls, name, type_id, lcpl_id, tcpl_id, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to commit datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to commit datatype"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -2974,11 +2974,11 @@ H5VL__datatype_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "no datatype open callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "no datatype open callback"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->datatype_cls.open)(obj, loc_params, name, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "datatype open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "datatype open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3005,13 +3005,13 @@ H5VL_datatype_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__datatype_open(vol_obj->data, loc_params, vol_obj->connector->cls, name, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "datatype open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "datatype open failed"); done: /* Reset object wrapping info in API context */ @@ -3043,13 +3043,13 @@ H5VLdatatype_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connecto /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__datatype_open(obj, loc_params, cls, name, tapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open datatype"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3075,11 +3075,11 @@ H5VL__datatype_get(void *obj, const H5VL_class_t *cls, H5VL_datatype_get_args_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype get' method"); /* Call the corresponding VOL callback */ if ((cls->datatype_cls.get)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype 'get' failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype 'get' failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3105,12 +3105,12 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_args_t *args, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__datatype_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype get failed"); done: /* Reset object wrapping info in API context */ @@ -3142,13 +3142,13 @@ H5VLdatatype_get(void *obj, hid_t connector_id, H5VL_datatype_get_args_t *args, /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__datatype_get(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute datatype get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute datatype get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3174,11 +3174,11 @@ H5VL__datatype_specific(void *obj, const H5VL_class_t *cls, H5VL_datatype_specif /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype specific' method"); /* Call the corresponding VOL callback */ if ((cls->datatype_cls.specific)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3205,12 +3205,12 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_args /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__datatype_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback"); done: /* Reset object wrapping info in API context */ @@ -3242,13 +3242,13 @@ H5VLdatatype_specific(void *obj, hid_t connector_id, H5VL_datatype_specific_args /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__datatype_specific(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3274,11 +3274,11 @@ H5VL__datatype_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype optional' method"); /* Call the corresponding VOL callback */ if ((cls->datatype_cls.optional)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3304,12 +3304,12 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__datatype_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback"); done: /* Reset object wrapping info in API context */ @@ -3348,12 +3348,12 @@ H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(*vol_obj_ptr) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__datatype_optional((*vol_obj_ptr)->data, (*vol_obj_ptr)->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback"); done: /* Reset object wrapping info in API context */ @@ -3385,13 +3385,13 @@ H5VLdatatype_optional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__datatype_optional(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3422,7 +3422,7 @@ H5VLdatatype_optional_op(const char *app_file, const char *app_func, unsigned ap /* Check args */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Set up request token pointer for asynchronous operation */ if (H5ES_NONE != es_id) @@ -3430,7 +3430,7 @@ H5VLdatatype_optional_op(const char *app_file, const char *app_func, unsigned ap /* Only invoke callback if VOL object is set for the datatype */ if (H5T_invoke_vol_optional(dt, args, dxpl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to invoke datatype optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to invoke datatype optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -3438,7 +3438,7 @@ H5VLdatatype_optional_op(const char *app_file, const char *app_func, unsigned ap if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, type_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -3463,11 +3463,11 @@ H5VL__datatype_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **r /* Check if the corresponding VOL callback exists */ if (NULL == cls->datatype_cls.close) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype close' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'datatype close' method"); /* Call the corresponding VOL callback */ if ((cls->datatype_cls.close)(obj, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "datatype close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "datatype close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3493,12 +3493,12 @@ H5VL_datatype_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__datatype_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "datatype close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "datatype close failed"); done: /* Reset object wrapping info in API context */ @@ -3529,13 +3529,13 @@ H5VLdatatype_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*ou /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__datatype_close(obj, cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close datatype"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3564,11 +3564,11 @@ H5VL__file_create(const H5VL_class_t *cls, const char *name, unsigned flags, hid /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.create) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'file create' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'file create' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->file_cls.create)(name, flags, fcpl_id, fapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3598,11 +3598,11 @@ H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name, /* Get the connector's class */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop->connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__file_create(cls, name, flags, fcpl_id, fapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3632,17 +3632,17 @@ H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get VOL connector info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get VOL connector info"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop.connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__file_create(cls, name, flags, fcpl_id, fapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create file") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create file"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3668,11 +3668,11 @@ H5VL__file_open(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'file open' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'file open' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->file_cls.open)(name, flags, fapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3725,17 +3725,17 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in /* Attempt to register plugin as a VOL connector */ if ((connector_id = H5VL__register_connector_by_class(cls, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5_ITER_ERROR, "unable to register VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5_ITER_ERROR, "unable to register VOL connector"); /* Setup FAPL with registered VOL connector */ if (NULL == (fapl_plist = (H5P_genplist_t *)H5I_object_verify(udata->fapl_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list"); if ((fapl_id = H5P_copy_plist(fapl_plist, TRUE)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5_ITER_ERROR, "can't copy fapl"); if (NULL == (fapl_plist_copy = (H5P_genplist_t *)H5I_object_verify(fapl_id, H5I_GENPROP_LST))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "not a property list"); if (H5P_set_vol(fapl_plist_copy, connector_id, NULL) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5_ITER_ERROR, "can't set VOL connector on fapl") + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5_ITER_ERROR, "can't set VOL connector on fapl"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_IS_ACCESSIBLE; @@ -3745,7 +3745,7 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in /* Store current error stack size */ if ((num_errors = H5Eget_num(H5E_DEFAULT)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, H5_ITER_ERROR, "can't get current error stack size") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, H5_ITER_ERROR, "can't get current error stack size"); /* Check if file is accessible with given VOL connector */ H5E_BEGIN_TRY @@ -3759,11 +3759,11 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in /* Pop any errors generated by the above call */ if ((new_num_errors = H5Eget_num(H5E_DEFAULT)) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, H5_ITER_ERROR, "can't get current error stack size") + HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, H5_ITER_ERROR, "can't get current error stack size"); if (new_num_errors > num_errors) { new_num_errors -= num_errors; if (H5Epop(H5E_DEFAULT, (size_t)new_num_errors) < 0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, H5_ITER_ERROR, "can't sanitize error stack") + HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, H5_ITER_ERROR, "can't sanitize error stack"); } } else if (status == SUCCEED && is_accessible) { @@ -3817,7 +3817,7 @@ H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned /* Get the connector's class */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop->connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req))) { @@ -3843,7 +3843,7 @@ H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned (void *)&find_connector_ud); if (iter_ret < 0) HGOTO_ERROR(H5E_VOL, H5E_BADITER, NULL, - "failed to iterate over available VOL connector plugins") + "failed to iterate over available VOL connector plugins"); else if (iter_ret) { /* If one of the available VOL connector plugins is * able to open the file, clear the error stack from any @@ -3857,13 +3857,13 @@ H5VL_file_open(H5VL_connector_prop_t *connector_prop, const char *name, unsigned find_connector_ud.fapl_id, dxpl_id, req))) HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "can't open file '%s' with VOL connector '%s'", name, - find_connector_ud.cls->name) + find_connector_ud.cls->name); } else - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed"); } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed"); } /* end if */ done: @@ -3893,17 +3893,17 @@ H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, vo /* Get the VOL info from the fapl */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get VOL connector info") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get VOL connector info"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop.connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open file") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open file"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -3928,11 +3928,11 @@ H5VL__file_get(void *obj, const H5VL_class_t *cls, H5VL_file_get_args_t *args, h /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file get' method"); /* Call the corresponding VOL callback */ if ((cls->file_cls.get)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -3958,12 +3958,12 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_args_t *args, hid_t dx /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__file_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed"); done: /* Reset object wrapping info in API context */ @@ -3994,13 +3994,13 @@ H5VLfile_get(void *obj, hid_t connector_id, H5VL_file_get_args_t *args, hid_t dx /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__file_get(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute file get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute file get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4026,11 +4026,11 @@ H5VL__file_specific(void *obj, const H5VL_class_t *cls, H5VL_file_specific_args_ /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file specific' method"); /* Call the corresponding VOL callback */ if ((cls->file_cls.specific)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4072,13 +4072,13 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args /* Get the VOL info from the FAPL */ if (NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a file access property list") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector info"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop.connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID"); } /* end if */ /* Set wrapper info in API context, for all other operations */ else { @@ -4086,7 +4086,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args assert(vol_obj); if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Set the VOL connector class pointer */ @@ -4095,7 +4095,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args /* Call the corresponding internal VOL routine */ if (H5VL__file_specific(vol_obj ? vol_obj->data : NULL, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed"); done: /* Reset object wrapping info in API context */ @@ -4129,11 +4129,11 @@ H5VLfile_specific(void *obj, hid_t connector_id, H5VL_file_specific_args_t *args /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__file_specific(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file specific callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4158,11 +4158,11 @@ H5VL__file_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *ar /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file optional' method"); /* Call the corresponding VOL callback */ if ((cls->file_cls.optional)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4188,12 +4188,12 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__file_optional(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed"); done: /* Reset object wrapping info in API context */ @@ -4225,13 +4225,13 @@ H5VLfile_optional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, hid /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__file_optional(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4266,7 +4266,7 @@ H5VLfile_optional_op(const char *app_file, const char *app_func, unsigned app_li /* Call the corresponding internal VOL routine */ if (H5VL__common_optional_op(file_id, H5I_FILE, H5VL__file_optional, args, dxpl_id, token_ptr, &vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute file optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -4274,7 +4274,7 @@ H5VLfile_optional_op(const char *app_file, const char *app_func, unsigned app_li if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, file_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -4303,11 +4303,11 @@ H5VL__file_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req) /* Check if the corresponding VOL callback exists */ if (NULL == cls->file_cls.close) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file close' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'file close' method"); /* Call the corresponding VOL callback */ if ((cls->file_cls.close)(obj, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "file close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "file close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4333,12 +4333,12 @@ H5VL_file_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__file_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "file close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "file close failed"); done: /* Reset object wrapping info in API context */ @@ -4369,13 +4369,13 @@ H5VLfile_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/) /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__file_close(obj, cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "unable to close file") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEFILE, FAIL, "unable to close file"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4401,12 +4401,12 @@ H5VL__group_create(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_cl /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.create) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'group create' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'group create' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->group_cls.create)(obj, loc_params, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4433,13 +4433,13 @@ H5VL_group_create(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_par /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__group_create(vol_obj->data, loc_params, vol_obj->connector->cls, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "group create failed"); done: /* Reset object wrapping info in API context */ @@ -4472,14 +4472,14 @@ H5VLgroup_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__group_create(obj, loc_params, cls, name, lcpl_id, gcpl_id, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create group") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create group"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4505,11 +4505,11 @@ H5VL__group_open(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_clas /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'group open' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'group open' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->group_cls.open)(obj, loc_params, name, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "group open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "group open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4536,13 +4536,13 @@ H5VL_group_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__group_open(vol_obj->data, loc_params, vol_obj->connector->cls, name, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "group open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "group open failed"); done: /* Reset object wrapping info in API context */ @@ -4574,13 +4574,13 @@ H5VLgroup_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_i /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__group_open(obj, loc_params, cls, name, gapl_id, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "unable to open group") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "unable to open group"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4605,11 +4605,11 @@ H5VL__group_get(void *obj, const H5VL_class_t *cls, H5VL_group_get_args_t *args, /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group get' method"); /* Call the corresponding VOL callback */ if ((cls->group_cls.get)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4635,12 +4635,12 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_args_t *args, hid_t /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__group_get(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed"); done: /* Reset object wrapping info in API context */ @@ -4671,13 +4671,13 @@ H5VLgroup_get(void *obj, hid_t connector_id, H5VL_group_get_args_t *args, hid_t /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__group_get(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute group get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute group get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4703,11 +4703,11 @@ H5VL__group_specific(void *obj, const H5VL_class_t *cls, H5VL_group_specific_arg /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group specific' method"); /* Call the corresponding VOL callback */ if ((cls->group_cls.specific)(obj, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4733,12 +4733,12 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_args_t *ar /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__group_specific(vol_obj->data, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback"); done: /* Reset object wrapping info in API context */ @@ -4770,13 +4770,13 @@ H5VLgroup_specific(void *obj, hid_t connector_id, H5VL_group_specific_args_t *ar /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__group_specific(obj, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -4802,7 +4802,7 @@ H5VL__group_optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *a /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group optional' method"); /* Call the corresponding VOL callback */ /* (Must return value from callback, for iterators) */ @@ -4833,7 +4833,7 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hi /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -4871,9 +4871,9 @@ H5VLgroup_optional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, hi /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ /* (Must return value from callback, for iterators) */ @@ -4913,7 +4913,7 @@ H5VLgroup_optional_op(const char *app_file, const char *app_func, unsigned app_l /* Call the corresponding internal VOL routine */ if ((ret_value = H5VL__common_optional_op(group_id, H5I_GROUP, H5VL__group_optional, args, dxpl_id, token_ptr, &vol_obj)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) @@ -4921,7 +4921,7 @@ H5VLgroup_optional_op(const char *app_file, const char *app_func, unsigned app_l if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, group_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: FUNC_LEAVE_API(ret_value) @@ -4950,11 +4950,11 @@ H5VL__group_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req) /* Check if the corresponding VOL callback exists */ if (NULL == cls->group_cls.close) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group close' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'group close' method"); /* Call the corresponding VOL callback */ if ((cls->group_cls.close)(obj, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "group close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "group close failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -4980,12 +4980,12 @@ H5VL_group_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__group_close(vol_obj->data, vol_obj->connector->cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "group close failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "group close failed"); done: /* Reset object wrapping info in API context */ @@ -5016,13 +5016,13 @@ H5VLgroup_close(void *obj, hid_t connector_id, hid_t dxpl_id, void **req /*out*/ /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__group_close(obj, cls, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close group") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "unable to close group"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5050,11 +5050,11 @@ H5VL__link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_loc_param /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.create) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link create' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link create' method"); /* Call the corresponding VOL callback */ if ((cls->link_cls.create)(args, obj, loc_params, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5091,13 +5091,13 @@ H5VL_link_create(H5VL_link_create_args_t *args, const H5VL_object_t *vol_obj, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(&tmp_vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_create(args, vol_obj->data, loc_params, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "link create failed"); done: /* Reset object wrapping info in API context */ @@ -5131,11 +5131,11 @@ H5VLlink_create(H5VL_link_create_args_t *args, void *obj, const H5VL_loc_params_ /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__link_create(args, obj, loc_params, cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "unable to create link") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "unable to create link"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5162,11 +5162,11 @@ H5VL__link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_o /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.copy) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link copy' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link copy' method"); /* Call the corresponding VOL callback */ if ((cls->link_cls.copy)(src_obj, loc_params1, dst_obj, loc_params2, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "link copy failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "link copy failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5196,13 +5196,13 @@ H5VL_link_copy(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ vol_obj = (src_vol_obj->data ? src_vol_obj : dst_vol_obj); if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_copy(src_vol_obj->data, loc_params1, (dst_vol_obj ? dst_vol_obj->data : NULL), loc_params2, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "link copy failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "link copy failed"); done: /* Reset object wrapping info in API context */ @@ -5238,11 +5238,11 @@ H5VLlink_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__link_copy(src_obj, loc_params1, dst_obj, loc_params2, cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5269,11 +5269,11 @@ H5VL__link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_o /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.move) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link move' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link move' method"); /* Call the corresponding VOL callback */ if ((cls->link_cls.move)(src_obj, loc_params1, dst_obj, loc_params2, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "link move failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "link move failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5303,13 +5303,13 @@ H5VL_link_move(const H5VL_object_t *src_vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ vol_obj = (src_vol_obj->data ? src_vol_obj : dst_vol_obj); if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_move(src_vol_obj->data, loc_params1, (dst_vol_obj ? dst_vol_obj->data : NULL), loc_params2, vol_obj->connector->cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "link move failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "link move failed"); done: /* Reset object wrapping info in API context */ @@ -5345,11 +5345,11 @@ H5VLlink_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void *dst_obj /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__link_move(src_obj, loc_params1, dst_obj, loc_params2, cls, lcpl_id, lapl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "unable to move object") + HGOTO_ERROR(H5E_VOL, H5E_CANTMOVE, FAIL, "unable to move object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5375,11 +5375,11 @@ H5VL__link_get(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_class_ /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link get' method"); /* Call the corresponding VOL callback */ if ((cls->link_cls.get)(obj, loc_params, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5406,12 +5406,12 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_get(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed"); done: /* Reset object wrapping info in API context */ @@ -5443,13 +5443,13 @@ H5VLlink_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__link_get(obj, loc_params, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute link get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute link get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5475,7 +5475,7 @@ H5VL__link_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link specific' method"); /* Call the corresponding VOL callback */ /* (Must return value from callback, for iterators) */ @@ -5507,7 +5507,7 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -5546,9 +5546,9 @@ H5VLlink_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connecto /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ /* (Must return value from callback, for iterators) */ @@ -5579,11 +5579,11 @@ H5VL__link_optional(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_c /* Check if the corresponding VOL callback exists */ if (NULL == cls->link_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'link optional' method"); /* Call the corresponding VOL callback */ if ((cls->link_cls.optional)(obj, loc_params, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5610,12 +5610,12 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_optional(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback"); done: /* Reset object wrapping info in API context */ @@ -5647,13 +5647,13 @@ H5VLlink_optional(void *obj, const H5VL_loc_params_t *loc_params, hid_t connecto /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__link_optional(obj, loc_params, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5689,7 +5689,7 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, &vol_obj, &loc_params) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments"); /* Set up request token pointer for asynchronous operation */ if (H5ES_NONE != es_id) @@ -5697,20 +5697,20 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__link_optional(vol_obj->data, &loc_params, vol_obj->connector->cls, args, dxpl_id, token_ptr) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: /* Reset object wrapping info in API context */ @@ -5740,11 +5740,11 @@ H5VL__object_open(void *obj, const H5VL_loc_params_t *params, const H5VL_class_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->object_cls.open) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'object open' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "VOL connector has no 'object open' method"); /* Call the corresponding VOL callback */ if (NULL == (ret_value = (cls->object_cls.open)(obj, params, opened_type, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "object open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "object open failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5771,13 +5771,13 @@ H5VL_object_open(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *params, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__object_open(vol_obj->data, params, vol_obj->connector->cls, opened_type, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "object open failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "object open failed"); done: /* Reset object wrapping info in API context */ @@ -5809,13 +5809,13 @@ H5VLobject_open(void *obj, const H5VL_loc_params_t *params, hid_t connector_id, /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (NULL == (ret_value = H5VL__object_open(obj, params, cls, opened_type, dxpl_id, req))) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open object") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5842,12 +5842,12 @@ H5VL__object_copy(void *src_obj, const H5VL_loc_params_t *src_loc_params, const /* Check if the corresponding VOL callback exists */ if (NULL == cls->object_cls.copy) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object copy' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object copy' method"); /* Call the corresponding VOL callback */ if ((cls->object_cls.copy)(src_obj, src_loc_params, src_name, dst_obj, dst_loc_params, dst_name, ocpypl_id, lcpl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5876,17 +5876,17 @@ H5VL_object_copy(const H5VL_object_t *src_obj, const H5VL_loc_params_t *src_loc_ /* Make sure that the VOL connectors are the same */ if (src_obj->connector->cls->value != dst_obj->connector->cls->value) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "objects are accessed through different VOL connectors and can't be copied") + "objects are accessed through different VOL connectors and can't be copied"); /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(src_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__object_copy(src_obj->data, src_loc_params, src_name, dst_obj->data, dst_loc_params, dst_name, src_obj->connector->cls, ocpypl_id, lcpl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed"); done: /* Reset object wrapping info in API context */ @@ -5920,14 +5920,14 @@ H5VLobject_copy(void *src_obj, const H5VL_loc_params_t *src_loc_params, const ch /* Check args and get class pointers */ if (NULL == src_obj || NULL == dst_obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__object_copy(src_obj, src_loc_params, src_name, dst_obj, dst_loc_params, dst_name, cls, ocpypl_id, lcpl_id, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy object"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -5953,11 +5953,11 @@ H5VL__object_get(void *obj, const H5VL_loc_params_t *loc_params, const H5VL_clas /* Check if the corresponding VOL callback exists */ if (NULL == cls->object_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object get' method"); /* Call the corresponding VOL callback */ if ((cls->object_cls.get)(obj, loc_params, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -5984,12 +5984,12 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__object_get(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed"); done: /* Reset object wrapping info in API context */ @@ -6021,13 +6021,13 @@ H5VLobject_get(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_i /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__object_get(obj, loc_params, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute object get callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute object get callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6053,7 +6053,7 @@ H5VL__object_specific(void *obj, const H5VL_loc_params_t *loc_params, const H5VL /* Check if the corresponding VOL callback exists */ if (NULL == cls->object_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object specific' method"); /* Call the corresponding VOL callback */ /* (Must return value from callback, for iterators) */ @@ -6085,7 +6085,7 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_ /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -6124,9 +6124,9 @@ H5VLobject_specific(void *obj, const H5VL_loc_params_t *loc_params, hid_t connec /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Bypass the H5VLint layer, calling the VOL callback directly */ /* (Must return value from callback, for iterators) */ @@ -6157,11 +6157,11 @@ H5VL__object_optional(void *obj, const H5VL_loc_params_t *loc_params, const H5VL /* Check if the corresponding VOL callback exists */ if (NULL == cls->object_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'object optional' method"); /* Call the corresponding VOL callback */ if ((cls->object_cls.optional)(obj, loc_params, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6188,12 +6188,12 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_ /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__object_optional(vol_obj->data, loc_params, vol_obj->connector->cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback"); done: /* Reset object wrapping info in API context */ @@ -6225,13 +6225,13 @@ H5VLobject_optional(void *obj, const H5VL_loc_params_t *loc_params, hid_t connec /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__object_optional(obj, loc_params, cls, args, dxpl_id, req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6268,7 +6268,7 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_ /* Set up object access arguments */ if (H5VL_setup_name_args(loc_id, name, FALSE, lapl_id, &vol_obj, &loc_params) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set link access arguments"); /* Set up request token pointer for asynchronous operation */ if (H5ES_NONE != es_id) @@ -6276,20 +6276,20 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_ /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__object_optional(vol_obj->data, &loc_params, vol_obj->connector->cls, args, dxpl_id, token_ptr) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback"); /* If a token was created, add the token to the event set */ if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set"); done: /* Reset object wrapping info in API context */ @@ -6326,11 +6326,11 @@ H5VL__introspect_get_conn_cls(void *obj, const H5VL_class_t *cls, H5VL_get_conn_ /* Check if the corresponding VOL callback exists */ if (NULL == cls->introspect_cls.get_conn_cls) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'get_conn_cls' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'get_conn_cls' method"); /* Call the corresponding VOL callback */ if ((cls->introspect_cls.get_conn_cls)(obj, lvl, conn_cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6358,12 +6358,12 @@ H5VL_introspect_get_conn_cls(const H5VL_object_t *vol_obj, H5VL_get_conn_lvl_t l /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__introspect_get_conn_cls(vol_obj->data, vol_obj->connector->cls, lvl, conn_cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class"); done: /* Reset object wrapping info in API context */ @@ -6396,17 +6396,17 @@ H5VLintrospect_get_conn_cls(void *obj, hid_t connector_id, H5VL_get_conn_lvl_t l /* Check args */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL obj pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL obj pointer"); if (NULL == conn_cls) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL conn_cls pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL conn_cls pointer"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__introspect_get_conn_cls(obj, cls, lvl, conn_cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector class"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6436,11 +6436,11 @@ H5VL_introspect_get_cap_flags(const void *info, const H5VL_class_t *cls, uint64_ /* Check if the corresponding VOL callback exists */ if (NULL == cls->introspect_cls.get_cap_flags) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'get_cap_flags' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'get_cap_flags' method"); /* Call the corresponding VOL callback */ if ((cls->introspect_cls.get_cap_flags)(info, cap_flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector capability flags") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector capability flags"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6468,15 +6468,15 @@ H5VLintrospect_get_cap_flags(const void *info, hid_t connector_id, uint64_t *cap /* Check args */ if (NULL == cap_flags) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL conn_cls pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL conn_cls pointer"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL_introspect_get_cap_flags(info, cls, cap_flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector's capability flags") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector's capability flags"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6503,11 +6503,11 @@ H5VL__introspect_opt_query(void *obj, const H5VL_class_t *cls, H5VL_subclass_t s /* Check if the corresponding VOL callback exists */ if (NULL == cls->introspect_cls.opt_query) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'opt_query' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'opt_query' method"); /* Call the corresponding VOL callback */ if ((cls->introspect_cls.opt_query)(obj, subcls, opt_type, flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6534,12 +6534,12 @@ H5VL_introspect_opt_query(const H5VL_object_t *vol_obj, H5VL_subclass_t subcls, /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__introspect_opt_query(vol_obj->data, vol_obj->connector->cls, subcls, opt_type, flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support"); done: /* Reset object wrapping info in API context */ @@ -6572,11 +6572,11 @@ H5VLintrospect_opt_query(void *obj, hid_t connector_id, H5VL_subclass_t subcls, /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__introspect_opt_query(obj, cls, subcls, opt_type, flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6606,11 +6606,11 @@ H5VL__request_wait(void *req, const H5VL_class_t *cls, uint64_t timeout, H5VL_re /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.wait) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async wait' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async wait' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.wait)(req, timeout, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request wait failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request wait failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6639,12 +6639,12 @@ H5VL_request_wait(const H5VL_object_t *vol_obj, uint64_t timeout, H5VL_request_s /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__request_wait(vol_obj->data, vol_obj->connector->cls, timeout, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request wait failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request wait failed"); done: /* Reset object wrapping info in API context */ @@ -6675,11 +6675,11 @@ H5VLrequest_wait(void *req, hid_t connector_id, uint64_t timeout, H5VL_request_s /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_wait(req, cls, timeout, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to wait on request") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to wait on request"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6709,11 +6709,11 @@ H5VL__request_notify(void *req, const H5VL_class_t *cls, H5VL_request_notify_t c /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.notify) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async notify' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async notify' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.notify)(req, cb, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request notify failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request notify failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6743,12 +6743,12 @@ H5VL_request_notify(const H5VL_object_t *vol_obj, H5VL_request_notify_t cb, void /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__request_notify(vol_obj->data, vol_obj->connector->cls, cb, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "request notify failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "request notify failed"); done: /* Reset object wrapping info in API context */ @@ -6780,11 +6780,11 @@ H5VLrequest_notify(void *req, hid_t connector_id, H5VL_request_notify_t cb, void /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_notify(req, cls, cb, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to register notify callback for request") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to register notify callback for request"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6813,11 +6813,11 @@ H5VL__request_cancel(void *req, const H5VL_class_t *cls, H5VL_request_status_t * /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.cancel) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async cancel' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async cancel' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.cancel)(req, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6846,12 +6846,12 @@ H5VL_request_cancel(const H5VL_object_t *vol_obj, H5VL_request_status_t *status) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__request_cancel(vol_obj->data, vol_obj->connector->cls, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request cancel failed"); done: /* Reset object wrapping info in API context */ @@ -6882,11 +6882,11 @@ H5VLrequest_cancel(void *req, hid_t connector_id, H5VL_request_status_t *status /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_cancel(req, cls, status) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to cancel request") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to cancel request"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -6915,12 +6915,12 @@ H5VL__request_specific(void *req, const H5VL_class_t *cls, H5VL_request_specific /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async specific' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.specific)(req, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request specific callback") + "unable to execute asynchronous request specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -6949,13 +6949,13 @@ H5VL_request_specific(const H5VL_object_t *vol_obj, H5VL_request_specific_args_t /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__request_specific(vol_obj->data, vol_obj->connector->cls, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request specific callback") + "unable to execute asynchronous request specific callback"); done: /* Reset object wrapping info in API context */ @@ -6986,12 +6986,12 @@ H5VLrequest_specific(void *req, hid_t connector_id, H5VL_request_specific_args_t /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_specific(req, cls, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request specific callback") + "unable to execute asynchronous request specific callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7020,12 +7020,12 @@ H5VL__request_optional(void *req, const H5VL_class_t *cls, H5VL_optional_args_t /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async optional' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.optional)(req, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request optional callback") + "unable to execute asynchronous request optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7054,13 +7054,13 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ if (H5VL__request_optional(vol_obj->data, vol_obj->connector->cls, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request optional callback") + "unable to execute asynchronous request optional callback"); done: /* Reset object wrapping info in API context */ @@ -7091,12 +7091,12 @@ H5VLrequest_optional(void *req, hid_t connector_id, H5VL_optional_args_t *args) /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_optional(req, cls, args) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, - "unable to execute asynchronous request optional callback") + "unable to execute asynchronous request optional callback"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7123,17 +7123,17 @@ H5VLrequest_optional_op(void *req, hid_t connector_id, H5VL_optional_args_t *arg /* Check arguments */ if (NULL == req) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid request"); if (NULL == args) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid arguments") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid arguments"); /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_optional(req, cls, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute request optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute request optional callback"); done: FUNC_LEAVE_API(ret_value) @@ -7162,11 +7162,11 @@ H5VL__request_free(void *req, const H5VL_class_t *cls) /* Check if the corresponding VOL callback exists */ if (NULL == cls->request_cls.free) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async free' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'async free' method"); /* Call the corresponding VOL callback */ if ((cls->request_cls.free)(req) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request free failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request free failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7195,12 +7195,12 @@ H5VL_request_free(const H5VL_object_t *vol_obj) /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding VOL callback */ if (H5VL__request_free(vol_obj->data, vol_obj->connector->cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request free failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "request free failed"); done: /* Reset object wrapping info in API context */ @@ -7231,11 +7231,11 @@ H5VLrequest_free(void *req, hid_t connector_id) /* Get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if (H5VL__request_free(req, cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to free request") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to free request"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7265,11 +7265,11 @@ H5VL__blob_put(void *obj, const H5VL_class_t *cls, const void *buf, size_t size, /* Check if the corresponding VOL callback exists */ if (NULL == cls->blob_cls.put) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob put' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob put' method"); /* Call the corresponding VOL callback */ if ((cls->blob_cls.put)(obj, buf, size, blob_id, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put callback failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7298,7 +7298,7 @@ H5VL_blob_put(const H5VL_object_t *vol_obj, const void *buf, size_t size, void * /* Call the corresponding VOL callback */ if (H5VL__blob_put(vol_obj->data, vol_obj->connector->cls, buf, size, blob_id, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7324,13 +7324,13 @@ H5VLblob_put(void *obj, hid_t connector_id, const void *buf, size_t size, void * /* Get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding VOL callback */ if (H5VL__blob_put(obj, cls, buf, size, blob_id, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "blob put failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7360,11 +7360,11 @@ H5VL__blob_get(void *obj, const H5VL_class_t *cls, const void *blob_id, void *bu /* Check if the corresponding VOL callback exists */ if (NULL == cls->blob_cls.get) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob get' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob get' method"); /* Call the corresponding VOL callback */ if ((cls->blob_cls.get)(obj, blob_id, buf, size, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get callback failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get callback failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7393,7 +7393,7 @@ H5VL_blob_get(const H5VL_object_t *vol_obj, const void *blob_id, void *buf, size /* Call the corresponding VOL callback */ if (H5VL__blob_get(vol_obj->data, vol_obj->connector->cls, blob_id, buf, size, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7419,13 +7419,13 @@ H5VLblob_get(void *obj, hid_t connector_id, const void *blob_id, void *buf /*out /* Get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding VOL callback */ if (H5VL__blob_get(obj, cls, blob_id, buf, size, ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "blob get failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7454,11 +7454,11 @@ H5VL__blob_specific(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_blob /* Check if the corresponding VOL callback exists */ if (NULL == cls->blob_cls.specific) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob specific' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob specific' method"); /* Call the corresponding VOL callback */ if ((cls->blob_cls.specific)(obj, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7487,7 +7487,7 @@ H5VL_blob_specific(const H5VL_object_t *vol_obj, void *blob_id, H5VL_blob_specif /* Call the corresponding internal VOL routine */ if (H5VL__blob_specific(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob specific callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob specific callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7513,13 +7513,13 @@ H5VLblob_specific(void *obj, hid_t connector_id, void *blob_id, H5VL_blob_specif /* Get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding VOL callback */ if (H5VL__blob_specific(obj, cls, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "blob specific operation failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "blob specific operation failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7548,11 +7548,11 @@ H5VL__blob_optional(void *obj, const H5VL_class_t *cls, void *blob_id, H5VL_opti /* Check if the corresponding VOL callback exists */ if (NULL == cls->blob_cls.optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'blob optional' method"); /* Call the corresponding VOL callback */ if ((cls->blob_cls.optional)(obj, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7581,7 +7581,7 @@ H5VL_blob_optional(const H5VL_object_t *vol_obj, void *blob_id, H5VL_optional_ar /* Call the corresponding internal VOL routine */ if (H5VL__blob_optional(vol_obj->data, vol_obj->connector->cls, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob optional callback") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute blob optional callback"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7607,13 +7607,13 @@ H5VLblob_optional(void *obj, hid_t connector_id, void *blob_id, H5VL_optional_ar /* Get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding VOL callback */ if (H5VL__blob_optional(obj, cls, blob_id, args) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "blob optional operation failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "blob optional operation failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7659,7 +7659,7 @@ H5VL__token_cmp(void *obj, const H5VL_class_t *cls, const H5O_token_t *token1, c */ if (cls->token_cls.cmp) { if ((cls->token_cls.cmp)(obj, token1, token2, cmp_value) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare object tokens") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare object tokens"); } /* end if */ else *cmp_value = memcmp(token1, token2, sizeof(H5O_token_t)); @@ -7696,7 +7696,7 @@ H5VL_token_cmp(const H5VL_object_t *vol_obj, const H5O_token_t *token1, const H5 /* Call the corresponding internal VOL routine */ if (H5VL__token_cmp(vol_obj->data, vol_obj->connector->cls, token1, token2, cmp_value) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "token compare failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "token compare failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7729,15 +7729,15 @@ H5VLtoken_cmp(void *obj, hid_t connector_id, const H5O_token_t *token1, const H5 /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (NULL == cmp_value) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid cmp_value pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid cmp_value pointer"); /* Call the corresponding internal VOL routine */ if (H5VL__token_cmp(obj, cls, token1, token2, cmp_value) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "object token comparison failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "object token comparison failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7772,7 +7772,7 @@ H5VL__token_to_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, cons */ if (cls->token_cls.to_str) { if ((cls->token_cls.to_str)(obj, obj_type, token, token_str) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "can't serialize object token") + HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "can't serialize object token"); } /* end if */ else *token_str = NULL; @@ -7806,7 +7806,7 @@ H5VL_token_to_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const H5O_t /* Call the corresponding internal VOL routine */ if (H5VL__token_to_str(vol_obj->data, obj_type, vol_obj->connector->cls, token, token_str) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "token serialization failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "token serialization failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7834,17 +7834,17 @@ H5VLtoken_to_str(void *obj, H5I_type_t obj_type, hid_t connector_id, const H5O_t /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (NULL == token) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer"); if (NULL == token_str) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token_str pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token_str pointer"); /* Call the corresponding internal VOL routine */ if (H5VL__token_to_str(obj, obj_type, cls, token, token_str) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "object token to string failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "object token to string failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7879,7 +7879,7 @@ H5VL__token_from_str(void *obj, H5I_type_t obj_type, const H5VL_class_t *cls, co */ if (cls->token_cls.from_str) { if ((cls->token_cls.from_str)(obj, obj_type, token_str, token) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token string") + HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token string"); } /* end if */ else *token = H5O_TOKEN_UNDEF; @@ -7913,7 +7913,7 @@ H5VL_token_from_str(const H5VL_object_t *vol_obj, H5I_type_t obj_type, const cha /* Call the corresponding internal VOL routine */ if (H5VL__token_from_str(vol_obj->data, obj_type, vol_obj->connector->cls, token_str, token) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "token deserialization failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "token deserialization failed"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -7941,17 +7941,17 @@ H5VLtoken_from_str(void *obj, H5I_type_t obj_type, hid_t connector_id, const cha /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); if (NULL == token) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token pointer"); if (NULL == token_str) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token_str pointer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid token_str pointer"); /* Call the corresponding internal VOL routine */ if (H5VL__token_from_str(obj, obj_type, cls, token_str, token) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "object token from string failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "object token from string failed"); done: FUNC_LEAVE_API_NOINIT(ret_value) @@ -7976,7 +7976,7 @@ H5VL__optional(void *obj, const H5VL_class_t *cls, H5VL_optional_args_t *args, h /* Check if the corresponding VOL callback exists */ if (NULL == cls->optional) - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'optional' method") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL connector has no 'optional' method"); /* Call the corresponding VOL callback */ if ((ret_value = (cls->optional)(obj, args, dxpl_id, req)) < 0) @@ -8006,7 +8006,7 @@ H5VL_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dx /* Set wrapper info in API context */ if (H5VL_set_vol_wrapper(vol_obj) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info"); vol_wrapper_set = TRUE; /* Call the corresponding internal VOL routine */ @@ -8042,9 +8042,9 @@ H5VLoptional(void *obj, hid_t connector_id, H5VL_optional_args_t *args, hid_t dx /* Check args and get class pointer */ if (NULL == obj) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object"); if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Call the corresponding internal VOL routine */ if ((ret_value = H5VL__optional(obj, cls, args, dxpl_id, req)) < 0) diff --git a/src/H5VLdyn_ops.c b/src/H5VLdyn_ops.c index 3f6a3d7..9d2e287 100644 --- a/src/H5VLdyn_ops.c +++ b/src/H5VLdyn_ops.c @@ -201,24 +201,24 @@ H5VL__register_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *o /* Check for duplicate operation */ if (H5VL_opt_ops_g[subcls]) { if (NULL != H5SL_search(H5VL_opt_ops_g[subcls], op_name)) - HGOTO_ERROR(H5E_VOL, H5E_EXISTS, FAIL, "operation name already exists") + HGOTO_ERROR(H5E_VOL, H5E_EXISTS, FAIL, "operation name already exists"); } /* end if */ else { /* Create skip list for operation of this subclass */ if (NULL == (H5VL_opt_ops_g[subcls] = H5SL_create(H5SL_TYPE_STR, NULL))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create skip list for operations") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create skip list for operations"); } /* end else */ /* Register new operation */ if (NULL == (new_op = H5FL_CALLOC(H5VL_dyn_op_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate memory for dynamic operation info") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate memory for dynamic operation info"); if (NULL == (new_op->op_name = H5MM_strdup(op_name))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate name for dynamic operation info") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate name for dynamic operation info"); new_op->op_val = H5VL_opt_vals_g[subcls]++; /* Insert into subclass's skip list */ if (H5SL_insert(H5VL_opt_ops_g[subcls], new_op, new_op->op_name) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert operation info into skip list") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert operation info into skip list"); /* Return the next operation value to the caller */ *op_val = new_op->op_val; @@ -279,13 +279,13 @@ H5VL__find_opt_operation(H5VL_subclass_t subcls, const char *op_name, int *op_va /* Search for dynamic operation with correct name */ if (NULL == (dyn_op = H5SL_search(H5VL_opt_ops_g[subcls], op_name))) - HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered") + HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered"); /* Set operation value for user */ *op_val = dyn_op->op_val; } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered") + HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -317,7 +317,7 @@ H5VL__unregister_opt_operation(H5VL_subclass_t subcls, const char *op_name) /* Search for dynamic operation with correct name */ if (NULL == (dyn_op = H5SL_remove(H5VL_opt_ops_g[subcls], op_name))) - HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered") + HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered"); /* Release the info for the operation */ H5VL__release_dyn_op(dyn_op); @@ -325,12 +325,12 @@ H5VL__unregister_opt_operation(H5VL_subclass_t subcls, const char *op_name) /* Close the skip list, if no more operations in it */ if (0 == H5SL_count(H5VL_opt_ops_g[subcls])) { if (H5SL_close(H5VL_opt_ops_g[subcls]) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "can't close dyn op skip list") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "can't close dyn op skip list"); H5VL_opt_ops_g[subcls] = NULL; } /* end if */ } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered") + HGOTO_ERROR(H5E_VOL, H5E_NOTFOUND, FAIL, "operation name isn't registered"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLint.c b/src/H5VLint.c index dabbc0a..9cf55c9 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -149,7 +149,7 @@ H5VL_init_phase1(void) /* Initialize the ID group for the VL IDs */ if (H5I_register_type(H5I_VOL_CLS) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize H5VL interface") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize H5VL interface"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -198,7 +198,7 @@ H5VL_init_phase2(void) for (i = 0; i < NELMTS(initializer); i++) { if (initializer[i].func() < 0) { HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, - "unable to initialize %s interface", initializer[i].descr) + "unable to initialize %s interface", initializer[i].descr); } } @@ -210,7 +210,7 @@ H5VL_init_phase2(void) /* Set up the default VOL connector in the default FAPL */ if (H5VL__set_def_conn() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to set default VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to set default VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -287,7 +287,7 @@ H5VL__free_cls(H5VL_class_t *cls, void H5_ATTR_UNUSED **request) /* Shut down the VOL connector */ if (cls->terminate && cls->terminate() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not terminate cleanly") + HGOTO_ERROR(H5E_VOL, H5E_CANTCLOSEOBJ, FAIL, "VOL connector did not terminate cleanly"); /* Release the class */ H5MM_xfree_const(cls->name); @@ -381,47 +381,48 @@ H5VL__set_def_conn(void) /* Duplicate the string to parse, as it is modified as we go */ if (NULL == (buf = H5MM_strdup(env_var))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate memory for environment variable string") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, + "can't allocate memory for environment variable string"); /* Get the first 'word' of the environment variable. * If it's nothing (environment variable was whitespace) return error. */ if (NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts))) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "VOL connector environment variable set empty?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "VOL connector environment variable set empty?"); /* First, check to see if the connector is already registered */ if ((connector_is_registered = H5VL__is_connector_registered_by_name(tok)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check if VOL connector already registered") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't check if VOL connector already registered"); else if (connector_is_registered) { /* Retrieve the ID of the already-registered VOL connector */ if ((connector_id = H5VL__get_connector_id_by_name(tok, FALSE)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector ID"); } /* end else-if */ else { /* Check for VOL connectors that ship with the library */ if (!HDstrcmp(tok, "native")) { connector_id = H5VL_NATIVE; if (H5I_inc_ref(connector_id, FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount") + HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount"); } /* end if */ else if (!HDstrcmp(tok, "pass_through")) { connector_id = H5VL_PASSTHRU; if (H5I_inc_ref(connector_id, FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount") + HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount"); } /* end else-if */ else { /* Register the VOL connector */ /* (NOTE: No provisions for vipl_id currently) */ if ((connector_id = H5VL__register_connector_by_name(tok, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register connector"); } /* end else */ } /* end else */ /* Was there any connector info specified in the environment variable? */ if (NULL != (tok = HDstrtok_r(NULL, "\n\r", &lasts))) if (H5VL__connector_str_to_info(tok, connector_id, &vol_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "can't deserialize connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "can't deserialize connector info"); /* Set the default VOL connector */ H5VL_def_conn_s.connector_id = connector_id; @@ -434,25 +435,25 @@ H5VL__set_def_conn(void) /* Increment the ref count on the default connector */ if (H5I_inc_ref(H5VL_def_conn_s.connector_id, FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount") + HGOTO_ERROR(H5E_VOL, H5E_CANTINC, FAIL, "can't increment VOL connector refcount"); } /* end else */ /* Get default file access pclass */ if (NULL == (def_fapclass = (H5P_genclass_t *)H5I_object(H5P_FILE_ACCESS))) - HGOTO_ERROR(H5E_VOL, H5E_BADID, FAIL, "can't find object for default file access property class ID") + HGOTO_ERROR(H5E_VOL, H5E_BADID, FAIL, "can't find object for default file access property class ID"); /* Change the default VOL for the default file access pclass */ if (H5P_reset_vol_class(def_fapclass, &H5VL_def_conn_s) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, - "can't set default VOL connector for default file access property class") + "can't set default VOL connector for default file access property class"); /* Get default file access plist */ if (NULL == (def_fapl = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_VOL, H5E_BADID, FAIL, "can't find object for default fapl ID") + HGOTO_ERROR(H5E_VOL, H5E_BADID, FAIL, "can't find object for default fapl ID"); /* Change the default VOL for the default FAPL */ if (H5P_set_vol(def_fapl, H5VL_def_conn_s.connector_id, H5VL_def_conn_s.connector_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set default VOL connector for default FAPL") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set default VOL connector for default FAPL"); done: /* Clean up on error */ @@ -496,14 +497,14 @@ H5VL__wrap_obj(void *obj, H5I_type_t obj_type) /* Retrieve the VOL object wrapping context */ if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't get VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't get VOL object wrap context"); /* If there is a VOL object wrapping context, wrap the object */ if (vol_wrap_ctx) { /* Wrap object, using the VOL callback */ if (NULL == (ret_value = H5VL_wrap_object(vol_wrap_ctx->connector->cls, vol_wrap_ctx->obj_wrap_ctx, obj, obj_type))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't wrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't wrap object"); } /* end if */ else ret_value = obj; @@ -538,15 +539,15 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t /* Make sure type number is valid */ if (type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE && type != H5I_FILE && type != H5I_GROUP && type != H5I_MAP) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, NULL, "invalid type number") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, NULL, "invalid type number"); /* Create the new VOL object */ if (NULL == (new_vol_obj = H5FL_CALLOC(H5VL_object_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate memory for VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate memory for VOL object"); new_vol_obj->connector = vol_connector; if (wrap_obj) { if (NULL == (new_vol_obj->data = H5VL__wrap_obj(object, type))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "can't wrap library object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "can't wrap library object"); } /* end if */ else new_vol_obj->data = object; @@ -559,7 +560,7 @@ H5VL__new_vol_obj(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t /* If this is a datatype, we have to hide the VOL object under the H5T_t pointer */ if (H5I_DATATYPE == type) { if (NULL == (ret_value = (H5VL_object_t *)H5T_construct_datatype(new_vol_obj))) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "can't construct datatype object") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "can't construct datatype object"); } /* end if */ else ret_value = (H5VL_object_t *)new_vol_obj; @@ -598,7 +599,8 @@ H5VL_conn_copy(H5VL_connector_prop_t *connector_prop) if (connector_prop->connector_id > 0) { /* Increment the reference count on connector ID and copy connector info */ if (H5I_inc_ref(connector_prop->connector_id, FALSE) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, "unable to increment ref count on VOL connector ID") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINC, FAIL, + "unable to increment ref count on VOL connector ID"); /* Copy connector info, if it exists */ if (connector_prop->connector_info) { @@ -607,12 +609,12 @@ H5VL_conn_copy(H5VL_connector_prop_t *connector_prop) /* Retrieve the connector for the ID */ if (NULL == (connector = (H5VL_class_t *)H5I_object(connector_prop->connector_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allocate and copy connector info */ if (H5VL_copy_connector_info(connector, &new_connector_info, connector_prop->connector_info) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "connector info copy failed") + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "connector info copy failed"); /* Set the connector info to the copy */ connector_prop->connector_info = new_connector_info; @@ -648,11 +650,12 @@ H5VL_conn_free(const H5VL_connector_prop_t *connector_prop) /* Free the connector info */ if (H5VL_free_connector_info(connector_prop->connector_id, connector_prop->connector_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL connector info object") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, + "unable to release VOL connector info object"); /* Decrement reference count for connector ID */ if (H5I_dec_ref(connector_prop->connector_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "can't decrement reference count for connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "can't decrement reference count for connector ID"); } } @@ -687,11 +690,11 @@ H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_connector, hbool_t app_ /* Set up VOL object for the passed-in data */ /* (Does not wrap object, since it's from a VOL callback) */ if (NULL == (vol_obj = H5VL__new_vol_obj(type, object, vol_connector, FALSE))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object"); /* Register VOL object as _object_ type, for future object API calls */ if ((ret_value = H5I_register(type, vol_obj, app_ref)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register handle") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register handle"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -731,11 +734,11 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_conne /* Set up VOL object for the passed-in data */ /* (Wraps object, since it's a library object) */ if (NULL == (new_vol_obj = H5VL__new_vol_obj(type, object, vol_connector, TRUE))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object"); /* Call the underlying H5I function to complete the registration */ if (H5I_register_using_existing_id(type, new_vol_obj, app_ref, existing_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register object under existing ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, FAIL, "can't register object under existing ID"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -763,15 +766,15 @@ H5VL_new_connector(hid_t connector_id) /* Get the VOL class object from the connector's ID */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Setup VOL info struct */ if (NULL == (connector = H5FL_CALLOC(H5VL_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL connector struct") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL connector struct"); connector->cls = cls; connector->id = connector_id; if (H5I_inc_ref(connector->id, FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector"); conn_id_incr = TRUE; /* Set return value */ @@ -814,11 +817,11 @@ H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool /* Create new VOL connector object, using the connector ID */ if (NULL == (connector = H5VL_new_connector(connector_id))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, H5I_INVALID_HID, "can't create VOL connector object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, H5I_INVALID_HID, "can't create VOL connector object"); /* Get an ID for the VOL object */ if ((ret_value = H5VL_register(type, obj, connector, app_ref)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register object handle"); done: /* Clean up on error */ @@ -859,7 +862,7 @@ H5VL_create_object(void *object, H5VL_t *vol_connector) /* Set up VOL object for the passed-in data */ /* (Does not wrap object, since it's from a VOL callback) */ if (NULL == (ret_value = H5FL_CALLOC(H5VL_object_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate memory for VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate memory for VOL object"); ret_value->connector = vol_connector; ret_value->data = object; ret_value->rc = 1; @@ -895,21 +898,21 @@ H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id) /* Get the VOL class object from the connector's ID */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, NULL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, NULL, "not a VOL connector ID"); /* Setup VOL info struct */ if (NULL == (connector = H5FL_CALLOC(H5VL_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL info struct") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, NULL, "can't allocate VOL info struct"); connector->cls = cls; connector->id = connector_id; if (H5I_inc_ref(connector->id, FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINC, NULL, "unable to increment ref count on VOL connector"); conn_id_incr = TRUE; /* Set up VOL object for the passed-in data */ /* (Wraps object, since it's a library object) */ if (NULL == (ret_value = H5VL__new_vol_obj(type, obj, connector, TRUE))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "can't create VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "can't create VOL object"); done: /* Clean up on error */ @@ -978,7 +981,7 @@ H5VL_conn_dec_rc(H5VL_t *connector) /* Check for last reference */ if (0 == connector->nrefs) { if (H5I_dec_ref(connector->id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector"); H5FL_FREE(H5VL_t, connector); /* Set return value */ @@ -1036,7 +1039,7 @@ H5VL_free_object(H5VL_object_t *vol_obj) if (--vol_obj->rc == 0) { /* Decrement refcount on connector */ if (H5VL_conn_dec_rc(vol_obj->connector) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector"); vol_obj = H5FL_FREE(H5VL_object_t, vol_obj); } /* end if */ @@ -1072,15 +1075,15 @@ H5VL_object_is_native(const H5VL_object_t *obj, hbool_t *is_native) /* Retrieve the terminal connector class for the object */ cls = NULL; if (H5VL_introspect_get_conn_cls(obj, H5VL_GET_CONN_LVL_TERM, &cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class"); /* Retrieve the native connector class */ if (NULL == (native_cls = (H5VL_class_t *)H5I_object_verify(H5VL_NATIVE, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve native VOL connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve native VOL connector class"); /* Compare connector classes */ if (H5VL_cmp_connector_cls(&cmp_value, cls, native_cls) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); /* If classes compare equal, then the object is / is in a native connector's file */ *is_native = (cmp_value == 0); @@ -1116,14 +1119,14 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2, /* Retrieve the terminal connectors for each object */ cls1 = NULL; if (H5VL_introspect_get_conn_cls(vol_obj1, H5VL_GET_CONN_LVL_TERM, &cls1) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class"); cls2 = NULL; if (H5VL_introspect_get_conn_cls(vol_obj2, H5VL_GET_CONN_LVL_TERM, &cls2) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL connector class"); /* Compare connector classes */ if (H5VL_cmp_connector_cls(&cmp_value, cls1, cls2) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes") + HGOTO_ERROR(H5E_VOL, H5E_CANTCOMPARE, FAIL, "can't compare connector classes"); /* If the connector classes are different, the files are different */ if (cmp_value) @@ -1134,7 +1137,7 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2, /* Get unwrapped (terminal) object for vol_obj2 */ if (NULL == (obj2 = H5VL_object_data(vol_obj2))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get unwrapped object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get unwrapped object"); /* Set up VOL callback arguments */ vol_cb_args.op_type = H5VL_FILE_IS_EQUAL; @@ -1143,7 +1146,7 @@ H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2, /* Make 'are files equal' callback */ if (H5VL_file_specific(vol_obj1, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, NULL) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed") + HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed"); } /* end else */ done: @@ -1178,19 +1181,19 @@ H5VL__register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id) /* Copy the class structure so the caller can reuse or free it */ if (NULL == (saved = H5FL_MALLOC(H5VL_class_t))) HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, H5I_INVALID_HID, - "memory allocation failed for VOL connector class struct") + "memory allocation failed for VOL connector class struct"); H5MM_memcpy(saved, cls, sizeof(H5VL_class_t)); if (NULL == (saved->name = H5MM_strdup(cls->name))) HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, H5I_INVALID_HID, - "memory allocation failed for VOL connector name") + "memory allocation failed for VOL connector name"); /* Initialize the VOL connector */ if (cls->initialize && cls->initialize(vipl_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to init VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to init VOL connector"); /* Create the new class ID */ if ((ret_value = H5I_register(H5I_VOL, saved, app_ref)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID"); done: if (ret_value < 0 && saved) { @@ -1228,23 +1231,23 @@ H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_ /* Check arguments */ if (!cls) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, - "VOL connector class pointer cannot be NULL") + "VOL connector class pointer cannot be NULL"); if (H5VL_VERSION != cls->version) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector has incompatible version") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector has incompatible version"); if (!cls->name) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, - "VOL connector class name cannot be the NULL pointer") + "VOL connector class name cannot be the NULL pointer"); if (0 == HDstrlen(cls->name)) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, - "VOL connector class name cannot be the empty string") + "VOL connector class name cannot be the empty string"); if (cls->info_cls.copy && !cls->info_cls.free) HGOTO_ERROR( H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, - "VOL connector must provide free callback for VOL info objects when a copy callback is provided") + "VOL connector must provide free callback for VOL info objects when a copy callback is provided"); if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector must provide free callback for object wrapping contexts when a get " - "callback is provided") + "callback is provided"); /* Set up op data for iteration */ op_data.key.kind = H5VL_GET_CONNECTOR_BY_NAME; @@ -1253,19 +1256,19 @@ H5VL__register_connector_by_class(const H5VL_class_t *cls, hbool_t app_ref, hid_ /* Check if connector is already registered */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL IDs") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL IDs"); /* Increment the ref count on the existing VOL connector ID, if it's already registered */ if (op_data.found_id != H5I_INVALID_HID) { if (H5I_inc_ref(op_data.found_id, app_ref) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTINC, H5I_INVALID_HID, - "unable to increment ref count on VOL connector") + "unable to increment ref count on VOL connector"); ret_value = op_data.found_id; } /* end if */ else { /* Create a new class ID */ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector"); } /* end else */ done: @@ -1301,13 +1304,13 @@ H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_i /* Check if connector is already registered */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, app_ref) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL ids") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL ids"); /* If connector already registered, increment ref count on ID and return ID */ if (op_data.found_id != H5I_INVALID_HID) { if (H5I_inc_ref(op_data.found_id, app_ref) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTINC, H5I_INVALID_HID, - "unable to increment ref count on VOL connector") + "unable to increment ref count on VOL connector"); ret_value = op_data.found_id; } /* end if */ else { @@ -1318,11 +1321,11 @@ H5VL__register_connector_by_name(const char *name, hbool_t app_ref, hid_t vipl_i key.vol.kind = H5VL_GET_CONNECTOR_BY_NAME; key.vol.u.name = name; if (NULL == (cls = (const H5VL_class_t *)H5PL_load(H5PL_TYPE_VOL, &key))) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector"); /* Register the connector we loaded */ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID"); } /* end else */ done: @@ -1358,13 +1361,13 @@ H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid /* Check if connector is already registered */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, app_ref) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL ids") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL ids"); /* If connector already registered, increment ref count on ID and return ID */ if (op_data.found_id != H5I_INVALID_HID) { if (H5I_inc_ref(op_data.found_id, app_ref) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTINC, H5I_INVALID_HID, - "unable to increment ref count on VOL connector") + "unable to increment ref count on VOL connector"); ret_value = op_data.found_id; } /* end if */ else { @@ -1375,11 +1378,11 @@ H5VL__register_connector_by_value(H5VL_class_value_t value, hbool_t app_ref, hid key.vol.kind = H5VL_GET_CONNECTOR_BY_VALUE; key.vol.u.value = value; if (NULL == (cls = (const H5VL_class_t *)H5PL_load(H5PL_TYPE_VOL, &key))) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "unable to load VOL connector"); /* Register the connector we loaded */ if ((ret_value = H5VL__register_connector(cls, app_ref, vipl_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID"); } /* end else */ done: @@ -1412,7 +1415,7 @@ H5VL__is_connector_registered_by_name(const char *name) /* Find connector with name */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors"); /* Found a connector with that name */ if (op_data.found_id != H5I_INVALID_HID) @@ -1449,7 +1452,7 @@ H5VL__is_connector_registered_by_value(H5VL_class_value_t value) /* Find connector with value */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, FAIL, "can't iterate over VOL connectors"); /* Found a connector with that name */ if (op_data.found_id != H5I_INVALID_HID) @@ -1479,12 +1482,12 @@ H5VL__get_connector_id(hid_t obj_id, hbool_t is_api) /* Get the underlying VOL object for the object ID */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier"); /* Return the VOL object's VOL class ID */ ret_value = vol_obj->connector->id; if (H5I_inc_ref(ret_value, is_api) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector") + HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1509,11 +1512,11 @@ H5VL__get_connector_id_by_name(const char *name, hbool_t is_api) /* Find connector with name */ if ((ret_value = H5VL__peek_connector_id_by_name(name)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector"); /* Found a connector with that name */ if (H5I_inc_ref(ret_value, is_api) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector") + HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1539,11 +1542,11 @@ H5VL__get_connector_id_by_value(H5VL_class_value_t value, hbool_t is_api) /* Find connector with value */ if ((ret_value = H5VL__peek_connector_id_by_value(value)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't find VOL connector"); /* Found a connector with that value */ if (H5I_inc_ref(ret_value, is_api) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector") + HGOTO_ERROR(H5E_FILE, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1576,7 +1579,7 @@ H5VL__peek_connector_id_by_name(const char *name) /* Find connector with name */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors"); /* Set return value */ ret_value = op_data.found_id; @@ -1612,7 +1615,7 @@ H5VL__peek_connector_id_by_value(H5VL_class_value_t value) /* Find connector with value */ if (H5I_iterate(H5I_VOL, H5VL__get_connector_cb, &op_data, TRUE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors") + HGOTO_ERROR(H5E_VOL, H5E_BADITER, H5I_INVALID_HID, "can't iterate over VOL connectors"); /* Set return value */ ret_value = op_data.found_id; @@ -1644,12 +1647,12 @@ H5VL__connector_str_to_info(const char *str, hid_t connector_id, void **info) /* Check args and get class pointer */ if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_id, H5I_VOL))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Allow the connector to deserialize info */ if (cls->info_cls.from_str) { if ((cls->info_cls.from_str)(str, info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize connector info") + HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize connector info"); } /* end if */ else *info = NULL; @@ -1683,7 +1686,7 @@ H5VL__get_connector_name(hid_t id, char *name /*out*/, size_t size) /* get the object pointer */ if (NULL == (vol_obj = H5VL_vol_object(id))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid VOL identifier") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid VOL identifier"); cls = vol_obj->connector->cls; @@ -1728,15 +1731,15 @@ H5VL_vol_object(hid_t id) H5I_DATATYPE == obj_type || H5I_MAP == obj_type) { /* Get the object */ if (NULL == (obj = H5I_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier"); /* If this is a datatype, get the VOL object attached to the H5T_t struct */ if (H5I_DATATYPE == obj_type) if (NULL == (obj = H5T_get_named_type((H5T_t *)obj))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a named datatype"); } /* end if */ else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier type to function") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier type to function"); ret_value = (H5VL_object_t *)obj; @@ -1790,7 +1793,7 @@ H5VL_object_unwrap(const H5VL_object_t *vol_obj) FUNC_ENTER_NOAPI(NULL) if (NULL == (ret_value = H5VL_unwrap_object(vol_obj->connector->cls, vol_obj->data))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't unwrap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't unwrap object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1824,7 +1827,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type) case H5I_MAP: /* get the object */ if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier"); break; case H5I_DATATYPE: { @@ -1832,11 +1835,11 @@ H5VL__object(hid_t id, H5I_type_t obj_type) /* get the object */ if (NULL == (dt = (H5T_t *)H5I_object(id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier"); /* Get the actual datatype object that should be the vol_obj */ if (NULL == (vol_obj = H5T_get_named_type(dt))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a named datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a named datatype"); break; } @@ -1854,7 +1857,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unknown data object type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unknown data object type"); } /* end switch */ /* Set the return value */ @@ -1884,7 +1887,7 @@ H5VL_object(hid_t id) /* Get the underlying object */ if (NULL == (ret_value = H5VL__object(id, H5I_get_type(id)))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't retrieve object for ID") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't retrieve object for ID"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1910,11 +1913,11 @@ H5VL_object_verify(hid_t id, H5I_type_t obj_type) /* Check of ID of correct type */ if (obj_type != H5I_get_type(id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "invalid identifier"); /* Get the underlying object */ if (NULL == (ret_value = H5VL__object(id, obj_type))) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, NULL, "can't retrieve object for ID") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, NULL, "can't retrieve object for ID"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2027,7 +2030,7 @@ H5VL_retrieve_lib_state(void **state) /* Retrieve the API context state */ if (H5CX_retrieve_state((H5CX_state_t **)state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get API context state") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get API context state"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2054,7 +2057,7 @@ H5VL_start_lib_state(void) /* Push a new API context on the stack */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't push API context") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't push API context"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2084,7 +2087,7 @@ H5VL_restore_lib_state(const void *state) /* Restore the API context state */ if (H5CX_restore_state((const H5CX_state_t *)state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set API context state") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set API context state"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2116,7 +2119,7 @@ H5VL_finish_lib_state(void) /* Pop the API context off the stack */ if (H5CX_pop(FALSE) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't pop API context") + HGOTO_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't pop API context"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2146,7 +2149,7 @@ H5VL_free_lib_state(void *state) /* Free the API context state */ if (H5CX_free_state((H5CX_state_t *)state) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "can't free API context state") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "can't free API context state"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2179,11 +2182,11 @@ H5VL__free_vol_wrapper(H5VL_wrap_ctx_t *vol_wrap_ctx) /* Release the VOL connector's object wrapping context */ if ((*vol_wrap_ctx->connector->cls->wrap_cls.free_wrap_ctx)(vol_wrap_ctx->obj_wrap_ctx) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, - "unable to release connector's object wrapping context") + "unable to release connector's object wrapping context"); /* Decrement refcount on connector */ if (H5VL_conn_dec_rc(vol_wrap_ctx->connector) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector"); /* Release object wrapping context */ H5FL_FREE(H5VL_wrap_ctx_t, vol_wrap_ctx); @@ -2214,7 +2217,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj) /* Retrieve the VOL object wrap context */ if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL object wrap context"); /* Check for existing wrapping context */ if (NULL == vol_wrap_ctx) { @@ -2231,12 +2234,12 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj) /* Get the wrap context from the connector */ if ((vol_obj->connector->cls->wrap_cls.get_wrap_ctx)(vol_obj->data, &obj_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve VOL connector's object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve VOL connector's object wrap context"); } /* end if */ /* Allocate VOL object wrapper context */ if (NULL == (vol_wrap_ctx = H5FL_MALLOC(H5VL_wrap_ctx_t))) - HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate VOL wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate VOL wrap context"); /* Increment the outstanding objects that are using the connector */ H5VL_conn_inc_rc(vol_obj->connector); @@ -2252,7 +2255,7 @@ H5VL_set_vol_wrapper(const H5VL_object_t *vol_obj) /* Save the wrapper context */ if (H5CX_set_vol_wrap_ctx(vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context"); done: if (ret_value < 0 && vol_wrap_ctx) @@ -2281,9 +2284,9 @@ H5VL_inc_vol_wrapper(void *_vol_wrap_ctx) /* Check for valid, active VOL object wrap context */ if (NULL == vol_wrap_ctx) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?"); if (0 == vol_wrap_ctx->rc) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "bad VOL object wrap context refcount?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "bad VOL object wrap context refcount?"); /* Increment ref count on wrapping context */ vol_wrap_ctx->rc++; @@ -2312,9 +2315,9 @@ H5VL_dec_vol_wrapper(void *_vol_wrap_ctx) /* Check for valid, active VOL object wrap context */ if (NULL == vol_wrap_ctx) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?"); if (0 == vol_wrap_ctx->rc) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "bad VOL object wrap context refcount?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "bad VOL object wrap context refcount?"); /* Decrement ref count on wrapping context */ vol_wrap_ctx->rc--; @@ -2322,7 +2325,7 @@ H5VL_dec_vol_wrapper(void *_vol_wrap_ctx) /* Release context if the ref count drops to zero */ if (0 == vol_wrap_ctx->rc) if (H5VL__free_vol_wrapper(vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL object wrapping context") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL object wrapping context"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2347,11 +2350,11 @@ H5VL_reset_vol_wrapper(void) /* Retrieve the VOL object wrap context */ if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL object wrap context"); /* Check for VOL object wrap context */ if (NULL == vol_wrap_ctx) - HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?") + HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "no VOL object wrap context?"); /* Decrement ref count on wrapping context */ vol_wrap_ctx->rc--; @@ -2360,16 +2363,16 @@ H5VL_reset_vol_wrapper(void) if (0 == vol_wrap_ctx->rc) { /* Release object wrapping context */ if (H5VL__free_vol_wrapper(vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL object wrapping context") + HGOTO_ERROR(H5E_VOL, H5E_CANTRELEASE, FAIL, "unable to release VOL object wrapping context"); /* Reset the wrapper context */ if (H5CX_set_vol_wrap_ctx(NULL) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context"); } /* end if */ else /* Save the updated wrapper context */ if (H5CX_set_vol_wrap_ctx(vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL object wrap context"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2398,10 +2401,10 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref) /* Retrieve the VOL object wrapping context */ if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL object wrap context") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't get VOL object wrap context"); if (NULL == vol_wrap_ctx || NULL == vol_wrap_ctx->connector) HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, H5I_INVALID_HID, - "VOL object wrap context or its connector is NULL???") + "VOL object wrap context or its connector is NULL???"); /* If the datatype is already VOL-managed, the datatype's vol_obj * field will get clobbered later, so disallow this. @@ -2409,15 +2412,15 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref) if (type == H5I_DATATYPE) if (vol_wrap_ctx->connector->id == H5VL_NATIVE) if (TRUE == H5T_already_vol_managed((const H5T_t *)obj)) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, H5I_INVALID_HID, "can't wrap an uncommitted datatype") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, H5I_INVALID_HID, "can't wrap an uncommitted datatype"); /* Wrap the object with VOL connector info */ if (NULL == (new_obj = H5VL__wrap_obj(obj, type))) - HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, H5I_INVALID_HID, "can't wrap library object") + HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, H5I_INVALID_HID, "can't wrap library object"); /* Get an ID for the object */ if ((ret_value = H5VL_register_using_vol_id(type, new_obj, vol_wrap_ctx->connector->id, app_ref)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get an ID for the object") + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get an ID for the object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2522,11 +2525,11 @@ H5VL_setup_args(hid_t loc_id, H5I_type_t id_type, H5VL_object_t **vol_obj) /* Get attribute pointer */ if (NULL == (*vol_obj = (H5VL_object_t *)H5I_object_verify(loc_id, id_type))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not the correct type of ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not the correct type of ID"); /* Set up collective metadata (if appropriate) */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set collective metadata read") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set collective metadata read"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -2554,11 +2557,11 @@ H5VL_setup_loc_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *lo /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not the correct type of ID") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "not the correct type of ID"); /* Set up collective metadata (if appropriate */ if (H5CX_set_loc(loc_id) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set collective metadata read") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set collective metadata read"); /* Set location parameters */ loc_params->type = H5VL_OBJECT_BY_SELF; @@ -2593,11 +2596,11 @@ H5VL_setup_acc_args(hid_t loc_id, const H5P_libclass_t *libclass, hbool_t is_col /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(acspl_id, libclass, loc_id, is_collective) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params->type = H5VL_OBJECT_BY_SELF; @@ -2629,7 +2632,7 @@ H5VL_setup_self_args(hid_t loc_id, H5VL_object_t **vol_obj, H5VL_loc_params_t *l /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params->type = H5VL_OBJECT_BY_SELF; @@ -2662,17 +2665,17 @@ H5VL_setup_name_args(hid_t loc_id, const char *name, hbool_t is_collective, hid_ /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, is_collective) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set up location parameters */ loc_params->type = H5VL_OBJECT_BY_NAME; @@ -2708,21 +2711,21 @@ H5VL_setup_idx_args(hid_t loc_id, const char *name, H5_index_t idx_type, H5_iter /* Check args */ if (!name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL"); if (!*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be an empty string"); if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified"); if (order <= H5_ITER_UNKNOWN || order >= H5_ITER_N) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified"); /* Verify access property list and set up collective metadata if appropriate */ if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, is_collective) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info") + HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set access property list info"); /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params->type = H5VL_OBJECT_BY_IDX; @@ -2760,7 +2763,7 @@ H5VL_setup_token_args(hid_t loc_id, H5O_token_t *obj_token, H5VL_object_t **vol_ /* Get the location object */ if (NULL == (*vol_obj = (H5VL_object_t *)H5VL_vol_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Set location parameters */ loc_params->type = H5VL_OBJECT_BY_TOKEN; @@ -2800,14 +2803,14 @@ H5VL_get_cap_flags(const H5VL_connector_prop_t *connector_prop, uint64_t *cap_fl /* Retrieve the connector for the ID */ if (NULL == (connector = (H5VL_class_t *)H5I_object(connector_prop->connector_id))) - HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID") + HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a VOL connector ID"); /* Query the connector's capability flags */ if (H5VL_introspect_get_cap_flags(connector_prop->connector_info, connector, cap_flags) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector's capability flags") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query connector's capability flags"); } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "connector ID not set?") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "connector ID not set?"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative.c b/src/H5VLnative.c index d6a8666..907f020 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -202,7 +202,7 @@ H5VL_native_register(void) if (H5I_INVALID_HID == H5VL_NATIVE_ID_g) if ((H5VL_NATIVE_ID_g = H5VL__register_connector(&H5VL_native_cls_g, TRUE, H5P_VOL_INITIALIZE_DEFAULT)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, H5I_INVALID_HID, "can't create ID for native VOL connector"); /* Set return value */ ret_value = H5VL_NATIVE_ID_g; @@ -309,15 +309,15 @@ H5VL_native_get_file_addr_len(hid_t loc_id, size_t *addr_len) /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve underlying VOL object */ if (NULL == (vol_obj = H5VL_object(loc_id))) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve file address length */ if (H5VL__native_get_file_addr_len(vol_obj, vol_obj_type, addr_len) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get file address length") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get file address length"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -348,7 +348,7 @@ H5VL__native_get_file_addr_len(void *obj, H5I_type_t obj_type, size_t *addr_len) /* Retrieve file from the VOL object */ if (H5VL_native_get_file_struct(obj, obj_type, &file) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get file from VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get file from VOL object"); /* Get the length of an address in this file */ *addr_len = H5F_SIZEOF_ADDR(file); @@ -378,15 +378,15 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token) /* Check args */ if (NULL == token) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token pointer can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token pointer can't be NULL"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve underlying VOL object */ if (NULL == (vol_obj = H5VL_object(loc_id))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object"); #ifndef NDEBUG { @@ -395,12 +395,12 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token) /* Get the location object */ if (NULL == (vol_obj_container = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL object is a native connector object */ if (H5VL_object_is_native(vol_obj_container, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); assert(is_native_vol_obj && "not a native VOL connector object"); } @@ -408,7 +408,7 @@ H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token) /* Convert the haddr_t to an object token */ if (H5VL_native_addr_to_token(vol_obj, vol_obj_type, addr, token) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "couldn't serialize haddr_t into object token") + HGOTO_ERROR(H5E_VOL, H5E_CANTSERIALIZE, FAIL, "couldn't serialize haddr_t into object token"); done: FUNC_LEAVE_API(ret_value) @@ -438,7 +438,7 @@ H5VL_native_addr_to_token(void *obj, H5I_type_t obj_type, haddr_t addr, H5O_toke /* 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") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get length of haddr_t from VOL object"); /* Ensure that token is initialized */ memset(token, 0, sizeof(H5O_token_t)); @@ -472,15 +472,15 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr) /* Check args */ if (NULL == addr) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr pointer can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr pointer can't be NULL"); /* Get object type */ if ((vol_obj_type = H5I_get_type(loc_id)) < 0) - HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Retrieve underlying VOL object */ if (NULL == (vol_obj = H5VL_object(loc_id))) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get underlying VOL object"); #ifndef NDEBUG { @@ -489,12 +489,12 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr) /* Get the location object */ if (NULL == (vol_obj_container = (H5VL_object_t *)H5I_object(loc_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier"); /* Make sure that the VOL object is a native connector object */ if (H5VL_object_is_native(vol_obj_container, &is_native_vol_obj) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, - "can't determine if VOL object is native connector object") + "can't determine if VOL object is native connector object"); assert(is_native_vol_obj && "not a native VOL connector object"); } @@ -502,7 +502,7 @@ H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr) /* Convert the object token to an haddr_t */ if (H5VL_native_token_to_addr(vol_obj, vol_obj_type, token, addr) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "couldn't deserialize object token into haddr_t") + HGOTO_ERROR(H5E_VOL, H5E_CANTUNSERIALIZE, FAIL, "couldn't deserialize object token into haddr_t"); done: FUNC_LEAVE_API(ret_value) @@ -532,7 +532,7 @@ H5VL_native_token_to_addr(void *obj, H5I_type_t obj_type, H5O_token_t token, had /* 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") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "couldn't get length of haddr_t from VOL object"); /* Decode token */ p = (const uint8_t *)&token; @@ -583,7 +583,7 @@ H5VL_native_get_file_struct(void *obj, H5I_type_t type, H5F_t **file) break; case H5I_MAP: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "maps not supported in native VOL connector"); case H5I_UNINIT: case H5I_BADID: @@ -599,7 +599,7 @@ H5VL_native_get_file_struct(void *obj, H5I_type_t type, H5F_t **file) case H5I_EVENTSET: case H5I_NTYPES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); } /* end switch */ /* Set return value for objects (not files) */ @@ -608,7 +608,7 @@ H5VL_native_get_file_struct(void *obj, H5I_type_t type, H5F_t **file) /* Couldn't find a file struct */ if (!*file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c index 3bd2b38..c41496a 100644 --- a/src/H5VLnative_attr.c +++ b/src/H5VLnative_attr.c @@ -88,35 +88,35 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, NULL, "no write intent on file") + HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, NULL, "no write intent on file"); if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list"); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype"); /* If this is a named datatype, get the connector's pointer to the datatype */ type = H5T_get_actual_type(dt); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data space") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data space"); if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Acreate */ /* Go do the real work for attaching the attribute to the dataset */ if (NULL == (attr = H5A__create(&loc, attr_name, type, space, acpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Acreate_by_name */ if (NULL == (attr = H5A__create_by_name(&loc, loc_params->loc_data.loc_by_name.name, attr_name, type, space, acpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown attribute create parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown attribute create parameters"); ret_value = (void *)attr; @@ -151,22 +151,22 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha /* check arguments */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list"); if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Aopen */ /* Open the attribute */ if (NULL == (attr = H5A__open(&loc, attr_name))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open attribute: '%s'", attr_name) + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open attribute: '%s'", attr_name); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Aopen_by_name */ /* Open the attribute on the object header */ if (NULL == (attr = H5A__open_by_name(&loc, loc_params->loc_data.loc_by_name.name, attr_name))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute"); } /* end else-if */ else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Aopen_by_idx */ @@ -174,10 +174,10 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha if (NULL == (attr = H5A__open_by_idx( &loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open attribute"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown attribute open parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown attribute open parameters"); ret_value = (void *)attr; @@ -204,11 +204,11 @@ H5VL__native_attr_read(void *attr, hid_t dtype_id, void *buf, hid_t H5_ATTR_UNUS FUNC_ENTER_PACKAGE if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Go write the actual data to the attribute */ if ((ret_value = H5A__read((H5A_t *)attr, mem_type, buf)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute") + HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -233,11 +233,11 @@ H5VL__native_attr_write(void *attr, hid_t dtype_id, const void *buf, hid_t H5_AT FUNC_ENTER_PACKAGE if (NULL == (mem_type = (H5T_t *)H5I_object_verify(dtype_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Go write the actual data to the attribute */ if ((ret_value = H5A__write((H5A_t *)attr, mem_type, buf)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute") + HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -266,7 +266,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE H5A_t *attr = (H5A_t *)obj; if ((args->args.get_space.space_id = H5A_get_space(attr)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get space ID of attribute") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get space ID of attribute"); break; } @@ -275,7 +275,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE H5A_t *attr = (H5A_t *)obj; if ((args->args.get_type.type_id = H5A__get_type(attr)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get datatype ID of attribute") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get datatype ID of attribute"); break; } @@ -284,7 +284,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE H5A_t *attr = (H5A_t *)obj; if ((args->args.get_acpl.acpl_id = H5A__get_create_plist(attr)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get creation property list for attr") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get creation property list for attr"); break; } @@ -296,7 +296,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE if (H5VL_OBJECT_BY_SELF == get_name_args->loc_params.type) { if (H5A__get_name((H5A_t *)obj, get_name_args->buf_size, get_name_args->buf, get_name_args->attr_name_len) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get attribute name") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get attribute name"); } else if (H5VL_OBJECT_BY_IDX == get_name_args->loc_params.type) { H5G_loc_t loc; @@ -304,14 +304,14 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE /* check arguments */ if (H5G_loc_real(obj, get_name_args->loc_params.obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Open the attribute on the object header */ if (NULL == (attr = H5A__open_by_idx(&loc, get_name_args->loc_params.loc_data.loc_by_idx.name, get_name_args->loc_params.loc_data.loc_by_idx.idx_type, get_name_args->loc_params.loc_data.loc_by_idx.order, get_name_args->loc_params.loc_data.loc_by_idx.n))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute"); /* Get the length of the name */ *get_name_args->attr_name_len = HDstrlen(attr->shared->name); @@ -326,10 +326,10 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE /* Release resources */ if (attr && H5A__close(attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute"); } else - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get name of attr") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get name of attr"); break; } @@ -342,53 +342,53 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE if (H5VL_OBJECT_BY_SELF == get_info_args->loc_params.type) { attr = (H5A_t *)obj; if (H5A__get_info(attr, get_info_args->ainfo) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get attribute info") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get attribute info"); } else if (H5VL_OBJECT_BY_NAME == get_info_args->loc_params.type) { H5G_loc_t loc; /* check arguments */ if (H5G_loc_real(obj, get_info_args->loc_params.obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Open the attribute on the object header */ if (NULL == (attr = H5A__open_by_name(&loc, get_info_args->loc_params.loc_data.loc_by_name.name, get_info_args->attr_name))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute"); /* Get the attribute information */ if (H5A__get_info(attr, get_info_args->ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info"); /* Release resources */ if (attr && H5A__close(attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute"); } else if (H5VL_OBJECT_BY_IDX == get_info_args->loc_params.type) { H5G_loc_t loc; /* check arguments */ if (H5G_loc_real(obj, get_info_args->loc_params.obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Open the attribute on the object header */ if (NULL == (attr = H5A__open_by_idx(&loc, get_info_args->loc_params.loc_data.loc_by_idx.name, get_info_args->loc_params.loc_data.loc_by_idx.idx_type, get_info_args->loc_params.loc_data.loc_by_idx.order, get_info_args->loc_params.loc_data.loc_by_idx.n))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute"); /* Get the attribute information */ if (H5A__get_info(attr, get_info_args->ainfo) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to get attribute info"); /* Release resources */ if (attr && H5A__close(attr) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute"); } else - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get name of attr") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get name of attr"); break; } @@ -402,7 +402,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_args_t *args, hid_t H5_ATTR_UNUSE } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from attr") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from attr"); } /* end switch */ done: @@ -429,7 +429,7 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ /* Get location for passed-in object */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); switch (args->op_type) { /* H5Adelete/delete_by_name */ @@ -437,15 +437,15 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ if (H5VL_OBJECT_BY_SELF == loc_params->type) { /* Delete the attribute from the location */ if (H5O__attr_remove(loc.oloc, args->args.del.name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); } /* end if */ else if (H5VL_OBJECT_BY_NAME == loc_params->type) { /* Delete the attribute */ if (H5A__delete_by_name(&loc, loc_params->loc_data.loc_by_name.name, args->args.del.name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute delete location") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute delete location"); break; } @@ -458,10 +458,10 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ /* Delete the attribute from the location */ if (H5A__delete_by_idx(&loc, loc_params->loc_data.loc_by_name.name, del_by_idx_args->idx_type, del_by_idx_args->order, del_by_idx_args->n) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute"); } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute delete_by_idx location") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute delete_by_idx location"); break; } @@ -470,16 +470,16 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* Check if the attribute exists */ if (H5O__attr_exists(loc.oloc, args->args.exists.name, args->args.exists.exists) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* Check if the attribute exists */ if (H5A__exists_by_name(loc, loc_params->loc_data.loc_by_name.name, args->args.exists.name, args->args.exists.exists) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown parameters"); break; } @@ -495,7 +495,7 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ else if (loc_params->type == H5VL_OBJECT_BY_NAME) /* H5Aiterate_by_name */ loc_name = loc_params->loc_data.loc_by_name.name; else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unsupported location type") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unsupported location type"); /* Iterate over attributes */ if ((ret_value = H5A__iterate(&loc, loc_name, iter_args->idx_type, iter_args->order, @@ -509,21 +509,21 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Arename */ /* Call attribute rename routine */ if (H5O__attr_rename(loc.oloc, args->args.rename.old_name, args->args.rename.new_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Arename_by_name */ /* Call attribute rename routine */ if (H5A__rename_by_name(loc, loc_params->loc_data.loc_by_name.name, args->args.rename.old_name, args->args.rename.new_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") + HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute rename parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown attribute rename parameters"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: @@ -565,7 +565,7 @@ H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, H5VL_optional_args_t *args, #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation"); } /* end switch */ done: @@ -590,7 +590,7 @@ H5VL__native_attr_close(void *attr, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U FUNC_ENTER_PACKAGE if (H5A__close((H5A_t *)attr) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close attribute") + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close attribute"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative_blob.c b/src/H5VLnative_blob.c index 6793bcb..6aebc01 100644 --- a/src/H5VLnative_blob.c +++ b/src/H5VLnative_blob.c @@ -73,7 +73,7 @@ H5VL__native_blob_put(void *obj, const void *buf, size_t size, void *blob_id, vo /* Write the VL information to disk (allocates space also) */ if (H5HG_insert(f, size, buf, &hobjid) < 0) - HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "unable to write blob information") + HGOTO_ERROR(H5E_VOL, H5E_WRITEERROR, FAIL, "unable to write blob information"); /* Encode the heap information */ H5F_addr_encode(f, &id, hobjid.addr); @@ -116,11 +116,11 @@ H5VL__native_blob_get(void *obj, const void *blob_id, void *buf, size_t size, vo if (hobjid.addr > 0) /* Read the VL information from disk */ if (NULL == H5HG_read(f, &hobjid, buf, &hobj_size)) - HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "unable to read VL information") + HGOTO_ERROR(H5E_VOL, H5E_READERROR, FAIL, "unable to read VL information"); /* Verify the size is correct */ if (hobj_size != size) - HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "Expected global heap object size does not match") + HGOTO_ERROR(H5E_VOL, H5E_CANTDECODE, FAIL, "Expected global heap object size does not match"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -182,13 +182,13 @@ H5VL__native_blob_specific(void *obj, void *blob_id, H5VL_blob_specific_args_t * /* Free heap object */ if (hobjid.addr > 0) if (H5HG_remove(f, &hobjid) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTREMOVE, FAIL, "unable to remove heap object") + HGOTO_ERROR(H5E_VOL, H5E_CANTREMOVE, FAIL, "unable to remove heap object"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c index f6b9af6..92a2249 100644 --- a/src/H5VLnative_dataset.c +++ b/src/H5VLnative_dataset.c @@ -103,10 +103,10 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi /* Check dataset's file pointer is valid */ if (NULL == dinfo[i].dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file"); if (f_sh != H5F_SHARED(dinfo[i].dset->oloc.file)) HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, - "different files detected in multi dataset I/O request") + "different files detected in multi dataset I/O request"); /* Set up memory type */ dinfo[i].mem_type_id = mem_type_id[i]; @@ -116,30 +116,30 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi /* Use dataspace for dataset */ dinfo[i].file_space = dinfo[i].dset->shared->space; else if (H5S_BLOCK == file_space_id[i]) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "H5S_BLOCK is not allowed for file dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "H5S_BLOCK is not allowed for file dataspace"); else if (H5S_PLIST == file_space_id[i]) { H5P_genplist_t *plist; /* Property list pointer */ H5S_t *space; /* Dataspace to hold selection */ /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) - HGOTO_ERROR(H5E_DATASET, H5E_BADID, FAIL, "bad dataset transfer property list") + HGOTO_ERROR(H5E_DATASET, H5E_BADID, FAIL, "bad dataset transfer property list"); /* Get a pointer to the file space in the property list */ if (H5P_peek(plist, H5D_XFER_DSET_IO_SEL_NAME, &space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error getting dataset I/O selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error getting dataset I/O selection"); /* Use dataspace for dataset */ dinfo[i].file_space = dinfo[i].dset->shared->space; /* Copy, but share, selection from property list to dataset's dataspace */ if (H5S_SELECT_COPY(dinfo[i].file_space, space, TRUE) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataset I/O selection") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "can't copy dataset I/O selection"); } /* end else-if */ else { /* Get the dataspace pointer */ if (NULL == (dinfo[i].file_space = (H5S_t *)H5I_object_verify(file_space_id[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "file_space_id is not a dataspace ID") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "file_space_id is not a dataspace ID"); } /* end else */ /* Get dataspace for memory buffer */ @@ -155,29 +155,30 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi if (nelmts > 0) { /* Create a 1-D dataspace of the same # of elements */ if (NULL == (dinfo[i].mem_space = H5S_create_simple(1, &nelmts, NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create simple memory dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, + "unable to create simple memory dataspace"); } /* end if */ else { /* Create a NULL dataspace of the same # of elements */ if (NULL == (dinfo[i].mem_space = H5S_create(H5S_NULL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create NULL memory dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "unable to create NULL memory dataspace"); } /* end else */ } /* end if */ else if (H5S_PLIST == mem_space_id[i]) - HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "H5S_PLIST is not allowed for memory dataspace") + HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "H5S_PLIST is not allowed for memory dataspace"); else { /* Get the dataspace pointer */ if (NULL == (dinfo[i].mem_space = (H5S_t *)H5I_object_verify(mem_space_id[i], H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "mem_space_id is not a dataspace ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "mem_space_id is not a dataspace ID"); } /* end else */ /* Check for valid selections */ if (H5S_SELECT_VALID(dinfo[i].file_space) != TRUE) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "selection + offset not within extent for file dataspace") + "selection + offset not within extent for file dataspace"); if (H5S_SELECT_VALID(dinfo[i].mem_space) != TRUE) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, - "selection + offset not within extent for memory dataspace") + "selection + offset not within extent for memory dataspace"); /* Set up buf */ dinfo[i].buf = buf[i]; @@ -251,23 +252,23 @@ H5VL__native_dataset_create(void *obj, const H5VL_loc_params_t *loc_params, cons /* Check arguments */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); if (H5I_DATATYPE != H5I_get_type(type_id)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype ID"); if (NULL == (space = (const H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a dataspace ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a dataspace ID"); /* H5Dcreate_anon */ if (NULL == name) { /* build and open the new dataset */ if (NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset"); } /* end if */ /* H5Dcreate2 */ else { /* Create the new dataset & get its ID */ if (NULL == (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset"); } /* end else */ ret_value = (void *)dset; @@ -313,11 +314,11 @@ H5VL__native_dataset_open(void *obj, const H5VL_loc_params_t *loc_params, const FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); /* Open the dataset */ if (NULL == (dset = H5D__open_name(&loc, name, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to open dataset"); ret_value = (void *)dset; @@ -347,19 +348,19 @@ H5VL__native_dataset_read(size_t count, void *obj[], hid_t mem_type_id[], hid_t /* Allocate dataset info array if necessary */ if (count > 1) if (NULL == (dinfo = (H5D_dset_io_info_t *)H5MM_malloc(count * sizeof(H5D_dset_io_info_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset info array buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset info array buffer"); /* Get file & memory dataspaces */ if (H5VL__native_dataset_io_setup(count, obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, (H5_flexible_const_ptr_t *)buf, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up file and memory dataspaces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up file and memory dataspaces"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Read raw data. Call H5D__read directly in single dset case. */ if (H5D__read(count, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data"); done: /* Clean up */ @@ -394,19 +395,19 @@ H5VL__native_dataset_write(size_t count, void *obj[], hid_t mem_type_id[], hid_t /* Allocate dataset info array if necessary */ if (count > 1) if (NULL == (dinfo = (H5D_dset_io_info_t *)H5MM_malloc(count * sizeof(H5D_dset_io_info_t)))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset info array buffer") + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate dset info array buffer"); /* Get file & memory dataspaces */ if (H5VL__native_dataset_io_setup(count, obj, mem_type_id, mem_space_id, file_space_id, dxpl_id, (H5_flexible_const_ptr_t *)buf, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up file and memory dataspaces") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up file and memory dataspaces"); /* Set DXPL for operation */ H5CX_set_dxpl(dxpl_id); /* Write raw data. Call H5D__write directly in single dset case. */ if (H5D__write(count, dinfo) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data"); done: /* Clean up */ @@ -441,7 +442,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_space */ case H5VL_DATASET_GET_SPACE: { if ((args->args.get_space.space_id = H5D__get_space(dset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get space ID of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get space ID of dataset"); break; } @@ -449,7 +450,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_space_status */ case H5VL_DATASET_GET_SPACE_STATUS: { if (H5D__get_space_status(dset, args->args.get_space_status.status) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get space status") + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get space status"); break; } @@ -457,7 +458,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_type */ case H5VL_DATASET_GET_TYPE: { if ((args->args.get_type.type_id = H5D__get_type(dset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype ID of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get datatype ID of dataset"); break; } @@ -465,7 +466,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_create_plist */ case H5VL_DATASET_GET_DCPL: { if ((args->args.get_dcpl.dcpl_id = H5D_get_create_plist(dset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get creation property list for dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get creation property list for dataset"); break; } @@ -473,7 +474,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_access_plist */ case H5VL_DATASET_GET_DAPL: { if ((args->args.get_dapl.dapl_id = H5D_get_access_plist(dset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get access property list for dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get access property list for dataset"); break; } @@ -481,12 +482,12 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_args_t *args, hid_t H5_ATTR /* H5Dget_storage_size */ case H5VL_DATASET_GET_STORAGE_SIZE: { if (H5D__get_storage_size(dset, args->args.get_storage_size.storage_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from dataset") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from dataset"); } /* end switch */ done: @@ -515,14 +516,14 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_args_t *args, hid /* H5Dset_extent (H5Dextend - deprecated) */ case H5VL_DATASET_SET_EXTENT: { if (H5D__set_extent(dset, args->args.set_extent.size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set extent of dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to set extent of dataset"); break; } /* H5Dflush */ case H5VL_DATASET_FLUSH: { if (H5D__flush(dset, args->args.flush.dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset"); break; } @@ -530,13 +531,13 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_args_t *args, hid /* H5Drefresh */ case H5VL_DATASET_REFRESH: { if (H5D__refresh(dset, args->args.refresh.dset_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to refresh dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to refresh dataset"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: @@ -576,7 +577,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ if (dset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE) if (H5D__format_convert(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, - "unable to downgrade chunk indexing type for dataset") + "unable to downgrade chunk indexing type for dataset"); break; case H5D_CONTIGUOUS: @@ -585,7 +586,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ if (dset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT) if (H5D__format_convert(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, - "unable to downgrade layout version for dataset") + "unable to downgrade layout version for dataset"); break; case H5D_VIRTUAL: @@ -594,10 +595,10 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset layout type"); default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type"); } /* end switch */ break; @@ -607,7 +608,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ case H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE: { /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Get the chunk indexing type */ *opt_args->get_chunk_idx_type.idx_type = dset->shared->layout.u.chunk.idx_type; @@ -621,11 +622,11 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Call private function */ if (H5D__get_chunk_storage_size(dset, gcss_args->offset, gcss_args->size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk"); break; } @@ -643,15 +644,15 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ space = dset->shared->space; else /* otherwise, use the given space ID */ if (NULL == (space = (const H5S_t *)H5I_object_verify(gnc_args->space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace ID"); /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Call private function */ if (H5D__get_num_chunks(dset, space, gnc_args->nchunks) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get number of chunks"); break; } @@ -669,16 +670,16 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ space = dset->shared->space; else /* otherwise, use the given space ID */ if (NULL == (space = (const H5S_t *)H5I_object_verify(gcibi_args->space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid dataspace ID"); /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Call private function */ if (H5D__get_chunk_info(dset, space, gcibi_args->chk_index, gcibi_args->offset, gcibi_args->filter_mask, gcibi_args->addr, gcibi_args->size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by index") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by index"); break; } @@ -691,12 +692,13 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Call private function */ if (H5D__get_chunk_info_by_coord(dset, gcibc_args->offset, gcibc_args->filter_mask, gcibc_args->addr, gcibc_args->size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info by its logical coordinates") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, + "can't get chunk info by its logical coordinates"); break; } @@ -708,20 +710,20 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ /* Check arguments */ if (NULL == dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file"); if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Copy the user's offset array so we can be sure it's terminated properly. * (we don't want to mess with the user's buffer). */ if (H5D__chunk_get_offset_copy(dset, chunk_read_args->offset, offset_copy) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "failure to copy offset array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "failure to copy offset array"); /* Read the raw chunk */ if (H5D__chunk_direct_read(dset, offset_copy, &chunk_read_args->filters, chunk_read_args->buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data") + HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data"); break; } @@ -733,20 +735,20 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ /* Check arguments */ if (NULL == dset->oloc.file) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not associated with a file"); if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Copy the user's offset array so we can be sure it's terminated properly. * (we don't want to mess with the user's buffer). */ if (H5D__chunk_get_offset_copy(dset, chunk_write_args->offset, offset_copy) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "failure to copy offset array") + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "failure to copy offset array"); /* Write chunk */ if (H5D__chunk_direct_write(dset, chunk_write_args->filters, offset_copy, chunk_write_args->size, chunk_write_args->buf) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data") + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data"); break; } @@ -756,7 +758,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ H5VL_native_dataset_get_vlen_buf_size_t *gvbs_args = &opt_args->get_vlen_buf_size; if (H5D__vlen_get_buf_size(dset, gvbs_args->type_id, gvbs_args->space_id, gvbs_args->size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of vlen buf needed") + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of vlen buf needed"); break; } @@ -775,7 +777,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ /* Make sure the dataset is chunked */ if (H5D_CHUNKED != dset->shared->layout.type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset"); /* Call private function */ if ((ret_value = H5D__chunk_iter(dset, opt_args->chunk_iter.op, opt_args->chunk_iter.op_data)) < @@ -786,7 +788,7 @@ H5VL__native_dataset_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_ } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation"); } /* end switch */ done: @@ -811,7 +813,7 @@ H5VL__native_dataset_close(void *dset, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATT FUNC_ENTER_PACKAGE if (H5D_close((H5D_t *)dset) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't close dataset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't close dataset"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative_datatype.c b/src/H5VLnative_datatype.c index ad62ae6..b2451d7 100644 --- a/src/H5VLnative_datatype.c +++ b/src/H5VLnative_datatype.c @@ -83,23 +83,23 @@ H5VL__native_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, con /* check arguments */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype"); /* Check arguments. We cannot commit an immutable type because H5Tclose() * normally fails on such types (try H5Tclose(H5T_NATIVE_INT)) but closing * a named type should always succeed. */ if (H5T_STATE_NAMED == dt->shared->state || H5T_STATE_OPEN == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is already committed") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is already committed"); if (H5T_STATE_IMMUTABLE == dt->shared->state) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is immutable") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is immutable"); /* Check for a "sensible" datatype to store on disk */ if (H5T_is_sensible(dt) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible"); /* Copy the datatype - the copied one will be the type that is * committed, and attached to original datatype above the VOL @@ -112,12 +112,12 @@ H5VL__native_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, con if (NULL != name) { /* H5Tcommit */ if (H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype"); } /* end if */ else { /* H5Tcommit_anon */ if (H5T__commit_anon(loc.oloc->file, type, tcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype"); } /* end else */ ret_value = (void *)type; @@ -151,11 +151,11 @@ H5VL__native_datatype_open(void *obj, const H5VL_loc_params_t *loc_params, const FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); /* Open the datatype */ if (NULL == (type = H5T__open_name(&loc, name))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype"); type->vol_obj = NULL; @@ -187,7 +187,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT /* H5T_construct_datatype (library private routine) */ case H5VL_DATATYPE_GET_BINARY_SIZE: { if (H5T_encode(dt, NULL, args->args.get_binary_size.size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't determine serialized length of datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't determine serialized length of datatype"); break; } @@ -195,7 +195,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT /* H5T_construct_datatype (library private routine) */ case H5VL_DATATYPE_GET_BINARY: { if (H5T_encode(dt, args->args.get_binary.buf, &args->args.get_binary.buf_size) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSERIALIZE, FAIL, "can't serialize datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSERIALIZE, FAIL, "can't serialize datatype"); break; } @@ -209,7 +209,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from datatype") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from datatype"); } /* end switch */ done: @@ -240,10 +240,10 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_args_t *args, h /* Currently, H6Oflush causes H5Fclose to trigger an assertion failure in metadata cache. * Leave this situation for the future solution */ if (H5F_HAS_FEATURE(dt->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel") + HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel"); if (H5O_flush_common(&dt->oloc, args->args.flush.type_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype"); break; } @@ -251,13 +251,13 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_args_t *args, h /* H5VL_DATATYPE_REFRESH */ case H5VL_DATATYPE_REFRESH: { if ((H5O_refresh_metadata(&dt->oloc, args->args.refresh.type_id)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: @@ -282,7 +282,7 @@ H5VL__native_datatype_close(void *dt, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR FUNC_ENTER_PACKAGE if (H5T_close((H5T_t *)dt) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close datatype") + HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close datatype"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c index 9694fb3..56cfae2 100644 --- a/src/H5VLnative_file.c +++ b/src/H5VLnative_file.c @@ -91,7 +91,7 @@ H5VL__native_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t /* Create the file */ if (NULL == (new_file = H5F_open(name, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to create file"); new_file->id_exists = TRUE; ret_value = (void *)new_file; @@ -125,7 +125,7 @@ H5VL__native_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t H5 /* Open the file */ if (NULL == (new_file = H5F_open(name, flags, H5P_FILE_CREATE_DEFAULT, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") + HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file"); new_file->id_exists = TRUE; ret_value = (void *)new_file; @@ -159,7 +159,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE /* "get container info" */ case H5VL_FILE_GET_CONT_INFO: { if (H5F__get_cont_info((H5F_t *)obj, args->args.get_cont_info.info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file container info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file container info"); break; } @@ -167,7 +167,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE /* H5Fget_access_plist */ case H5VL_FILE_GET_FAPL: { if ((args->args.get_fapl.fapl_id = H5F_get_access_plist((H5F_t *)obj, TRUE)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file access property list") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file access property list"); break; } @@ -178,11 +178,11 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE f = (H5F_t *)obj; if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Create the property list object to return */ if ((args->args.get_fcpl.fcpl_id = H5P_copy_plist(plist, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy file creation properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy file creation properties"); break; } @@ -228,7 +228,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE H5VL_file_get_name_args_t *file_args = &args->args.get_name; if (H5VL_native_get_file_struct(obj, file_args->type, &f) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Get length of file name */ *file_args->file_name_len = HDstrlen(H5F_OPEN_NAME(f)); @@ -248,7 +248,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE case H5VL_FILE_GET_OBJ_COUNT: { if (H5F_get_obj_count((H5F_t *)obj, args->args.get_obj_count.types, TRUE, args->args.get_obj_count.count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object count") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object count"); break; } @@ -259,13 +259,13 @@ H5VL__native_file_get(void *obj, H5VL_file_get_args_t *args, hid_t H5_ATTR_UNUSE if (H5F_get_obj_ids((H5F_t *)obj, file_args->types, file_args->max_objs, file_args->oid_list, TRUE, file_args->count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object IDs") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve object IDs"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information"); } /* end switch */ done: @@ -296,7 +296,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ /* Get the file for the object */ if (H5VL_native_get_file_struct(obj, args->args.flush.obj_type, &f) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Nothing to do if the file is read only. This determination is * made at the shared open(2) flags level, implying that opening a @@ -309,13 +309,13 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ if (H5F_SCOPE_GLOBAL == args->args.flush.scope) { /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy"); } /* end if */ else { /* Call the flush routine, for this file */ if (H5F__flush(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, - "unable to flush file's cached information") + "unable to flush file's cached information"); } /* end else */ } /* end if */ @@ -328,7 +328,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ /* Reopen the file through the VOL connector */ if (NULL == (new_file = H5F__reopen((H5F_t *)obj))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file"); new_file->id_exists = TRUE; /* Set 'out' value */ @@ -343,7 +343,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ if ((result = H5F__is_hdf5(args->args.is_accessible.filename, args->args.is_accessible.fapl_id)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "error in HDF5 file check") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "error in HDF5 file check"); /* Set 'out' value */ *args->args.is_accessible.accessible = (hbool_t)result; @@ -354,7 +354,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ /* H5Fdelete */ case H5VL_FILE_DELETE: { if (H5F__delete(args->args.del.filename, args->args.del.fapl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "error in HDF5 file deletion") + HGOTO_ERROR(H5E_FILE, H5E_CANTDELETEFILE, FAIL, "error in HDF5 file deletion"); break; } @@ -371,7 +371,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_args_t *args, hid_t H5_ } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: @@ -405,7 +405,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Get the actual file size & base address */ if (H5F__get_max_eof_eoa(f, &max_eof_eoa) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file can't get max eof/eoa ") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file can't get max eof/eoa "); base_addr = H5FD_get_base_addr(f->shared->lf); /* Convert relative base address for file to absolute address */ @@ -420,7 +420,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Get file image */ if (H5F__get_file_image(f, gfi_args->buf, gfi_args->buf_size, gfi_args->image_len) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "get file image failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "get file image failed"); break; } @@ -431,7 +431,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Get the actual amount of free space in the file */ if (H5MF_get_freespace(f, gfs_args->size, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file"); break; } @@ -443,7 +443,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Go get the free-space section information in the file */ if (H5MF_get_free_sections(f, gfs_args->type, gfs_args->nsects, gfs_args->sect_info, gfs_args->sect_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file"); break; } @@ -456,11 +456,11 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ * for the top file in a mount hierarchy. */ if (H5VL_native_get_file_struct(obj, gfi_args->type, &f) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get a file struct") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get a file struct"); /* Get the file info */ if (H5F__get_info(f, gfi_args->finfo) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info"); break; } @@ -469,7 +469,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_GET_MDC_CONF: { /* Get the metadata cache configuration */ if (H5AC_get_cache_auto_resize_config(f->shared->cache, opt_args->get_mdc_config.config) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache configuration") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache configuration"); break; } @@ -478,7 +478,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_GET_MDC_HR: { /* Get the current hit rate */ if (H5AC_get_cache_hit_rate(f->shared->cache, opt_args->get_mdc_hit_rate.hit_rate) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache hit rate") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache hit rate"); break; } @@ -490,7 +490,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Get the size data */ if (H5AC_get_cache_size(f->shared->cache, gms_args->max_size, gms_args->min_clean_size, gms_args->cur_size, gms_args->cur_num_entries) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache size") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata cache size"); break; } @@ -501,7 +501,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Retrieve the VFD handle for the file */ if (H5F_get_vfd_handle(f, gvh_args->fapl_id, gvh_args->file_handle) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve VFD handle") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve VFD handle"); break; } @@ -511,7 +511,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Release the EFC */ if (f->shared->efc) if (H5F__efc_release(f->shared->efc) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache"); break; } @@ -520,7 +520,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE: { /* Reset the hit rate statistic */ if (H5AC_reset_cache_hit_rate_stats(f->shared->cache) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate"); break; } @@ -529,7 +529,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_SET_MDC_CONFIG: { /* Set the metadata cache configuration */ if (H5AC_set_cache_auto_resize_config(f->shared->cache, opt_args->set_mdc_config.config) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set metadata cache configuration") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set metadata cache configuration"); break; } @@ -537,7 +537,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* H5Fget_metadata_read_retry_info */ case H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO: { if (H5F_get_metadata_read_retry_info(f, opt_args->get_metadata_read_retry_info.info) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata read retry info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get metadata read retry info"); break; } @@ -545,7 +545,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* H5Fstart_swmr_write */ case H5VL_NATIVE_FILE_START_SWMR_WRITE: { if (H5F__start_swmr_write(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't start SWMR write") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't start SWMR write"); break; } @@ -554,7 +554,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_START_MDC_LOGGING: { /* Call mdc logging function */ if (H5C_start_logging(f->shared->cache) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to start mdc logging") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to start mdc logging"); break; } @@ -563,7 +563,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_STOP_MDC_LOGGING: { /* Call mdc logging function */ if (H5C_stop_logging(f->shared->cache) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to stop mdc logging") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to stop mdc logging"); break; } @@ -575,7 +575,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Call mdc logging function */ if (H5C_get_logging_status(f->shared->cache, gmls_args->is_enabled, gmls_args->is_currently_logging) < 0) - HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to get logging status") + HGOTO_ERROR(H5E_FILE, H5E_LOGGING, FAIL, "unable to get logging status"); break; } @@ -584,7 +584,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_FORMAT_CONVERT: { /* Convert the format */ if (H5F__format_convert(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format") + HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format"); break; } @@ -593,11 +593,11 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS: { /* Sanity check */ if (NULL == f->shared->page_buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page buffering not enabled on file") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page buffering not enabled on file"); /* Reset the statistics */ if (H5PB_reset_stats(f->shared->page_buf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't reset stats for page buffering") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't reset stats for page buffering"); break; } @@ -608,12 +608,12 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Sanity check */ if (NULL == f->shared->page_buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page buffering not enabled on file") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page buffering not enabled on file"); /* Get the statistics */ if (H5PB_get_stats(f->shared->page_buf, gpbs_args->accesses, gpbs_args->hits, gpbs_args->misses, gpbs_args->evictions, gpbs_args->bypasses) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering"); break; } @@ -624,7 +624,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Go get the address and size of the cache image */ if (H5AC_get_mdc_image_info(f->shared->cache, gmii_args->addr, gmii_args->len) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info"); break; } @@ -637,11 +637,11 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* We might introduce a new feature flag in the future */ if (!H5F_HAS_FEATURE(f, H5FD_FEAT_SUPPORTS_SWMR_IO)) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, - "must use a SWMR-compatible VFD for this public routine") + "must use a SWMR-compatible VFD for this public routine"); /* The real work */ if (HADDR_UNDEF == (rel_eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT))) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "get_eoa request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "get_eoa request failed"); /* Set return value */ /* (Note compensating for base address subtraction in internal routine) */ @@ -658,15 +658,15 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* We might introduce a new feature flag in the future */ if (!H5F_HAS_FEATURE(f, H5FD_FEAT_SUPPORTS_SWMR_IO)) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, - "must use a SWMR-compatible VFD for this public routine") + "must use a SWMR-compatible VFD for this public routine"); /* Get the maximum of EOA and EOF */ if (H5F__get_max_eof_eoa(f, &max_eof_eoa) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file can't get max eof/eoa ") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "file can't get max eof/eoa "); /* Set EOA to the maximum value + increment */ if (H5F__set_eoa(f, H5FD_MEM_DEFAULT, max_eof_eoa + opt_args->increment_filesize.increment) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed"); break; } @@ -677,7 +677,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ /* Call internal set_libver_bounds function */ if (H5F__set_libver_bounds(f, slb_args->low, slb_args->high) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cannot set low/high bounds"); break; } @@ -693,7 +693,7 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG: { if (H5F_set_min_dset_ohdr(f, opt_args->set_min_dset_ohdr_flag.minimize) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, - "cannot set file's dataset object header minimization flag") + "cannot set file's dataset object header minimization flag"); break; } @@ -720,12 +720,12 @@ H5VL__native_file_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_ case H5VL_NATIVE_FILE_POST_OPEN: { /* Call package routine */ if (H5F__post_open(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't finish opening file") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't finish opening file"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation"); } /* end switch */ done: @@ -768,19 +768,19 @@ H5VL__native_file_close(void *file, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U if ((H5F_NREFS(f) > 1) && (H5F_INTENT(f) & H5F_ACC_RDWR)) { /* Get the file ID corresponding to the H5F_t struct */ if (H5I_find_id(f, H5I_FILE, &file_id) < 0 || H5I_INVALID_HID == file_id) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "invalid ID") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "invalid ID"); /* Get the number of references outstanding for this file ID */ if ((nref = H5I_get_ref(file_id, FALSE)) < 0) - HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "can't get ID ref count") + HGOTO_ERROR(H5E_ID, H5E_CANTGET, FAIL, "can't get ID ref count"); if (nref == 1) if (H5F__flush(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cache"); } /* end if */ /* Close the file */ if (H5F__close(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close file") + HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "can't close file"); } done: diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c index d5316ce..70b7ab9 100644 --- a/src/H5VLnative_group.c +++ b/src/H5VLnative_group.c @@ -81,7 +81,7 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const /* Set up the location */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); /* if name is NULL then this is from H5Gcreate_anon */ if (name == NULL) { @@ -94,13 +94,13 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const /* Create the new group & get its ID */ if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group"); } /* end if */ /* otherwise it's from H5Gcreate */ else { /* Create the new group & get its ID */ if (NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group"); } /* end else */ ret_value = (void *)grp; @@ -147,11 +147,11 @@ H5VL__native_group_open(void *obj, const H5VL_loc_params_t *loc_params, const ch /* Set up the location */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); /* Open the group */ if ((grp = H5G__open_name(&loc, name)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group"); ret_value = (void *)grp; @@ -180,7 +180,7 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU /* H5Gget_create_plist */ case H5VL_GROUP_GET_GCPL: { if ((args->args.get_gcpl.gcpl_id = H5G_get_create_plist((H5G_t *)obj)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get creation property list for group") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get creation property list for group"); break; } @@ -191,14 +191,14 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU H5G_loc_t loc; if (H5G_loc_real(obj, get_info_args->loc_params.obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (get_info_args->loc_params.type == H5VL_OBJECT_BY_SELF) { /* H5Gget_info */ /* Retrieve the group's information */ if (H5G__obj_info(loc.oloc, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end if */ else if (get_info_args->loc_params.type == H5VL_OBJECT_BY_NAME) { /* H5Gget_info_by_name */ @@ -206,7 +206,7 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU /* Retrieve the group's information */ if (H5G__get_info_by_name(&loc, get_info_args->loc_params.loc_data.loc_by_name.name, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end else-if */ else if (get_info_args->loc_params.type == H5VL_OBJECT_BY_IDX) { /* H5Gget_info_by_idx */ @@ -217,15 +217,15 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU get_info_args->loc_params.loc_data.loc_by_idx.order, get_info_args->loc_params.loc_data.loc_by_idx.n, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get info parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get info parameters"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from group") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from group"); } /* end switch */ done: @@ -256,11 +256,11 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H H5G_loc_t loc; if (H5G_loc_real(grp, H5I_GROUP, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object"); if (H5F_mount(&loc, args->args.mount.name, args->args.mount.child_file, args->args.mount.fmpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file"); break; } @@ -270,10 +270,10 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H H5G_loc_t loc; if (H5G_loc_real(grp, H5I_GROUP, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object"); if (H5F_unmount(&loc, args->args.unmount.name) < 0) - HGOTO_ERROR(H5E_FILE, H5E_UNMOUNT, FAIL, "unable to unmount file") + HGOTO_ERROR(H5E_FILE, H5E_UNMOUNT, FAIL, "unable to unmount file"); break; } @@ -283,10 +283,10 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H /* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache. * Leave this situation for the future solution */ if (H5F_HAS_FEATURE(grp->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel") + HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel"); if (H5O_flush_common(&grp->oloc, args->args.flush.grp_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group") + HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group"); break; } @@ -294,13 +294,13 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H /* H5Grefresh */ case H5VL_GROUP_REFRESH: { if ((H5O_refresh_metadata(&grp->oloc, args->args.refresh.grp_id)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: @@ -337,7 +337,7 @@ H5VL__native_group_optional(void H5_ATTR_UNUSED *obj, H5VL_optional_args_t *args /* Get the location struct for the object */ if (H5G_loc_real(obj, iter_args->loc_params.obj_type, &grp_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Set up link iteration callback struct */ lnk_op.op_type = H5G_LINK_OP_OLD; @@ -359,19 +359,19 @@ H5VL__native_group_optional(void H5_ATTR_UNUSED *obj, H5VL_optional_args_t *args /* Get the location struct for the object */ if (H5G_loc_real(obj, goi_args->loc_params.obj_type, &grp_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Call the actual group objinfo routine */ if (H5G__get_objinfo(&grp_loc, goi_args->loc_params.loc_data.loc_by_name.name, goi_args->follow_link, goi_args->statbuf) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object"); break; } #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation"); } /* end switch */ done: @@ -396,7 +396,7 @@ H5VL__native_group_close(void *grp, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U FUNC_ENTER_PACKAGE if (H5G_close((H5G_t *)grp) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close group") + HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close group"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLnative_introspect.c b/src/H5VLnative_introspect.c index e322395..4c1cb53 100644 --- a/src/H5VLnative_introspect.c +++ b/src/H5VLnative_introspect.c @@ -83,13 +83,13 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc /* Set appropriate flags for each operation in each subclass */ switch (subcls) { case H5VL_SUBCLS_NONE: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional 'none' operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional 'none' operation"); case H5VL_SUBCLS_INFO: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional info operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional info operation"); case H5VL_SUBCLS_WRAP: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional wrapper operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional wrapper operation"); case H5VL_SUBCLS_ATTR: switch (opt_type) { @@ -101,7 +101,7 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional attribute operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional attribute operation"); break; } /* end switch */ break; @@ -131,13 +131,13 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional dataset operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional dataset operation"); break; } /* end switch */ break; case H5VL_SUBCLS_DATATYPE: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional datatype operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional datatype operation"); case H5VL_SUBCLS_FILE: switch (opt_type) { @@ -190,7 +190,7 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional file operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional file operation"); break; } /* end switch */ break; @@ -209,13 +209,13 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional group operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional group operation"); break; } /* end switch */ break; case H5VL_SUBCLS_LINK: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional link operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional link operation"); case H5VL_SUBCLS_OBJECT: switch (opt_type) { @@ -237,22 +237,22 @@ H5VL__native_introspect_opt_query(void H5_ATTR_UNUSED *obj, H5VL_subclass_t subc break; default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional object operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional object operation"); break; } /* end switch */ break; case H5VL_SUBCLS_REQUEST: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional request operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional request operation"); case H5VL_SUBCLS_BLOB: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional blob operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional blob operation"); case H5VL_SUBCLS_TOKEN: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional token operation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown optional token operation"); default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown H5VL subclass") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown H5VL subclass"); } /* end switch */ done: diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c index 4d6d3a8..342d65d 100644 --- a/src/H5VLnative_link.c +++ b/src/H5VLnative_link.c @@ -84,9 +84,9 @@ H5VL__native_link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_lo H5VL_loc_params_t *cur_params = &args->args.hard.curr_loc_params; if (NULL != cur_obj && H5G_loc_real(cur_obj, cur_params->obj_type, &cur_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (NULL != obj && H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* H5Lcreate_hard */ if (H5VL_OBJECT_BY_NAME == cur_params->type) { @@ -101,17 +101,17 @@ H5VL__native_link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_lo link_loc_p = cur_loc_p; else if (cur_loc_p->oloc->file != link_loc_p->oloc->file) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "source and destination should be in the same file.") + "source and destination should be in the same file."); /* Create the link */ if (H5L__create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name, link_loc_p, loc_params->loc_data.loc_by_name.name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link"); } /* end if */ else { /* H5Olink */ /* Link to the object */ if (H5L_link(&link_loc, loc_params->loc_data.loc_by_name.name, &cur_loc, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link"); } /* end else */ break; @@ -121,10 +121,10 @@ H5VL__native_link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_lo H5G_loc_t link_loc; /* Group location for new link */ if (H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (H5L__create_soft(args->args.soft.target, &link_loc, loc_params->loc_data.loc_by_name.name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link"); break; } @@ -133,16 +133,16 @@ H5VL__native_link_create(H5VL_link_create_args_t *args, void *obj, const H5VL_lo H5G_loc_t link_loc; /* Group location for new link */ if (H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (H5L__create_ud(&link_loc, loc_params->loc_data.loc_by_name.name, args->args.ud.buf, args->args.ud.buf_size, args->args.ud.type, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link"); break; } default: - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "invalid link creation call") + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "invalid link creation call"); } /* end switch */ done: @@ -170,9 +170,9 @@ H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void FUNC_ENTER_PACKAGE if (NULL != src_obj && H5G_loc_real(src_obj, loc_params1->obj_type, &src_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (NULL != dst_obj && H5G_loc_real(dst_obj, loc_params2->obj_type, &dst_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Set up src & dst location pointers */ src_loc_p = &src_loc; @@ -185,7 +185,7 @@ H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, void /* Copy the link */ if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p, loc_params2->loc_data.loc_by_name.name, TRUE, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link") + HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -212,9 +212,9 @@ H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void FUNC_ENTER_PACKAGE if (NULL != src_obj && H5G_loc_real(src_obj, loc_params1->obj_type, &src_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (NULL != dst_obj && H5G_loc_real(dst_obj, loc_params2->obj_type, &dst_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Set up src & dst location pointers */ src_loc_p = &src_loc; @@ -227,7 +227,7 @@ H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1, void /* Move the link */ if (H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name, dst_loc_p, loc_params2->loc_data.loc_by_name.name, FALSE, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") + HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -252,7 +252,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_ FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); switch (args->op_type) { /* H5Lget_info/H5Lget_info_by_idx */ @@ -260,17 +260,17 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_ /* Get the link information */ if (loc_params->type == H5VL_OBJECT_BY_NAME) { if (H5L_get_info(&loc, loc_params->loc_data.loc_by_name.name, args->args.get_info.linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_IDX) { if (H5L__get_info_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, args->args.get_info.linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info"); } /* end else-if */ else - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info"); break; } @@ -282,7 +282,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_ loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, args->args.get_name.name, args->args.get_name.name_size, args->args.get_name.name_len) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info"); break; } @@ -293,23 +293,23 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_ if (loc_params->type == H5VL_OBJECT_BY_NAME) { if (H5L__get_val(&loc, loc_params->loc_data.loc_by_name.name, args->args.get_val.buf, args->args.get_val.buf_size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link value") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link value"); } else if (loc_params->type == H5VL_OBJECT_BY_IDX) { if (H5L__get_val_by_idx( &loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, args->args.get_val.buf, args->args.get_val.buf_size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val"); } else - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from link") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from link"); } /* end switch */ done: @@ -338,9 +338,9 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ H5G_loc_t loc; if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (H5L__exists(&loc, loc_params->loc_data.loc_by_name.name, args->args.exists.exists) < 0) - HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to specific link info") + HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to specific link info"); break; } @@ -351,7 +351,7 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ /* Get the location */ if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location"); /* Visit or iterate over the links */ if (loc_params->type == H5VL_OBJECT_BY_SELF) { @@ -359,13 +359,13 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ /* H5Lvisit */ if ((ret_value = H5G_visit(&loc, ".", iter_args->idx_type, iter_args->order, iter_args->op, iter_args->op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); } /* end if */ else { /* H5Literate */ if ((ret_value = H5L_iterate(&loc, ".", iter_args->idx_type, iter_args->order, iter_args->idx_p, iter_args->op, iter_args->op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "error iterating over links"); } /* end else */ } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { @@ -374,18 +374,18 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ if ((ret_value = H5G_visit(&loc, loc_params->loc_data.loc_by_name.name, iter_args->idx_type, iter_args->order, iter_args->op, iter_args->op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed"); } /* end if */ else { /* H5Literate_by_name */ if ((ret_value = H5L_iterate(&loc, loc_params->loc_data.loc_by_name.name, iter_args->idx_type, iter_args->order, iter_args->idx_p, iter_args->op, iter_args->op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "error iterating over links"); } /* end else */ } /* end else-if */ else - HGOTO_ERROR(H5E_LINK, H5E_UNSUPPORTED, FAIL, "unknown link iterate params") + HGOTO_ERROR(H5E_LINK, H5E_UNSUPPORTED, FAIL, "unknown link iterate params"); break; } @@ -394,26 +394,26 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_ H5G_loc_t loc; if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Unlink */ if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Ldelete */ if (H5L__delete(&loc, loc_params->loc_data.loc_by_name.name) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Ldelete_by_idx */ if (H5L__delete_by_idx( &loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link"); } /* end else-if */ else - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation"); } /* end switch */ done: diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c index 01311c9..82d267f 100644 --- a/src/H5VLnative_object.c +++ b/src/H5VLnative_object.c @@ -80,13 +80,13 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object"); switch (loc_params->type) { case H5VL_OBJECT_BY_NAME: { /* Open the object */ if (NULL == (ret_value = H5O_open_name(&loc, loc_params->loc_data.loc_by_name.name, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by name") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by name"); break; } @@ -96,7 +96,7 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by index") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by index"); break; } @@ -107,17 +107,17 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ /* Decode token */ if (H5VL_native_token_to_addr(loc.oloc->file, H5I_FILE, token, &addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, NULL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Open the object */ if (NULL == (ret_value = H5O__open_by_addr(&loc, addr, opened_type))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by address") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by address"); break; } case H5VL_OBJECT_BY_SELF: default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown open parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, NULL, "unknown open parameters"); } /* end switch */ done: @@ -147,13 +147,13 @@ H5VL__native_object_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, co /* get location for objects */ if (H5G_loc_real(src_obj, loc_params1->obj_type, &src_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (H5G_loc_real(dst_obj, loc_params2->obj_type, &dst_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Copy the object */ if ((ret_value = H5O__copy(&src_loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -178,7 +178,7 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); switch (args->op_type) { @@ -194,7 +194,7 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj loc.oloc->file->id_exists = TRUE; } else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_file parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_file parameters"); break; } @@ -205,7 +205,7 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj /* Retrieve object's name */ if (H5G_get_name(&loc, args->args.get_name.buf, args->args.get_name.buf_size, args->args.get_name.name_len, NULL) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve object name") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't retrieve object name"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_TOKEN) { H5O_loc_t obj_oloc; /* Object location */ @@ -218,15 +218,15 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj /* Decode token */ if (H5VL_native_token_to_addr(obj_oloc.file, H5I_FILE, token, &obj_oloc.addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Retrieve object's name */ if (H5G_get_name_by_addr(loc.oloc->file, &obj_oloc, args->args.get_name.buf, args->args.get_name.buf_size, args->args.get_name.name_len) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine object name") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine object name"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_name parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_name parameters"); break; } @@ -245,15 +245,15 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj /* Decode token */ if (H5VL_native_token_to_addr(obj_oloc.file, H5I_FILE, token, &obj_oloc.addr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, - "can't deserialize object token into address") + "can't deserialize object token into address"); /* Get the # of links for object, and its type */ /* (To check to make certain that this object hasn't been deleted) */ if (H5O_get_rc_and_type(&obj_oloc, &rc, args->args.get_type.obj_type) < 0 || 0 == rc) - HGOTO_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, FAIL, "dereferencing deleted object") + HGOTO_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, FAIL, "dereferencing deleted object"); } else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_type parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get_type parameters"); break; } @@ -262,12 +262,12 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj case H5VL_OBJECT_GET_INFO: { if (loc_params->type == H5VL_OBJECT_BY_SELF) { if (H5G_loc_info(&loc, ".", args->args.get_info.oinfo, args->args.get_info.fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { if (H5G_loc_info(&loc, loc_params->loc_data.loc_by_name.name, args->args.get_info.oinfo, args->args.get_info.fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end else-if */ else if (loc_params->type == H5VL_OBJECT_BY_IDX) { H5G_loc_t obj_loc; /* Location used to open group */ @@ -284,26 +284,26 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found"); /* Retrieve the object's information */ if (H5O_get_info(obj_loc.oloc, args->args.get_info.oinfo, args->args.get_info.fields) < 0) { H5G_loc_free(&obj_loc); - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info"); } /* end if */ /* Release the object location */ if (H5G_loc_free(&obj_loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location"); } /* end else-if */ else - HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, FAIL, "unknown get info parameters") + HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, FAIL, "unknown get info parameters"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from object") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from object"); } /* end switch */ done: @@ -330,13 +330,13 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); switch (args->op_type) { /* H5Oincr_refcount / H5Odecr_refcount */ case H5VL_OBJECT_CHANGE_REF_COUNT: { if (H5O_link(loc.oloc, args->args.change_rc.delta) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed"); break; } @@ -347,10 +347,10 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, /* Check if the object exists */ if (H5G_loc_exists(&loc, loc_params->loc_data.loc_by_name.name, args->args.exists.exists) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", - loc_params->loc_data.loc_by_name.name) + loc_params->loc_data.loc_by_name.name); } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown object exists parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown object exists parameters"); break; } @@ -369,20 +369,20 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, /* Find the object */ if (H5G_loc_find(&loc, loc_params->loc_data.loc_by_name.name, &obj_loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); /* Encode token */ if (H5VL_native_addr_to_token(loc.oloc->file, H5I_FILE, obj_loc.oloc->addr, args->args.lookup.token_ptr) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, - "can't serialize address into object token") + "can't serialize address into object token"); /* Release the object location */ if (H5G_loc_free(&obj_loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location"); } /* end if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown object exists parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown object exists parameters"); break; } @@ -394,13 +394,13 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, if (loc_params->type == H5VL_OBJECT_BY_SELF) { if ((ret_value = H5O__visit(&loc, ".", visit_args->idx_type, visit_args->order, visit_args->op, visit_args->op_data, visit_args->fields)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { if ((ret_value = H5O__visit(&loc, loc_params->loc_data.loc_by_name.name, visit_args->idx_type, visit_args->order, visit_args->op, visit_args->op_data, visit_args->fields)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed") + HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed"); } /* end else-if */ else HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown object visit params"); @@ -411,7 +411,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, case H5VL_OBJECT_FLUSH: { /* Flush the object's metadata */ if (H5O_flush(loc.oloc, args->args.flush.obj_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object"); break; } @@ -419,13 +419,13 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, case H5VL_OBJECT_REFRESH: { /* Refresh the metadata */ if (H5O_refresh_metadata(loc.oloc, args->args.refresh.obj_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't recognize this operation type") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't recognize this operation type"); } /* end switch */ done: @@ -452,7 +452,7 @@ H5VL__native_object_optional(void *obj, const H5VL_loc_params_t *loc_params, H5V FUNC_ENTER_PACKAGE if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); switch (args->op_type) { /* H5Oget_comment / H5Oget_comment_by_name */ @@ -462,15 +462,15 @@ H5VL__native_object_optional(void *obj, const H5VL_loc_params_t *loc_params, H5V /* Retrieve the object's comment */ if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Oget_comment */ if (H5G_loc_get_comment(&loc, ".", gc_args->buf, gc_args->buf_size, gc_args->comment_len) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Oget_comment_by_name */ if (H5G_loc_get_comment(&loc, loc_params->loc_data.loc_by_name.name, gc_args->buf, gc_args->buf_size, gc_args->comment_len) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown set_coment parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown set_coment parameters"); break; } @@ -479,15 +479,15 @@ H5VL__native_object_optional(void *obj, const H5VL_loc_params_t *loc_params, H5V case H5VL_NATIVE_OBJECT_SET_COMMENT: { if (loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Oset_comment */ if (H5G_loc_set_comment(&loc, ".", opt_args->set_comment.comment) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Oset_comment_by_name */ if (H5G_loc_set_comment(&loc, loc_params->loc_data.loc_by_name.name, opt_args->set_comment.comment) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown set_coment parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown set_coment parameters"); break; } @@ -523,12 +523,12 @@ H5VL__native_object_optional(void *obj, const H5VL_loc_params_t *loc_params, H5V /* Use the original H5Oget_info code to get the data */ if (loc_params->type == H5VL_OBJECT_BY_SELF) { if (H5G_loc_native_info(&loc, ".", gni_args->ninfo, gni_args->fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end if */ else if (loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Oget_info_by_name */ if (H5G_loc_native_info(&loc, loc_params->loc_data.loc_by_name.name, gni_args->ninfo, gni_args->fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found"); } /* end else-if */ else if (loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Oget_info_by_idx */ H5G_loc_t obj_loc; /* Location used to open group */ @@ -545,19 +545,19 @@ H5VL__native_object_optional(void *obj, const H5VL_loc_params_t *loc_params, H5V loc_params->loc_data.loc_by_idx.idx_type, loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, &obj_loc /*out*/) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found") + HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found"); if (H5O_get_native_info(obj_loc.oloc, gni_args->ninfo, gni_args->fields) < 0) { H5G_loc_free(&obj_loc); - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info"); } /* end if */ /* Release the object location */ if (H5G_loc_free(&obj_loc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location") + HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location"); } /* end else-if */ else - HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, FAIL, "unknown get info parameters") + HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, FAIL, "unknown get info parameters"); break; } diff --git a/src/H5VLnative_token.c b/src/H5VLnative_token.c index 78d0350..e03299e 100644 --- a/src/H5VLnative_token.c +++ b/src/H5VLnative_token.c @@ -102,7 +102,7 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok 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") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert object token to address"); if (addr == 0) addr_ndigits = 1; @@ -110,7 +110,7 @@ H5VL__native_token_to_str(void *obj, H5I_type_t obj_type, const H5O_token_t *tok addr_ndigits = (size_t)(HDfloor(HDlog10((double)addr)) + 1); if (NULL == (*token_str = H5MM_malloc(addr_ndigits + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer for token string") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate buffer for token string"); HDsnprintf(*token_str, addr_ndigits + 1, "%" PRIuHADDR, addr); @@ -142,7 +142,7 @@ H5VL__native_str_to_token(void *obj, H5I_type_t obj_type, const char *token_str, HDsscanf(token_str, "%" PRIuHADDR, &addr); if (H5VL_native_addr_to_token(obj, obj_type, addr, token) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert address to object token") + HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't convert address to object token"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VLtest.c b/src/H5VLtest.c index 275a646..17368b7 100644 --- a/src/H5VLtest.c +++ b/src/H5VLtest.c @@ -84,7 +84,7 @@ H5VL__reparse_def_vol_conn_variable_test(void) /* Re-check for the HDF5_VOL_CONNECTOR environment variable */ if (H5VL__set_def_conn() < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize default VOL connector") + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "unable to initialize default VOL connector"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5VM.c b/src/H5VM.c index af5b311..abfde22 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -944,7 +944,7 @@ H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t * /* Compute the coordinates from the offset */ if (H5VM_array_calc_pre(offset, n, idx, coords) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute coordinates") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute coordinates"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1176,7 +1176,7 @@ src_smaller: do { /* Make operator callback */ if ((*op)(tmp_dst_off, tmp_src_off, tmp_src_len, op_data) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation"); /* Accumulate number of bytes copied */ acc_len += tmp_src_len; @@ -1218,7 +1218,7 @@ dst_smaller: do { /* Make operator callback */ if ((*op)(tmp_dst_off, tmp_src_off, tmp_dst_len, op_data) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation"); /* Accumulate number of bytes copied */ acc_len += tmp_dst_len; @@ -1260,7 +1260,7 @@ equal: do { /* Make operator callback */ if ((*op)(tmp_dst_off, tmp_src_off, tmp_dst_len, op_data) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTOPERATE, FAIL, "can't perform operation"); /* Accumulate number of bytes copied */ acc_len += tmp_dst_len; diff --git a/src/H5WB.c b/src/H5WB.c index a9d98de..7be258d 100644 --- a/src/H5WB.c +++ b/src/H5WB.c @@ -102,7 +102,7 @@ H5WB_wrap(void *buf, size_t buf_size) /* Create wrapped buffer info */ if (NULL == (wb = H5FL_MALLOC(H5WB_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for wrapped buffer info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for wrapped buffer info"); /* Wrap buffer given */ wb->wrapped_buf = buf; @@ -165,7 +165,7 @@ H5WB_actual(H5WB_t *wb, size_t need) if (need > wb->wrapped_size) { /* Need to allocate new buffer */ if (NULL == (wb->actual_buf = H5FL_BLK_MALLOC(extra_buf, need))) - HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed"); /* Remember size of buffer allocated */ wb->alloc_size = need; @@ -213,7 +213,7 @@ H5WB_actual_clear(H5WB_t *wb, size_t need) /* 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") + HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear the buffer */ memset(ret_value, 0, need); diff --git a/src/H5Z.c b/src/H5Z.c index 2f6b2d8..111d71a 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -90,28 +90,28 @@ H5Z_init(void) /* Internal filters */ if (H5Z_register(H5Z_SHUFFLE) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter"); if (H5Z_register(H5Z_FLETCHER32) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter"); if (H5Z_register(H5Z_NBIT) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter"); if (H5Z_register(H5Z_SCALEOFFSET) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter"); /* External filters */ #ifdef H5_HAVE_FILTER_DEFLATE if (H5Z_register(H5Z_DEFLATE) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter"); #endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP { int encoder_enabled = SZ_encoder_enabled(); if (encoder_enabled < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "check for szip encoder failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "check for szip encoder failed"); H5Z_SZIP->encoder_present = (unsigned)encoder_enabled; if (H5Z_register(H5Z_SZIP) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter"); } #endif /* H5_HAVE_FILTER_SZIP */ @@ -225,7 +225,7 @@ H5Zregister(const void *cls) /* Check args */ if (cls_real == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class"); /* Check H5Z_class_t version number; this is where a function to convert * from an outdated version should be called. @@ -262,15 +262,15 @@ H5Zregister(const void *cls) } /* end if */ if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number"); if (cls_real->id < H5Z_FILTER_RESERVED) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters"); if (cls_real->filter == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified"); /* Do it */ if (H5Z_register(cls_real) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter"); done: FUNC_LEAVE_API(ret_value) @@ -311,11 +311,11 @@ H5Z_register(const H5Z_class2_t *cls) H5Z_stats_t *stat_table = (H5Z_stats_t *)H5MM_realloc(H5Z_stat_table_g, n * sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ if (!table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table"); H5Z_table_g = table; #ifdef H5Z_DEBUG if (!stat_table) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table"); H5Z_stat_table_g = stat_table; #endif /* H5Z_DEBUG */ H5Z_table_alloc_g = n; @@ -357,13 +357,13 @@ H5Zunregister(H5Z_filter_t id) /* Check args */ if (id < 0 || id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number"); if (id < H5Z_FILTER_RESERVED) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters"); /* Do it */ if (H5Z__unregister(id) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter"); done: FUNC_LEAVE_API(ret_value) @@ -397,7 +397,7 @@ H5Z__unregister(H5Z_filter_t filter_id) /* Fail if filter not found */ if (filter_index >= H5Z_table_used_g) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered"); /* Initialize the structure object for iteration */ object.filter_id = filter_id; @@ -408,23 +408,23 @@ H5Z__unregister(H5Z_filter_t filter_id) /* Iterate through all opened datasets, returns a failure if any of them uses the filter */ if (H5I_iterate(H5I_DATASET, H5Z__check_unregister_dset_cb, &object, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed"); if (object.found) HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, - "can't unregister filter because a dataset is still using it") + "can't unregister filter because a dataset is still using it"); /* Iterate through all opened groups, returns a failure if any of them uses the filter */ if (H5I_iterate(H5I_GROUP, H5Z__check_unregister_group_cb, &object, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed"); if (object.found) HGOTO_ERROR(H5E_PLINE, H5E_CANTRELEASE, FAIL, - "can't unregister filter because a group is still using it") + "can't unregister filter because a group is still using it"); /* Iterate through all opened files and flush them */ if (H5I_iterate(H5I_FILE, H5Z__flush_file_cb, &object, FALSE) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed") + HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed"); /* Remove filter from table */ /* Don't worry about shrinking table size (for now) */ @@ -461,11 +461,11 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id) /* Get the plist structure of object creation */ if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE))) - HGOTO_ERROR(H5E_PLINE, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_PLINE, H5E_BADID, FAIL, "can't find object for ID"); /* Check if the object creation property list uses the filter */ if ((ret_value = H5P_filter_in_pline(plist, filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -499,11 +499,11 @@ H5Z__check_unregister_group_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void /* Get the group creation property */ if ((ocpl_id = H5G_get_create_plist((H5G_t *)obj_ptr)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get group creation property list") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get group creation property list"); /* Check if the filter is in the group creation property list */ if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline"); /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and * let H5Z__unregister return failure. @@ -549,11 +549,11 @@ H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void * /* Get the dataset creation property */ if ((ocpl_id = H5D_get_create_plist((H5D_t *)obj_ptr)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get dataset creation property list"); /* Check if the filter is in the dataset creation property list */ if ((filter_in_pline = H5Z__check_unregister(ocpl_id, object->filter_id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't check filter in pipeline"); /* H5I_iterate expects TRUE to stop the loop over objects. Stop the loop and * let H5Z__unregister return failure. @@ -612,7 +612,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA /* Retrieve the file communicator */ if (MPI_COMM_NULL == (mpi_comm = H5F_mpi_get_comm(f))) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get MPI communicator") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get MPI communicator"); /* Issue the barrier */ if (mpi_comm != MPI_COMM_NULL) @@ -626,7 +626,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void H5_ATTR_PARA /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFLUSH, FAIL, "unable to flush file hierarchy"); } /* end if */ done: @@ -651,10 +651,10 @@ H5Zfilter_avail(H5Z_filter_t id) /* Check args */ if (id < 0 || id > H5Z_FILTER_MAX) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number"); if ((ret_value = H5Z_filter_avail(id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter"); done: FUNC_LEAVE_API(ret_value) @@ -686,7 +686,7 @@ H5Z_filter_avail(H5Z_filter_t id) key.id = (int)id; if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, &key))) { if (H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter"); HGOTO_DONE(TRUE); } /* end if */ @@ -727,7 +727,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi if (pline->filter[u].flags & H5Z_FLAG_OPTIONAL) H5E_clear_stack(NULL); else - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located"); } /* end if */ else { /* Make correct callback */ @@ -745,12 +745,12 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi /* Indicate error during filter callback */ if (status < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback"); /* Indicate filter can't apply to this combination of parameters. * If the filter is NOT optional, returns failure. */ if (status == FALSE && !(pline->filter[u].flags & H5Z_FLAG_OPTIONAL)) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate"); } /* end if */ break; @@ -760,7 +760,7 @@ H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id, hi /* Make callback to filter's "set local" function */ if ((fclass->set_local)(dcpl_id, type_id, space_id) < 0) /* Indicate error during filter callback */ - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback") + HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback"); } /* end if */ break; @@ -806,15 +806,15 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ /* Get memory for the layout */ if (NULL == (dcpl_layout = (H5O_layout_t *)H5MM_calloc(sizeof(H5O_layout_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate dcpl layout buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate dcpl layout buffer"); /* Get dataset creation property list object */ if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list"); /* Peek at the layout information */ if (H5P_peek(dc_plist, H5D_CRT_LAYOUT_NAME, dcpl_layout) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout"); /* Check if the dataset is chunked */ if (H5D_CHUNKED == dcpl_layout->type) { @@ -822,7 +822,7 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ /* Get I/O pipeline information */ if (H5P_peek(dc_plist, H5O_CRT_PIPELINE_NAME, &dcpl_pline) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter") + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter"); /* Check if the chunks have filters */ if (dcpl_pline.nused > 0) { @@ -834,17 +834,17 @@ H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_typ for (u = 0; u < dcpl_layout->u.chunk.ndims; u++) chunk_dims[u] = dcpl_layout->u.chunk.dim[u]; if (NULL == (space = H5S_create_simple(dcpl_layout->u.chunk.ndims, chunk_dims, NULL))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); /* Get ID for dataspace to pass to filter routines */ if ((space_id = H5I_register(H5I_DATASPACE, space, FALSE)) < 0) { (void)H5S_close(space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID") + HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); } /* Make the callbacks */ if (H5Z__prelude_callback(&dcpl_pline, dcpl_id, type_id, space_id, prelude_type) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter"); } } } @@ -883,7 +883,7 @@ H5Z_can_apply(hid_t dcpl_id, hid_t type_id) /* Make "can apply" callbacks for filters in pipeline */ if (H5Z__prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -913,7 +913,7 @@ H5Z_set_local(hid_t dcpl_id, hid_t type_id) /* Make "set local" callbacks for filters in pipeline */ if (H5Z__prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") + HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -941,7 +941,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline) /* 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) - HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -973,7 +973,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline) /* 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) - HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set") + HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1010,11 +1010,11 @@ H5Z_ignore_filters(hid_t dcpl_id, const H5T_t *type, const H5S_t *space) FUNC_ENTER_NOAPI(FAIL) if (NULL == (dc_plist = (H5P_genplist_t *)H5I_object(dcpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list"); /* Get pipeline information */ if (H5P_peek(dc_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't retrieve pipeline filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't retrieve pipeline filter"); /* Get datatype and dataspace classes for quick access */ space_class = H5S_GET_EXTENT_TYPE(space); @@ -1031,7 +1031,7 @@ H5Z_ignore_filters(hid_t dcpl_id, const H5T_t *type, const H5S_t *space) if (pline.nused > 0) { for (ii = 0; ii < pline.nused; ii++) { if (!(pline.filter[ii].flags & H5Z_FLAG_OPTIONAL)) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "not suitable for filters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "not suitable for filters"); } /* All filters are optional, we can ignore them */ @@ -1073,7 +1073,7 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t /* Check if the filter was not already in the pipeline */ if (idx > pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline"); /* Change parameters for filter */ pline->filter[idx].flags = flags; @@ -1091,7 +1091,8 @@ H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t if (cd_nelmts > H5Z_COMMON_CD_VALUES) { pline->filter[idx].cd_values = (unsigned *)H5MM_malloc(cd_nelmts * sizeof(unsigned)); if (NULL == pline->filter[idx].cd_values) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter parameters") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed for filter parameters"); } /* end if */ else pline->filter[idx].cd_values = pline->filter[idx]._cd_values; @@ -1135,7 +1136,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_ne * decide to relax this restriction in the future. */ if (pline->nused >= H5Z_MAX_NFILTERS) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline"); /* Check for freshly allocated filter pipeline */ if (pline->version == 0) @@ -1160,7 +1161,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_ne x.nalloc = MAX(H5Z_MAX_NFILTERS, 2 * pline->nalloc); x.filter = (H5Z_filter_info_t *)H5MM_realloc(pline->filter, x.nalloc * sizeof(x.filter[0])); if (NULL == x.filter) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline"); /* Fix pointers in previous filters that need to point to their own * internal data. @@ -1187,7 +1188,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags, size_t cd_ne if (cd_nelmts > H5Z_COMMON_CD_VALUES) { pline->filter[idx].cd_values = (unsigned *)H5MM_malloc(cd_nelmts * sizeof(unsigned)); if (NULL == pline->filter[idx].cd_values) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter"); } /* end if */ else pline->filter[idx].cd_values = pline->filter[idx]._cd_values; @@ -1251,7 +1252,7 @@ H5Z_find(H5Z_filter_t id) /* Get the index in the global table */ if ((idx = H5Z__find_idx(id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter %d is not registered", id) + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter %d is not registered", id); /* Set return value */ ret_value = H5Z_table_g + idx; @@ -1336,7 +1337,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i if (NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, &key))) { /* Register the filter we loaded */ if (H5Z_register(filter_info) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter"); /* Search in the table of registered filters again to find the dynamic filter just loaded * and registered */ @@ -1352,10 +1353,10 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i * the filter */ if (pline->filter[idx].name) HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", - pline->filter[idx].name) + pline->filter[idx].name); else HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, - "required filter (name unavailable) is not registered") + "required filter (name unavailable) is not registered"); } } /* end if */ @@ -1387,7 +1388,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i if ((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data))) || !cb_struct.func) - HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read") + HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read"); *nbytes = *buf_size; failed |= (unsigned)1 << idx; @@ -1406,7 +1407,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i if ((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0) { /* Check if filter is optional -- If it isn't, then error */ if ((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered") + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered"); failed |= (unsigned)1 << idx; H5E_clear_stack(NULL); continue; /* filter excluded */ @@ -1439,7 +1440,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, unsigned *filter_mask /*i if ((cb_struct.func && (H5Z_CB_FAIL == cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data))) || !cb_struct.func) - HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure") + HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure"); *nbytes = *buf_size; } @@ -1484,7 +1485,7 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter) /* Check if the filter was not already in the pipeline */ if (idx >= pline->nused) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline"); /* Set return value */ ret_value = &pline->filter[idx]; @@ -1592,7 +1593,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter) /* Delete all filters */ if (H5Z_FILTER_ALL == filter) { if (H5O_msg_reset(H5O_PLINE_ID, pline) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFREE, FAIL, "can't release pipeline info") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFREE, FAIL, "can't release pipeline info"); } /* Delete filter */ else { @@ -1608,7 +1609,7 @@ H5Z_delete(H5O_pline_t *pline, H5Z_filter_t filter) /* filter was not found in the pipeline */ if (!found) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline"); /* Free information for deleted filter */ if (pline->filter[idx].name && pline->filter[idx].name != pline->filter[idx]._name) @@ -1663,7 +1664,7 @@ H5Zget_filter_info(H5Z_filter_t filter, unsigned *filter_config_flags /*out*/) /* Get the filter info */ if (H5Z_get_filter_info(filter, filter_config_flags) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "Filter info not retrieved") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "Filter info not retrieved"); done: FUNC_LEAVE_API(ret_value) @@ -1689,7 +1690,7 @@ H5Z_get_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags) /* Look up the filter class info */ if (NULL == (fclass = H5Z_find(filter))) - HGOTO_ERROR(H5E_PLINE, H5E_BADVALUE, FAIL, "Filter not defined") + HGOTO_ERROR(H5E_PLINE, H5E_BADVALUE, FAIL, "Filter not defined"); /* Set the filter config flags for the application */ if (filter_config_flags != NULL) { diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c index dccdf2c..b7a372b 100644 --- a/src/H5Zdeflate.c +++ b/src/H5Zdeflate.c @@ -72,7 +72,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Check arguments */ if (cd_nelmts != 1 || cd_values[0] > 9) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid deflate aggression level") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid deflate aggression level"); if (flags & H5Z_FLAG_REVERSE) { /* Input; uncompress */ @@ -81,7 +81,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Allocate space for the compressed buffer */ if (NULL == (outbuf = H5MM_malloc(nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for deflate uncompression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for deflate uncompression"); /* Set the uncompression parameters */ memset(&z_strm, 0, sizeof(z_strm)); @@ -92,7 +92,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Initialize the uncompression routines */ if (Z_OK != inflateInit(&z_strm)) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "inflateInit() failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "inflateInit() failed"); /* Loop to uncompress the buffer */ do { @@ -106,7 +106,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Check for error */ if (Z_OK != status) { (void)inflateEnd(&z_strm); - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "inflate() failed") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "inflate() failed"); } else { /* If we're not done and just ran out of buffer space, get more */ @@ -118,7 +118,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] if (NULL == (new_outbuf = H5MM_realloc(outbuf, nalloc))) { (void)inflateEnd(&z_strm); HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, - "memory allocation failed for deflate uncompression") + "memory allocation failed for deflate uncompression"); } /* end if */ outbuf = new_outbuf; @@ -158,7 +158,7 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Allocate output (compressed) buffer */ if (NULL == (outbuf = H5MM_malloc(z_dst_nbytes))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate deflate destination buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate deflate destination buffer"); z_dst = (Bytef *)outbuf; /* Perform compression from the source to the destination buffer */ @@ -166,11 +166,11 @@ H5Z__filter_deflate(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Check for various zlib errors */ if (Z_BUF_ERROR == status) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow"); else if (Z_MEM_ERROR == status) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "deflate memory error") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "deflate memory error"); else if (Z_OK != status) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "other deflate error") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "other deflate error"); /* Successfully uncompressed the buffer */ else { /* Free the input buffer */ diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c index 8bd5f04..e5b98be 100644 --- a/src/H5Zfletcher32.c +++ b/src/H5Zfletcher32.c @@ -100,7 +100,7 @@ H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, /* Verify computed checksum matches stored checksum */ if (stored_fletcher != fletcher && stored_fletcher != reversed_fletcher) - HGOTO_ERROR(H5E_STORAGE, H5E_READERROR, 0, "data error detected by Fletcher32 checksum") + HGOTO_ERROR(H5E_STORAGE, H5E_READERROR, 0, "data error detected by Fletcher32 checksum"); } /* Set return values */ @@ -115,7 +115,7 @@ H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, if (NULL == (outbuf = H5MM_malloc(nbytes + FLETCHER_LEN))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, - "unable to allocate Fletcher32 checksum destination buffer") + "unable to allocate Fletcher32 checksum destination buffer"); dst = (unsigned char *)outbuf; diff --git a/src/H5Znbit.c b/src/H5Znbit.c index ebaac36..80878f6 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -127,15 +127,15 @@ H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get datatype's class, for checking the "datatype class" */ if (H5T_get_class(type, TRUE) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class"); /* Get datatype's size, for checking the "datatype size" */ if (H5T_get_size(type) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -217,11 +217,11 @@ H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms) /* Get array datatype's base datatype */ if (NULL == (dtype_base = H5T_get_super(type))) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype"); /* Get base datatype's class */ if ((dtype_base_class = H5T_get_class(dtype_base, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class"); /* Calculate number of the rest parameters according to base datatype's class */ switch (dtype_base_class) { @@ -232,12 +232,12 @@ H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms) case H5T_ARRAY: if (H5Z__calc_parms_array(dtype_base, cd_values_actual_nparms) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__calc_parms_compound(dtype_base, cd_values_actual_nparms) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_TIME: @@ -255,7 +255,7 @@ H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms) case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype"); break; } /* end switch */ @@ -297,7 +297,7 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms) /* Get number of members */ if ((nmembers = H5T_get_nmembers(type)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype number of members") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype number of members"); /* Store number of members */ *cd_values_actual_nparms += 1; @@ -308,11 +308,11 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms) /* Get member datatype */ if (NULL == (dtype_member = H5T_get_member_type(type, u))) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype"); /* Get member datatype's class */ if ((dtype_member_class = H5T_get_class(dtype_member, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class"); /* Store member offset */ *cd_values_actual_nparms += 1; @@ -326,12 +326,12 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms) case H5T_ARRAY: if (H5Z__calc_parms_array(dtype_member, cd_values_actual_nparms) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__calc_parms_compound(dtype_member, cd_values_actual_nparms) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_TIME: @@ -349,13 +349,13 @@ H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms) case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype"); break; } /* end switch */ /* Close member datatype */ if (H5T_close_real(dtype_member) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close member datatype") + HGOTO_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close member datatype"); dtype_member = NULL; } /* end for */ @@ -393,7 +393,7 @@ H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned c /* Get datatype's size */ if ((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Set "local" parameter for datatype size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -432,7 +432,7 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_ /* Get datatype's size */ if ((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Set "local" parameter for datatype size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -440,7 +440,7 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_ /* Get datatype's endianness order */ if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); /* Set "local" parameter for datatype endianness */ switch (dtype_order) { @@ -457,21 +457,21 @@ H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index, unsigned cd_ case H5T_ORDER_ERROR: case H5T_ORDER_NONE: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); } /* end switch */ /* Get datatype's precision */ if ((dtype_precision = H5T_get_precision(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype precision") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype precision"); /* Get datatype's offset */ if ((sdtype_offset = H5T_get_offset(type)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype offset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype offset"); dtype_offset = (unsigned)sdtype_offset; /* Check values of precision and offset */ if (dtype_precision > dtype_size * 8 || (dtype_precision + dtype_offset) > dtype_size * 8) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset"); /* Set "local" parameter for datatype precision */ H5_CHECK_OVERFLOW(dtype_precision, size_t, unsigned); @@ -519,7 +519,7 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v /* Get array datatype's size */ if ((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Set "local" parameter for array datatype's size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -527,42 +527,42 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v /* Get array datatype's base datatype */ if (NULL == (dtype_base = H5T_get_super(type))) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype"); /* Get base datatype's class */ if ((dtype_base_class = H5T_get_class(dtype_base, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad base datatype class"); /* Call appropriate function according to base datatype's class */ switch (dtype_base_class) { case H5T_INTEGER: case H5T_FLOAT: if (H5Z__set_parms_atomic(dtype_base, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_ARRAY: if (H5Z__set_parms_array(dtype_base, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__set_parms_compound(dtype_base, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_VLEN: /* Check if base datatype is a variable-length string */ if ((is_vlstring = H5T_is_variable_str(dtype_base)) < 0) HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, - "cannot determine if datatype is a variable-length string") + "cannot determine if datatype is a variable-length string"); /* base datatype of VL or VL-string is not supported */ if (dtype_base_class == H5T_VLEN || is_vlstring) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype not supported by nbit") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype not supported by nbit"); if (H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_TIME: @@ -572,14 +572,14 @@ H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index, unsigned cd_v case H5T_REFERENCE: case H5T_ENUM: if (H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_NO_CLASS: case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype"); break; } /* end switch */ @@ -624,7 +624,7 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c /* Get datatype's size */ if ((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Set "local" parameter for compound datatype size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -632,7 +632,7 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c /* Get number of members */ if ((snmembers = H5T_get_nmembers(type)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype number of members") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype number of members"); nmembers = (unsigned)snmembers; /* Set "local" parameter for number of members */ @@ -642,11 +642,11 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c for (u = 0; u < nmembers; u++) { /* Get member datatype */ if (NULL == (dtype_member = H5T_get_member_type(type, u))) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype"); /* Get member datatype's class */ if ((dtype_member_class = H5T_get_class(dtype_member, TRUE)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad member datatype class"); /* Get member offset, success if H5T_get_class() success */ dtype_member_offset = H5T_get_member_offset(type, u); @@ -660,24 +660,24 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c case H5T_INTEGER: case H5T_FLOAT: if (H5Z__set_parms_atomic(dtype_member, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_ARRAY: if (H5Z__set_parms_array(dtype_member, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__set_parms_compound(dtype_member, cd_values_index, cd_values, need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_VLEN: /* Check if datatype is a variable-length string */ if ((is_vlstring = H5T_is_variable_str(dtype_member)) < 0) HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, - "cannot determine if datatype is a variable-length string") + "cannot determine if datatype is a variable-length string"); /* Because for some no-op datatype (VL datatype and VL string datatype), its * size can not be retrieved correctly by using function call H5T_get_size, @@ -710,20 +710,20 @@ H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index, unsigned c case H5T_ENUM: /* other datatype that nbit does no compression */ if (H5Z__set_parms_nooptype(dtype_member, cd_values_index, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_NO_CLASS: case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit was passed bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit was passed bad datatype"); break; } /* end switch */ /* Close member datatype */ if (H5T_close_real(dtype_member) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close member datatype") + HGOTO_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close member datatype"); dtype_member = NULL; } /* end for */ @@ -765,11 +765,11 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get datatype's class */ if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class"); /* Calculate how many parameters will fill the cd_values array * First three parameters reserved for: @@ -786,12 +786,12 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_ARRAY: if (H5Z__calc_parms_array(type, &cd_values_actual_nparms) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__calc_parms_compound(type, &cd_values_actual_nparms) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype"); break; case H5T_TIME: @@ -808,34 +808,34 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype"); break; } /* end switch */ /* Check if the number of parameters exceed what cd_values[] can store */ if (cd_values_actual_nparms > H5Z_NBIT_MAX_NPARMS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype needs too many nbit parameters") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype needs too many nbit parameters"); /* Allocate memory space for cd_values[] */ if (NULL == (cd_values = (unsigned *)H5MM_malloc(cd_values_actual_nparms * sizeof(unsigned)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for cd_values[]") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for cd_values[]"); /* Get the plist structure */ if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get the filter's current parameters */ if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_NBIT, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get nbit parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get nbit parameters"); /* Get dataspace */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* 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") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace"); assert(npoints); /* Initialize index for cd_values array starting from the third entry */ @@ -853,17 +853,17 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_INTEGER: case H5T_FLOAT: if (H5Z__set_parms_atomic(type, &cd_values_index, cd_values, &need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_ARRAY: if (H5Z__set_parms_array(type, &cd_values_index, cd_values, &need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_COMPOUND: if (H5Z__set_parms_compound(type, &cd_values_index, cd_values, &need_not_compress) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype"); break; case H5T_TIME: @@ -880,7 +880,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_NCLASSES: default: /* Badness */ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype"); break; } /* end switch */ @@ -894,7 +894,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Modify the filter's parameters for this dataset */ if (H5P_modify_filter(dcpl_plist, H5Z_FILTER_NBIT, flags, cd_values_actual_nparms, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local nbit parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local nbit parameters"); done: if (cd_values) @@ -928,7 +928,7 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s * cd_values[0] stores actual number of parameters in cd_values[] */ if (cd_nelmts != cd_values[0]) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid nbit aggression level") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid nbit aggression level"); /* check if need to do nbit compress or decompress * cd_values[1] stores the flag if true indicating no need to compress @@ -945,11 +945,11 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* allocate memory space for decompressed buffer */ if (NULL == (outbuf = (unsigned char *)H5MM_malloc(size_out))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit decompression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit decompression"); /* decompress the buffer */ if (H5Z__nbit_decompress(outbuf, d_nelmts, (unsigned char *)*buf, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, 0, "can't decompress buffer") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, 0, "can't decompress buffer"); } /* end if */ /* output; compress */ else { @@ -959,7 +959,7 @@ H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* allocate memory space for compressed buffer */ if (NULL == (outbuf = (unsigned char *)H5MM_malloc(size_out))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit compression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit compression"); /* compress the buffer, size_out will be changed */ H5Z__nbit_compress((unsigned char *)*buf, d_nelmts, outbuf, &size_out, cd_values); @@ -1132,7 +1132,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned /* Check values of precision and offset */ if (p.precision > p.size * 8 || (p.precision + p.offset) > p.size * 8) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset"); n = total_size / p.size; for (i = 0; i < n; i++) @@ -1147,7 +1147,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned for (i = 0; i < n; i++) { if (H5Z__nbit_decompress_one_array(data, data_offset + i * (size_t)base_size, buffer, j, buf_len, parms, parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array"); *parms_index = begin_index; } break; @@ -1159,7 +1159,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset, unsigned for (i = 0; i < n; i++) { if (H5Z__nbit_decompress_one_compound(data, data_offset + i * (size_t)base_size, buffer, j, buf_len, parms, parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound"); *parms_index = begin_index; } break; @@ -1198,7 +1198,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig member_size = parms[*parms_index]; used_size += member_size; if (used_size > size) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "compound member offset overflowed compound size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "compound member offset overflowed compound size"); switch (member_class) { case H5Z_NBIT_ATOMIC: p.size = member_size; @@ -1210,7 +1210,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig /* Check values of precision and offset */ if (p.precision > p.size * 8 || (p.precision + p.offset) > p.size * 8) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset"); H5Z__nbit_decompress_one_atomic(data, data_offset + member_offset, buffer, j, buf_len, &p); break; @@ -1218,13 +1218,13 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset, unsig case H5Z_NBIT_ARRAY: if (H5Z__nbit_decompress_one_array(data, data_offset + member_offset, buffer, j, buf_len, parms, parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array"); break; case H5Z_NBIT_COMPOUND: if (H5Z__nbit_decompress_one_compound(data, data_offset + member_offset, buffer, j, buf_len, parms, parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound"); break; case H5Z_NBIT_NOOPTYPE: @@ -1273,7 +1273,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff /* Check values of precision and offset */ if (p.precision > p.size * 8 || (p.precision + p.offset) > p.size * 8) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset"); for (i = 0; i < d_nelmts; i++) H5Z__nbit_decompress_one_atomic(data, i * (size_t)p.size, buffer, &j, &buf_len, &p); @@ -1285,7 +1285,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff for (i = 0; i < d_nelmts; i++) { if (H5Z__nbit_decompress_one_array(data, i * size, buffer, &j, &buf_len, parms, &parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress array"); parms_index = 4; } break; @@ -1296,7 +1296,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff for (i = 0; i < d_nelmts; i++) { if (H5Z__nbit_decompress_one_compound(data, i * size, buffer, &j, &buf_len, parms, &parms_index) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound") + HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "can't decompress compound"); parms_index = 4; } break; diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index e605672..123c767 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -202,7 +202,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ \ /* Get dataset fill value */ \ if (H5P_get_fill_value(dcpl_plist, dt, &fill_val) < 0) \ - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \ + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value"); \ \ if (need_convert) \ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ @@ -217,7 +217,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ \ /* Get dataset fill value */ \ if (H5P_get_fill_value(dcpl_plist, dt, &fill_val) < 0) \ - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \ + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value"); \ \ if (need_convert) \ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ @@ -232,7 +232,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ \ /* Get dataset fill value */ \ if (H5P_get_fill_value(dcpl_plist, dt, &fill_val) < 0) \ - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \ + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value"); \ \ /* Store the fill value as the last entry in cd_values[] */ \ (cd_values)[H5Z_SCALEOFFSET_PARM_FILVAL] = (unsigned)((unsigned char)fill_val); \ @@ -245,7 +245,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ \ /* Get dataset fill value */ \ if (H5P_get_fill_value(dcpl_plist, dt, &fill_val) < 0) \ - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \ + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value"); \ \ if (need_convert) \ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ @@ -327,7 +327,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ if (sizeof(type) <= sizeof(long long)) \ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } while (0) /* Find maximum and minimum values of a buffer with fill value defined for integer type */ @@ -446,7 +446,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ } \ } \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } /* Precompress for unsigned integer type */ @@ -553,7 +553,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ min * pow_fun((type)10, (type)D_val)); \ } \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } /* Modify values of data in precompression if fill value undefined for floating-point type */ @@ -572,7 +572,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ *(long long *)((void *)&buf[i]) = llround_fun(buf[i] * pow_fun((type)10, (type)D_val) - \ min * pow_fun((type)10, (type)D_val)); \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } /* Save the minimum value for floating-point type */ @@ -590,7 +590,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5MM_memcpy(((char *)minval) + (sizeof(long long) - sizeof(type)), &min, sizeof(type)); \ } /* end else */ \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } /* Precompress for floating-point type using variable-minimum-bits method */ @@ -677,7 +677,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5MM_memcpy(&min, ((char *)&minval) + (sizeof(long long) - sizeof(type)), sizeof(type)); \ } /* end else */ \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } while (0) /* Modify values of data in postdecompression if fill value defined for floating-point type */ @@ -704,7 +704,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ : (type)(*(long long *)((void *)&buf[i])) / pow_fun((type)10, (type)D_val) + \ min); \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } while (0) /* Modify values of data in postdecompression if fill value undefined for floating-point type */ @@ -720,7 +720,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ for (i = 0; i < d_nelmts; i++) \ buf[i] = ((type)(*(long long *)((void *)&buf[i])) / pow_fun((type)10, (type)D_val) + min); \ else \ - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \ + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype"); \ } while (0) /* Postdecompress for floating-point type using variable-minimum-bits method */ @@ -763,27 +763,27 @@ H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5 /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get datatype's class, for checking the "datatype class" */ if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class"); /* Get datatype's size, for checking the "datatype size" */ if (H5T_get_size(type) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); if (dtype_class == H5T_INTEGER || dtype_class == H5T_FLOAT) { /* Get datatype's endianness order */ if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order"); /* Range check datatype's endianness order */ if (dtype_order != H5T_ORDER_LE && dtype_order != H5T_ORDER_BE) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "bad datatype endianness order"); } else - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "datatype class not supported by scaleoffset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FALSE, "datatype class not supported by scaleoffset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -823,7 +823,7 @@ H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dt type = t_ulong_long; #endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ else - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype"); } if (dtype_sign == H5Z_SCALEOFFSET_SGN_2) { /* signed integer */ @@ -840,7 +840,7 @@ H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dt type = t_long_long; #endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ else - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype"); } } @@ -850,7 +850,7 @@ H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dt else if (dtype_size == sizeof(double)) type = t_double; else - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, t_bad, "cannot find matched memory datatype"); } /* Set return value */ @@ -940,11 +940,11 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get the plist structure */ if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Initialize the parameters to a known state */ memset(cd_values, 0, sizeof(cd_values)); @@ -952,22 +952,22 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* 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, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get scaleoffset parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get scaleoffset parameters"); /* Get dataspace */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* 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") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace"); /* Set "local" parameter for this dataset's number of elements */ H5_CHECKED_ASSIGN(cd_values[H5Z_SCALEOFFSET_PARM_NELMTS], unsigned, npoints, hssize_t); /* Get datatype's class */ if ((dtype_class = H5T_get_class(type, TRUE)) == H5T_NO_CLASS) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype class"); /* Set "local" parameter for datatype's class */ switch (dtype_class) { @@ -991,12 +991,12 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_ARRAY: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype class not supported by scaleoffset") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype class not supported by scaleoffset"); } /* end switch */ /* Get datatype's size */ if ((dtype_size = H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Set "local" parameter for datatype size */ H5_CHECK_OVERFLOW(dtype_size, size_t, unsigned); @@ -1005,7 +1005,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) if (dtype_class == H5T_INTEGER) { /* Get datatype's sign */ if ((dtype_sign = H5T_get_sign(type)) == H5T_SGN_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype sign") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype sign"); /* Set "local" parameter for integer datatype sign */ switch (dtype_sign) { @@ -1020,13 +1020,13 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_SGN_ERROR: case H5T_NSGN: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad integer sign") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad integer sign"); } /* end switch */ } /* end if */ /* Get datatype's endianness order */ if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); /* Set "local" parameter for datatype endianness */ switch (dtype_order) { @@ -1043,12 +1043,12 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_ORDER_MIXED: case H5T_ORDER_NONE: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); } /* end switch */ /* Check whether fill value is defined for dataset */ if (H5P_fill_value_defined(dcpl_plist, &status) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to determine if fill value is defined") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to determine if fill value is defined"); /* Set local parameter for availability of fill value */ if (status == H5D_FILL_VALUE_UNDEFINED) @@ -1066,17 +1066,17 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id) if ((scale_type = H5Z__scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS], cd_values[H5Z_SCALEOFFSET_PARM_SIZE], cd_values[H5Z_SCALEOFFSET_PARM_SIGN])) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot use C integer datatype for cast") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot use C integer datatype for cast"); /* Get dataset fill value and store in cd_values[] */ if (H5Z__scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "unable to set fill value") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "unable to set fill value"); } /* end else */ /* Modify the filter's parameters for this dataset */ if (H5P_modify_filter(dcpl_plist, H5Z_FILTER_SCALEOFFSET, flags, (size_t)H5Z_SCALEOFFSET_TOTAL_NPARMS, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local scaleoffset parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local scaleoffset parameters"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1119,7 +1119,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* check arguments */ if (cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scaleoffset number of parameters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scaleoffset number of parameters"); /* Check if memory byte order matches dataset datatype byte order */ switch (H5T_native_order_g) { @@ -1138,7 +1138,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu case H5T_ORDER_MIXED: case H5T_ORDER_NONE: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "bad H5T_NATIVE_INT endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "bad H5T_NATIVE_INT endianness order"); } /* end switch */ /* copy filter parameters to local variables */ @@ -1159,12 +1159,12 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ if (dtype_class == H5Z_SCALEOFFSET_CLS_FLOAT) { /* floating-point type */ if (scale_type != H5Z_SO_FLOAT_DSCALE && scale_type != H5Z_SO_FLOAT_ESCALE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scale type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scale type"); } if (dtype_class == H5Z_SCALEOFFSET_CLS_INTEGER) { /* integer type */ if (scale_type != H5Z_SO_INT) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scale type") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid scale type"); /* if scale_factor is less than 0 for integer, library will reset it to 0 * in this case, library will calculate the minimum-bits @@ -1175,14 +1175,14 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* fixed-minimum-bits method is not implemented and is forbidden */ if (scale_type == H5Z_SO_FLOAT_ESCALE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "E-scaling method not supported") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "E-scaling method not supported"); if (scale_type == H5Z_SO_FLOAT_DSCALE) { /* floating-point type, variable-minimum-bits */ D_val = (double)scale_factor; } else { /* integer type, or floating-point type with fixed-minimum-bits method */ if (scale_factor > (int)(cd_values[H5Z_SCALEOFFSET_PARM_SIZE] * 8)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "minimum number of bits exceeds maximum") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "minimum number of bits exceeds maximum"); /* no need to process data */ if (scale_factor == (int)(cd_values[H5Z_SCALEOFFSET_PARM_SIZE] * 8)) { @@ -1234,7 +1234,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* allocate memory space for decompressed buffer */ if (NULL == (outbuf = (unsigned char *)H5MM_malloc(size_out))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, - "memory allocation failed for scaleoffset decompression") + "memory allocation failed for scaleoffset decompression"); /* special case: minbits equal to full precision */ if (minbits == p.size * 8) { @@ -1264,7 +1264,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* before postprocess, get memory type */ if ((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast"); /* postprocess after decompression */ if (dtype_class == H5Z_SCALEOFFSET_CLS_INTEGER) @@ -1274,7 +1274,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu if (scale_type == 0) { /* variable-minimum-bits method */ if (H5Z__scaleoffset_postdecompress_fd(outbuf, d_nelmts, type, filavail, cd_values, minbits, minval, D_val) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "post-decompression failed") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "post-decompression failed"); } /* after postprocess, convert to dataset datatype endianness order if needed */ @@ -1291,7 +1291,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* before preprocess, get memory type */ if ((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast"); /* preprocess before compression */ if (dtype_class == H5Z_SCALEOFFSET_CLS_INTEGER) @@ -1301,7 +1301,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu if (scale_type == 0) { /* variable-minimum-bits method */ if (H5Z__scaleoffset_precompress_fd(*buf, d_nelmts, type, filavail, cd_values, &minbits, &minval, D_val) == FAIL) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed"); } assert(minbits <= p.size * 8); @@ -1314,7 +1314,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu /* allocate memory space for compressed buffer */ if (NULL == (outbuf = (unsigned char *)H5MM_malloc(size_out))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for scaleoffset compression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for scaleoffset compression"); /* store minbits and minval in the front of output compressed buffer * store byte by byte from least significant byte to most significant byte diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index e0f2e08..6db510d 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -65,25 +65,25 @@ H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_ /* Get the plist structure */ if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ if (NULL == (type = (const H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get the filter's current parameters */ if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SHUFFLE, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get shuffle parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get shuffle parameters"); /* Set "local" parameter for this dataset */ if ((cd_values[H5Z_SHUFFLE_PARM_SIZE] = (unsigned)H5T_get_size(type)) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Modify the filter's parameters for this dataset */ if (H5P_modify_filter(dcpl_plist, H5Z_FILTER_SHUFFLE, flags, (size_t)H5Z_SHUFFLE_TOTAL_NPARMS, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local shuffle parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local shuffle parameters"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -124,7 +124,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Check arguments */ if (cd_nelmts != H5Z_SHUFFLE_TOTAL_NPARMS || cd_values[H5Z_SHUFFLE_PARM_SIZE] == 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid shuffle parameters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid shuffle parameters"); /* Get the number of bytes per element from the parameter block */ bytesoftype = cd_values[H5Z_SHUFFLE_PARM_SIZE]; @@ -139,7 +139,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] /* Allocate the destination buffer */ if (NULL == (dest = H5MM_malloc(nbytes))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for shuffle buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for shuffle buffer"); if (flags & H5Z_FLAG_REVERSE) { /* Get the pointer to the source buffer */ diff --git a/src/H5Zszip.c b/src/H5Zszip.c index 673a622..d636afd 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -77,24 +77,24 @@ H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_U /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get datatype's size, for checking the "bits-per-pixel" */ if ((dtype_size = (8 * H5T_get_size(type))) == 0) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size"); /* Range check datatype's size */ if (dtype_size > 32 && dtype_size != 64) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype size") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype size"); /* Get datatype's endianness order */ if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "can't retrieve datatype endianness order"); /* Range check datatype's endianness order */ /* (Note: this may not handle non-atomic datatypes well) */ if (dtype_order != H5T_ORDER_LE && dtype_order != H5T_ORDER_BE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype endianness order") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid datatype endianness order"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -132,15 +132,15 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get the plist structure */ if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) - HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get datatype */ if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype"); /* Get the filter's current parameters */ if (H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SZIP, &flags, &cd_nelmts, cd_values, 0, NULL, NULL) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get szip parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get szip parameters"); /* Get datatype's size, for checking the "bits-per-pixel" */ if ((dtype_size = (8 * H5T_get_size(type))) == 0) @@ -167,11 +167,11 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get dataspace */ if (NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace"); /* Get dimensions for dataspace */ if ((ndims = H5S_get_simple_extent_dims(ds, dims, NULL)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get dataspace dimensions") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get dataspace dimensions"); /* Set "local" parameter for this dataset's "pixels-per-scanline" */ /* (Use the chunk's fastest changing dimension size) */ @@ -189,10 +189,10 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get number of elements for the dataspace; use total number of elements in the chunk to define the new 'scanline' size */ if ((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace") + HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace"); if (npoints < cd_values[H5Z_SZIP_PARM_PPB]) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "pixels per block greater than total number of elements in the chunk") + "pixels per block greater than total number of elements in the chunk"); scanline = (hsize_t)MIN((cd_values[H5Z_SZIP_PARM_PPB] * SZ_MAX_BLOCKS_PER_SCANLINE), npoints); } else { @@ -207,7 +207,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get datatype's endianness order */ if ((dtype_order = H5T_get_order(type)) == H5T_ORDER_ERROR) - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); /* Set the correct endianness flag for szip */ /* (Note: this may not handle non-atomic datatypes well) */ @@ -226,12 +226,12 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) case H5T_ORDER_MIXED: case H5T_ORDER_NONE: default: - HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order") + HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order"); } /* end switch */ /* Modify the filter's parameters for this dataset */ if (H5P_modify_filter(dcpl_plist, H5Z_FILTER_SZIP, flags, H5Z_SZIP_TOTAL_NPARMS, cd_values) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local szip parameters") + HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local szip parameters"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -272,7 +272,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* Check arguments */ if (cd_nelmts != 4) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid number of filter parameters") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0, "invalid number of filter parameters"); /* Copy the filter parameters into the szip parameter block */ H5_CHECKED_ASSIGN(sz_param.options_mask, int, cd_values[H5Z_SZIP_PARM_MASK], unsigned); @@ -292,12 +292,12 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* Allocate space for the uncompressed buffer */ if (NULL == (outbuf = (unsigned char *)H5MM_malloc(nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for szip decompression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for szip decompression"); /* Decompress the buffer */ 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") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "szip_filter: decompression failed"); assert(size_out == nalloc); /* Free the input buffer */ @@ -315,7 +315,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* Allocate space for the compressed buffer & header (assume data won't get bigger) */ if (NULL == (dst = outbuf = (unsigned char *)H5MM_malloc(nbytes + 4))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate szip destination buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "unable to allocate szip destination buffer"); /* Encode the uncompressed length */ H5_CHECK_OVERFLOW(nbytes, size_t, uint32_t); @@ -324,7 +324,7 @@ H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], s /* Compress the buffer */ size_out = nbytes; if (SZ_OK != SZ_BufftoBuffCompress(dst, &size_out, *buf, nbytes, &sz_param)) - HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow") + HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, 0, "overflow"); assert(size_out <= nbytes); /* Free the input buffer */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index d0ab2b9..8839897 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -146,7 +146,7 @@ static void H5Z__xform_reduce_tree(H5Z_node *tree); } \ } \ else \ - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unexpected type conversion operation") \ + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unexpected type conversion operation"); \ } #if CHAR_MIN >= 0 @@ -239,7 +239,7 @@ static void H5Z__xform_reduce_tree(H5Z_node *tree); #define H5Z_XFORM_DO_OP4(TYPE) \ { \ if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL) \ - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree") \ + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree"); \ else { \ ret_value->type = (TYPE); \ if (tree->lchild) \ @@ -422,7 +422,7 @@ H5Z__get_token(H5Z_token *current) if (!isdigit(current->tok_end[0])) { current->tok_type = H5Z_XFORM_ERROR; HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, current, - "Invalidly formatted floating point number") + "Invalidly formatted floating point number"); } while (isdigit(current->tok_end[0])) @@ -432,7 +432,7 @@ H5Z__get_token(H5Z_token *current) /* Check that this is a properly formatted numerical value */ if (isalpha(current->tok_end[0]) || current->tok_end[0] == '.') { current->tok_type = H5Z_XFORM_ERROR; - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, current, "Invalidly formatted floating point number") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, current, "Invalidly formatted floating point number"); } } @@ -472,7 +472,7 @@ H5Z__get_token(H5Z_token *current) default: current->tok_type = H5Z_XFORM_ERROR; HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, current, - "Unknown H5Z_token in data transform expression ") + "Unknown H5Z_token in data transform expression "); } current->tok_end = current->tok_begin + 1; @@ -532,7 +532,7 @@ H5Z__xform_parse(const char *expression, H5Z_datval_ptrs *dat_val_pointers) FUNC_ENTER_PACKAGE if (!expression) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?"); /* Set up the initial H5Z_token for parsing */ tok.tok_expr = tok.tok_begin = tok.tok_end = expression; @@ -578,7 +578,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(expr); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); } new_node->lchild = expr; @@ -586,7 +586,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node->rchild) { H5Z__xform_destroy_parse_tree(new_node); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } expr = new_node; @@ -597,7 +597,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(expr); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); } new_node->lchild = expr; @@ -605,7 +605,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node->rchild) { H5Z__xform_destroy_parse_tree(new_node); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } expr = new_node; @@ -627,7 +627,7 @@ H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) case H5Z_XFORM_LPAREN: default: H5Z__xform_destroy_parse_tree(expr); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } } @@ -667,7 +667,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(term); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); } new_node->lchild = term; @@ -675,7 +675,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node->rchild) { H5Z__xform_destroy_parse_tree(new_node); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } term = new_node; @@ -686,7 +686,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(term); - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); } new_node->lchild = term; @@ -695,7 +695,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node->rchild) { H5Z__xform_destroy_parse_tree(new_node); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } break; @@ -719,7 +719,7 @@ H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) default: H5Z__xform_destroy_parse_tree(term); HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, - "bad transform type passed to data transform expression") + "bad transform type passed to data transform expression"); } /* end switch */ } /* end for */ @@ -758,7 +758,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) factor = H5Z__new_node(H5Z_XFORM_INTEGER); if (!factor) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); HDsscanf(current->tok_begin, "%ld", &factor->value.int_val); break; @@ -766,7 +766,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) factor = H5Z__new_node(H5Z_XFORM_FLOAT); if (!factor) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); HDsscanf(current->tok_begin, "%lf", &factor->value.float_val); break; @@ -774,7 +774,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) factor = H5Z__new_node(H5Z_XFORM_SYMBOL); if (!factor) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); factor->value.dat_val = &(dat_val_pointers->ptr_dat_val[dat_val_pointers->num_ptrs]); dat_val_pointers->num_ptrs++; @@ -784,20 +784,20 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) factor = H5Z__parse_expression(current, dat_val_pointers); if (!factor) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node"); current = H5Z__get_token(current); if (current->tok_type != H5Z_XFORM_RPAREN) { H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression"); } break; case H5Z_XFORM_RPAREN: /* We shouldn't see a ) right now */ H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' "); case H5Z_XFORM_PLUS: /* unary + */ @@ -808,7 +808,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) new_node->type != H5Z_XFORM_SYMBOL) { H5Z__xform_destroy_parse_tree(new_node); H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } factor = new_node; @@ -816,7 +816,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } new_node->rchild = factor; @@ -824,7 +824,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) } else { H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } break; @@ -837,7 +837,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) new_node->type != H5Z_XFORM_SYMBOL) { H5Z__xform_destroy_parse_tree(new_node); H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } factor = new_node; @@ -845,7 +845,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) if (!new_node) { H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } new_node->rchild = factor; @@ -853,7 +853,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) } else { H5Z__xform_destroy_parse_tree(factor); - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression"); } break; @@ -864,7 +864,8 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers) case H5Z_XFORM_DIVIDE: case H5Z_XFORM_ERROR: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Invalid token while parsing data transform expression") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, + "Invalid token while parsing data transform expression"); } /* Set return value */ @@ -893,7 +894,7 @@ H5Z__new_node(H5Z_token_type type) if (NULL == (ret_value = (H5Z_node *)H5MM_calloc(sizeof(H5Z_node)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "Ran out of memory trying to allocate space for nodes in the parse tree") + "Ran out of memory trying to allocate space for nodes in the parse tree"); ret_value->type = type; @@ -926,7 +927,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size /* Get the datatype ID for the buffer's type */ if ((array_type = H5Z__xform_find_type(buf_type)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot perform data transform on this type.") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot perform data transform on this type."); /* After this point, we're assured that the type of the array is handled by the eval code, * so we no longer have to check for valid types @@ -979,7 +980,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size if (NULL == (data_xform_prop->dat_val_pointers->ptr_dat_val[i] = (void *)H5MM_malloc( array_size * H5T_get_size((H5T_t *)H5I_object(array_type))))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "Ran out of memory trying to allocate space for data in data transform") + "Ran out of memory trying to allocate space for data in data transform"); H5MM_memcpy(data_xform_prop->dat_val_pointers->ptr_dat_val[i], array, array_size * H5T_get_size((H5T_t *)H5I_object(array_type))); @@ -987,7 +988,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size } /* end else */ if (H5Z__xform_eval_full(tree, array_size, array_type, &res) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform"); if (data_xform_prop->dat_val_pointers->num_ptrs > 1) H5MM_memcpy(array, res.value.dat_val, array_size * H5T_get_size((H5T_t *)H5I_object(array_type))); @@ -1058,9 +1059,9 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_ } /* end if */ else { if (tree->lchild && H5Z__xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform"); if (H5Z__xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform"); res->type = H5Z_XFORM_SYMBOL; @@ -1093,7 +1094,7 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_ case H5Z_XFORM_RPAREN: case H5Z_XFORM_END: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree"); } /* end switch */ /* The result stores a pointer to the new data */ @@ -1104,7 +1105,7 @@ H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_ else if (resr.type == H5Z_XFORM_SYMBOL) res->value.dat_val = resr.value.dat_val; else - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error during transform evaluation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error during transform evaluation"); } /* end else */ done: @@ -1171,7 +1172,7 @@ H5Z__xform_find_type(const H5T_t *type) else if ((tmp = (H5T_t *)H5I_object(H5T_NATIVE_LDOUBLE)) && 0 == H5T_cmp(type, tmp, FALSE)) HGOTO_DONE(H5T_NATIVE_LDOUBLE); else - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not find matching type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not find matching type"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1198,7 +1199,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv if (tree->type == H5Z_XFORM_INTEGER) { if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree"); else { ret_value->type = H5Z_XFORM_INTEGER; ret_value->value.int_val = tree->value.int_val; @@ -1208,7 +1209,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv } else if (tree->type == H5Z_XFORM_FLOAT) { if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree"); else { ret_value->type = H5Z_XFORM_FLOAT; ret_value->value.float_val = tree->value.float_val; @@ -1218,7 +1219,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv } else if (tree->type == H5Z_XFORM_SYMBOL) { if ((ret_value = (H5Z_node *)H5MM_malloc(sizeof(H5Z_node))) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to copy parse tree"); else { ret_value->type = H5Z_XFORM_SYMBOL; @@ -1237,7 +1238,7 @@ H5Z__xform_copy_tree(H5Z_node *tree, H5Z_datval_ptrs *dat_val_pointers, H5Z_datv else if (tree->type == H5Z_XFORM_DIVIDE) H5Z_XFORM_DO_OP4(H5Z_XFORM_DIVIDE) else - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error in parse tree while trying to copy") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error in parse tree while trying to copy"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1405,16 +1406,16 @@ H5Z_xform_create(const char *expr) /* Allocate space for the data transform information */ if (NULL == (data_xform_prop = (H5Z_data_xform_t *)H5MM_calloc(sizeof(H5Z_data_xform_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate memory for data transform info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate memory for data transform info"); if (NULL == (data_xform_prop->dat_val_pointers = (H5Z_datval_ptrs *)H5MM_malloc(sizeof(H5Z_datval_ptrs)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "unable to allocate memory for data transform array storage") + "unable to allocate memory for data transform array storage"); /* copy the user's string into the property */ if (NULL == (data_xform_prop->xform_exp = (char *)H5MM_xstrdup(expr))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "unable to allocate memory for data transform expression") + "unable to allocate memory for data transform expression"); /* Find the number of times "x" is used in this equation, and allocate room for storing that many points * A more sophisticated check is needed to support scientific notation. @@ -1439,7 +1440,7 @@ H5Z_xform_create(const char *expr) if (NULL == (data_xform_prop->dat_val_pointers->ptr_dat_val = (void **)H5MM_calloc(count * sizeof(void *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, - "unable to allocate memory for pointers in transform array") + "unable to allocate memory for pointers in transform array"); /* Initialize the num_ptrs field, which will be used to keep track of the number of copies * of the data we have for polynomial transforms */ @@ -1448,13 +1449,13 @@ H5Z_xform_create(const char *expr) /* we generate the parse tree right here and store a pointer to its root in the property. */ if ((data_xform_prop->parse_root = (H5Z_node *)H5Z__xform_parse(expr, data_xform_prop->dat_val_pointers)) == NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to generate parse tree from expression") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to generate parse tree from expression"); /* Sanity check * count should be the same num_ptrs */ if (count != data_xform_prop->dat_val_pointers->num_ptrs) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, - "error copying the parse tree, did not find correct number of \"variables\"") + "error copying the parse tree, did not find correct number of \"variables\""); /* Assign return value */ ret_value = data_xform_prop; @@ -1543,17 +1544,17 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop) if (*data_xform_prop) { /* Allocate new node */ if (NULL == (new_data_xform_prop = (H5Z_data_xform_t *)H5MM_calloc(sizeof(H5Z_data_xform_t)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for data transform info") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for data transform info"); /* Copy string */ if (NULL == (new_data_xform_prop->xform_exp = (char *)H5MM_xstrdup((*data_xform_prop)->xform_exp))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate memory for data transform expression") + "unable to allocate memory for data transform expression"); if (NULL == (new_data_xform_prop->dat_val_pointers = (H5Z_datval_ptrs *)H5MM_malloc(sizeof(H5Z_datval_ptrs)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate memory for data transform array storage") + "unable to allocate memory for data transform array storage"); /* Find the number of times "x" is used in this equation, and allocate room for storing that many * points */ @@ -1565,7 +1566,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop) if (NULL == (new_data_xform_prop->dat_val_pointers->ptr_dat_val = (void **)H5MM_calloc(count * sizeof(void *)))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, - "unable to allocate memory for pointers in transform array") + "unable to allocate memory for pointers in transform array"); /* Zero out num_pointers prior to H5Z_xform_cop_tree call; that call will increment it to the right * amount */ @@ -1575,13 +1576,13 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop) if ((new_data_xform_prop->parse_root = (H5Z_node *)H5Z__xform_copy_tree( (*data_xform_prop)->parse_root, (*data_xform_prop)->dat_val_pointers, new_data_xform_prop->dat_val_pointers)) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "error copying the parse tree") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "error copying the parse tree"); /* Sanity check * count should be the same num_ptrs */ if (count != new_data_xform_prop->dat_val_pointers->num_ptrs) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, - "error copying the parse tree, did not find correct number of \"variables\"") + "error copying the parse tree, did not find correct number of \"variables\""); /* Copy new information on top of old information */ *data_xform_prop = new_data_xform_prop; diff --git a/src/H5detect.c b/src/H5detect.c index 45d27c7..9520faa 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -345,7 +345,7 @@ H5T__init_native(void)\n\ /* The part common to fixed and floating types */ fprintf(rawoutstream, "\ if(NULL == (dt = H5T__alloc()))\n\ - HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, \"datatype allocation failed\")\n\ + HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, \"datatype allocation failed\");\n\ dt->shared->state = H5T_STATE_IMMUTABLE;\n\ dt->shared->type = H5T_FLOAT;\n\ dt->shared->size = %d;\n", @@ -391,7 +391,7 @@ dt->shared->u.atomic.u.f.pad = H5T_PAD_ZERO;\n", /* Register the type */ fprintf(rawoutstream, "\ if((H5T_NATIVE_%s_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)\n\ - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \"can't register ID for built-in datatype\")\n", + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \"can't register ID for built-in datatype\");\n", d[i].varname); /* Variables for alignment of compound datatype */ diff --git a/src/H5mpi.c b/src/H5mpi.c index e1b71f4..8fd7252 100644 --- a/src/H5mpi.c +++ b/src/H5mpi.c @@ -97,7 +97,7 @@ H5_mpi_comm_dup(MPI_Comm comm, MPI_Comm *comm_new) /* Check arguments */ if (!comm_new) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "comm_new cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "comm_new cannot be NULL"); /* Handle MPI_COMM_NULL separately */ if (MPI_COMM_NULL == comm) { @@ -156,7 +156,7 @@ H5_mpi_info_dup(MPI_Info info, MPI_Info *info_new) /* Check arguments */ if (!info_new) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "info_new cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "info_new cannot be NULL"); /* Duplicate the MPI info */ if (info == MPI_INFO_NULL) { @@ -202,7 +202,7 @@ H5_mpi_comm_free(MPI_Comm *comm) /* Check arguments */ if (!comm) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "comm pointer cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "comm pointer cannot be NULL"); /* Free the communicator */ if (MPI_COMM_WORLD != *comm && MPI_COMM_NULL != *comm) @@ -234,7 +234,7 @@ H5_mpi_info_free(MPI_Info *info) /* Check arguments */ if (!info) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "info pointer cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "info pointer cannot be NULL"); /* Free the info */ if (MPI_INFO_NULL != *info) @@ -277,7 +277,7 @@ H5_mpi_comm_cmp(MPI_Comm comm1, MPI_Comm comm2, int *result) /* Check arguments */ if (!result) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "result cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "result cannot be NULL"); /* Set out parameter to something reasonable in case something goes wrong */ *result = 0; @@ -345,7 +345,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) /* Check arguments */ if (!result) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "result cannot be NULL") + HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "result cannot be NULL"); /* Check for MPI_INFO_NULL */ if (MPI_INFO_NULL == info1 && MPI_INFO_NULL == info2) { @@ -379,11 +379,11 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) /* Allocate buffers for iteration */ if (NULL == (key = (char *)H5MM_malloc(MPI_MAX_INFO_KEY * sizeof(char)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (NULL == (value1 = (char *)H5MM_malloc(MPI_MAX_INFO_VAL * sizeof(char)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); if (NULL == (value2 = (char *)H5MM_malloc(MPI_MAX_INFO_VAL * sizeof(char)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); /* Iterate over the keys, comparing them */ for (i = 0; i < nkeys_1; i++) { @@ -646,7 +646,7 @@ H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, co HMPI_GOTO_ERROR(FAIL, "MPI_Type_get_extent(_x) failed", mpi_code) if (type_extent < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "MPI recv_type had a negative extent") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "MPI recv_type had a negative extent"); /* * Calculate the total size of the buffer being @@ -766,7 +766,7 @@ H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_t if (H5_mpio_gatherv_alloc(send_buf, send_count, send_type, recv_counts_disps_array, &recv_counts_disps_array[mpi_size], recv_type, allgather, root, comm, mpi_rank, mpi_size, out_buf, out_buf_num_entries) < 0) - HGOTO_ERROR(H5E_LIB, H5E_CANTGATHER, FAIL, "can't gather data") + HGOTO_ERROR(H5E_LIB, H5E_CANTGATHER, FAIL, "can't gather data"); done: if (recv_counts_disps_array) @@ -806,17 +806,17 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required) *file_sync_required = FALSE; if (MPI_SUCCESS != MPI_File_get_info(fh, &info_used)) - HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info") + HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info"); if (MPI_SUCCESS != MPI_Info_get(info_used, "romio_visibility_immediate", MPI_MAX_INFO_VAL - 1, value, &flag)) - HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info") + HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info"); if (flag && !HDstrcmp(value, "false")) *file_sync_required = TRUE; if (MPI_SUCCESS != MPI_Info_free(&info_used)) - HGOTO_ERROR(H5E_LIB, H5E_CANTFREE, FAIL, "can't free MPI info") + HGOTO_ERROR(H5E_LIB, H5E_CANTFREE, FAIL, "can't free MPI info"); /* Force setting the flag via env variable (temp solution before the flag is implemented in MPI) */ sync_env_var = HDgetenv("HDF5_DO_MPI_FILE_SYNC"); diff --git a/src/H5private.h b/src/H5private.h index a2d6453..b154ad8 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1557,7 +1557,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); /* Initialize the library */ \ if (!H5_INIT_GLOBAL && !H5_TERM_GLOBAL) { \ if (H5_init_library() < 0) \ - HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, err, "library initialization failed") \ + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, err, "library initialization failed"); \ } #define FUNC_ENTER_API_PUSH(err) \ @@ -1566,7 +1566,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); \ /* Push the API context */ \ if (H5CX_push() < 0) \ - HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \ + HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context"); \ else \ api_ctx_pushed = TRUE; diff --git a/src/H5system.c b/src/H5system.c index a113acb..eb233bc 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -229,7 +229,7 @@ H5_make_time(struct tm *tm) /* Perform base conversion */ if ((time_t)-1 == (the_time = HDmktime(tm))) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCONVERT, FAIL, "badly formatted modification time message") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCONVERT, FAIL, "badly formatted modification time message"); /* Adjust for timezones */ #if defined(H5_HAVE_TM_GMTOFF) @@ -253,7 +253,7 @@ H5_make_time(struct tm *tm) * only way a user can get the modification time is from our internal * query routines, which can gracefully recover. */ - HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "unable to obtain local timezone information") + HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "unable to obtain local timezone information"); #endif /* Set return value */ @@ -633,7 +633,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) */ if (H5_CHECK_ABSOLUTE(name)) { if (NULL == (full_path = (char *)H5MM_strdup(name))) - HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end if */ else { /* relative pathname */ char *retcwd; @@ -641,10 +641,10 @@ H5_build_extpath(const char *name, char **extpath /*out*/) int drive; if (NULL == (cwdpath = (char *)H5MM_malloc(MAX_PATH_LEN))) - HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed"); name_len = HDstrlen(name) + 1; if (NULL == (new_name = (char *)H5MM_malloc(name_len))) - HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed"); /* * Windows: name[0-1] is ":" @@ -682,7 +682,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) 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") + HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed"); HDstrncpy(full_path, cwdpath, cwdlen + 1); if (!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1])) @@ -741,7 +741,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) /* If path1 is empty or path2 is absolute, simply use path2 */ if (NULL == (*full_name = (char *)H5MM_strdup(path2))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end if */ else if (H5_CHECK_ABS_PATH(path2)) { @@ -752,7 +752,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) * Use the drive letter of path1 + path2 */ if (NULL == (*full_name = (char *)H5MM_malloc(path2_len + 3))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate path2 buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate path2 buffer"); HDsnprintf(*full_name, (path2_len + 3), "%c:%s", path1[0], path2); } /* end if */ else { @@ -761,7 +761,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) * Use path2. */ if (NULL == (*full_name = (char *)H5MM_strdup(path2))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } /* end else */ } /* end else if */ @@ -774,7 +774,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) if (NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */ - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer"); /* Compose the full file name */ HDsnprintf(*full_name, (path1_len + path2_len + 2 + 2), "%s%s%s", @@ -868,15 +868,15 @@ H5_expand_windows_env_vars(char **env_var) /* Allocate buffer for expanded environment variable string */ if (NULL == (temp_buf = (char *)H5MM_calloc((size_t)H5_WIN32_ENV_VAR_BUFFER_SIZE))) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for expanded path"); /* Expand the environment variable string */ if ((n_chars = ExpandEnvironmentStringsA(*env_var, temp_buf, H5_WIN32_ENV_VAR_BUFFER_SIZE)) > H5_WIN32_ENV_VAR_BUFFER_SIZE) - HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long") + HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "expanded path is too long"); if (0 == n_chars) - HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path") + HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "failed to expand path"); *env_var = (char *)H5MM_xfree(*env_var); *env_var = temp_buf; @@ -916,13 +916,13 @@ H5_strndup(const char *s, size_t n) FUNC_ENTER_NOAPI_NOINIT if (!s) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "string cannot be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "string cannot be NULL"); for (len = 0; len < n && s[len] != '\0'; len++) ; if (NULL == (ret_value = H5MM_malloc(len + 1))) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate buffer for string") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, NULL, "can't allocate buffer for string"); H5MM_memcpy(ret_value, s, len); ret_value[len] = '\0'; @@ -996,9 +996,9 @@ H5_dirname(const char *path, char **dirname) FUNC_ENTER_NOAPI_NOINIT if (!path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path can't be NULL"); if (!dirname) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dirname can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dirname can't be NULL"); if (NULL == (sep = HDstrrchr(path, H5_DIR_SEPC))) { /* Pathname with no file separator characters */ @@ -1105,9 +1105,9 @@ H5_basename(const char *path, char **basename) FUNC_ENTER_NOAPI_NOINIT if (!path) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path can't be NULL"); if (!basename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "basename can't be NULL") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "basename can't be NULL"); if (NULL == (sep = HDstrrchr(path, H5_DIR_SEPC))) { if (*path == '\0') -- cgit v0.12