From 089a6f60ace8f87c049f5e618b77394c2cec2b4c Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 5 Mar 2021 16:08:22 -0600 Subject: 1 8 Merges from develop (#432) * Update supported platforms * Merge PR#3 changes from develop * # WARNING: head commit changed in the meantime Merge gcc 10 diagnostics option from develop Merge CMake changes from develop Merge warnings from develop Merge #318 OSX changes from develop Merge tools changes from develop Merge test macros from develop * Format updates * Fix missing semicolon and format fix * Format update * Correct actions, remove java option * Update autotools build files * Add testfiles * Fix configure issue with make flags * Init fapls to default * Update generated files and fix h5repack id closure * update format * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup whitespace cleanup tools sync * format alignment * initialize vars * revert H5private change * Merge #380 from develop --- MANIFEST | 1 + c++/src/H5AbstractDs.h | 6 +- c++/src/H5AcreatProp.h | 6 +- c++/src/H5CommonFG.h | 16 +- c++/src/H5Group.h | 6 +- c++/src/H5IdComponent.h | 6 +- c++/src/H5StrcreatProp.h | 6 +- config/gnu-cxxflags | 2 +- config/gnu-fflags | 2 +- fortran/src/H5match_types.c | 4 +- release_docs/RELEASE.txt | 10 +- src/H5B2int.c | 106 ++-- src/H5B2public.h | 6 +- src/H5Bpublic.h | 4 +- src/H5C.c | 4 +- src/H5Cprivate.h | 2 +- src/H5Edefin.h | 272 +++++----- src/H5Einit.h | 906 +++++++++++++++++----------------- src/H5Epubgen.h | 480 +++++++++--------- src/H5Epublic.h | 20 +- src/H5Eterm.h | 276 +++++------ src/H5FDdirect.h | 2 +- src/H5FDhdfs.h | 2 +- src/H5FDlog.c | 8 +- src/H5FDmpio.h | 2 +- src/H5FDmulti.c | 223 +++++---- src/H5FDstdio.c | 113 ++--- src/H5FSpublic.h | 6 +- src/H5FSsection.c | 4 +- src/H5HFdbg.c | 8 +- src/H5HFman.c | 106 ++-- src/H5HFpublic.h | 6 +- src/H5HFsection.c | 2 +- src/H5HGpublic.h | 4 +- src/H5HL.c | 28 +- src/H5HLpublic.h | 4 +- src/H5Oalloc.c | 4 +- src/H5Obtreek.c | 12 +- src/H5Pint.c | 2 +- src/H5Ppublic.h | 6 +- src/H5RCprivate.h | 6 +- src/H5SL.c | 20 +- src/H5Shyper.c | 180 +++---- src/H5overflow.h | 4 +- src/H5system.c | 14 +- src/H5version.h | 4 +- test/cache_common.h | 6 +- test/dt_arith.c | 36 +- tools/h5diff/CMakeTests.cmake | 7 + tools/h5diff/h5diff_common.c | 36 +- tools/h5diff/h5diff_common.h | 6 +- tools/h5diff/h5diff_plugin.sh.in | 87 ++-- tools/h5diff/testfiles/h5diff_10.txt | 12 + tools/h5diff/testfiles/h5diff_600.txt | 12 + tools/h5diff/testfiles/h5diff_603.txt | 12 + tools/h5diff/testfiles/h5diff_606.txt | 12 + tools/h5diff/testfiles/h5diff_612.txt | 12 + tools/h5diff/testfiles/h5diff_615.txt | 12 + tools/h5diff/testfiles/h5diff_621.txt | 12 + tools/h5diff/testfiles/h5diff_622.txt | 12 + tools/h5diff/testfiles/h5diff_623.txt | 12 + tools/h5diff/testfiles/h5diff_624.txt | 12 + tools/h5diff/testfiles/h5diff_830.txt | 30 ++ tools/h5diff/testh5diff.sh.in | 5 + tools/h5dump/h5dump.h | 6 +- tools/h5dump/h5dump_ddl.h | 6 +- tools/h5dump/h5dump_defines.h | 6 +- tools/h5dump/h5dump_extern.h | 6 +- tools/h5dump/h5dump_plugin.sh.in | 24 +- tools/h5dump/h5dump_xml.h | 6 +- tools/h5import/h5import.c | 4 +- tools/h5import/h5import.h | 6 +- tools/h5ls/h5ls.c | 2 +- tools/h5repack/h5repack.h | 6 +- tools/lib/h5diff.h | 6 +- tools/lib/h5diff_array.c | 92 ++-- tools/lib/h5tools.c | 2 +- tools/lib/h5tools.h | 6 +- tools/lib/h5tools_dump.h | 6 +- tools/lib/h5tools_error.h | 6 +- tools/lib/h5tools_ref.h | 4 +- tools/lib/h5tools_str.c | 2 +- tools/lib/h5tools_str.h | 6 +- tools/lib/h5tools_utils.c | 12 +- tools/lib/h5tools_utils.h | 6 +- tools/lib/h5trav.h | 6 +- tools/lib/io_timer.h | 6 +- tools/lib/ph5diff.h | 6 +- tools/misc/h5debug.c | 88 ++-- tools/misc/h5repart.c | 2 +- tools/perform/chunk.c | 2 +- tools/perform/iopipe.c | 8 +- tools/perform/overhead.c | 2 +- tools/perform/perf_meta.c | 2 +- tools/perform/pio_perf.h | 6 +- tools/perform/pio_standalone.h | 4 +- tools/perform/sio_engine.c | 7 +- tools/perform/sio_perf.c | 4 +- tools/perform/sio_perf.h | 6 +- tools/perform/sio_standalone.h | 4 +- 100 files changed, 1929 insertions(+), 1688 deletions(-) create mode 100644 tools/h5diff/testfiles/h5diff_830.txt diff --git a/MANIFEST b/MANIFEST index ae8747f..7fc2ed1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1981,6 +1981,7 @@ ./tools/h5diff/testfiles/h5diff_80.txt ./tools/h5diff/testfiles/h5diff_800.txt ./tools/h5diff/testfiles/h5diff_801.txt +./tools/h5diff/testfiles/h5diff_830.txt ./tools/h5diff/testfiles/h5diff_90.txt ./tools/h5diff/testfiles/h5diff_100.txt ./tools/h5diff/testfiles/h5diff_101.txt diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index f502c9f..48c4c27 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __AbstractDs_H -#define __AbstractDs_H +#ifndef AbstractDs_H +#define AbstractDs_H namespace H5 { @@ -95,4 +95,4 @@ class H5_DLLCPP AbstractDs { }; // end of AbstractDs } // namespace H5 -#endif // __AbstractDs_H +#endif // AbstractDs_H diff --git a/c++/src/H5AcreatProp.h b/c++/src/H5AcreatProp.h index 6be2506..b49c63a 100644 --- a/c++/src/H5AcreatProp.h +++ b/c++/src/H5AcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5AttrCreatPropList_H -#define __H5AttrCreatPropList_H +#ifndef H5AttrCreatPropList_H +#define H5AttrCreatPropList_H namespace H5 { @@ -63,4 +63,4 @@ class H5_DLLCPP AttrCreatPropList : public StrCreatPropList { } // namespace H5 -#endif // __H5AttrCreatPropList_H +#endif // H5AttrCreatPropList_H diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index a0b2a69..1f65044 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __CommonFG_H -#define __CommonFG_H +#ifndef CommonFG_H +#define CommonFG_H namespace H5 { @@ -176,4 +176,14 @@ class H5_DLLCPP CommonFG { }; // end of CommonFG } // namespace H5 -#endif // __CommonFG_H +#endif // CommonFG_H + +/*************************************************************************** + Design Note + =========== + +September 2017: + + This class used to be base class of H5File as well, until the + restructure that moved H5File to be subclass of H5Group. +*/ diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index bbd460d..f3d692f 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __Group_H -#define __Group_H +#ifndef Group_H +#define Group_H namespace H5 { @@ -80,4 +80,4 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { }; // end of Group } // namespace H5 -#endif // __Group_H +#endif // Group_H diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 5a5d1fb..58e39b6 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __IdComponent_H -#define __IdComponent_H +#ifndef IdComponent_H +#define IdComponent_H namespace H5 { @@ -124,4 +124,4 @@ class H5_DLLCPP IdComponent { }; // end class IdComponent } // namespace H5 -#endif // __IdComponent_H +#endif // IdComponent_H diff --git a/c++/src/H5StrcreatProp.h b/c++/src/H5StrcreatProp.h index 96efa4d..710fac5 100644 --- a/c++/src/H5StrcreatProp.h +++ b/c++/src/H5StrcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5StrCreatPropList_H -#define __H5StrCreatPropList_H +#ifndef H5StrCreatPropList_H +#define H5StrCreatPropList_H namespace H5 { @@ -58,4 +58,4 @@ class H5_DLLCPP StrCreatPropList : public PropList { } // namespace H5 -#endif // __H5StrCreatPropList_H +#endif // H5StrCreatPropList_H diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 3fe13d8..cba8298 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -148,7 +148,7 @@ if test "X-g++" = "X-$cxx_vendor"; then # Enhanced Diagnostics # ######################## - if test $cc_vers_major -ge 10; then + if test $cxx_vers_major -ge 10; then NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" fi DIAGS_CXXFLAGS= diff --git a/config/gnu-fflags b/config/gnu-fflags index d4f876d..ec4fcab 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -109,7 +109,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then # Enhanced Diagnostics # ######################## - if test $cc_vers_major -ge 10; then + if test $f9x_vers_major -ge 10; then NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" fi DIAGS_FCFLAGS= diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index aa6c70e..a3cee70 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -67,8 +67,8 @@ initCfile(void) * help@hdfgroup.org. *\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\ \n\n\ -#ifndef _H5f90i_gen_H\n\ -#define _H5f90i_gen_H\n\ +#ifndef H5f90i_gen_H\n\ +#define H5f90i_gen_H\n\ \n\ /* This file is automatically generated by H5match_types.c at build time. */\n\ \n\ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 625ad24..df788ce 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -127,7 +127,15 @@ New Features Library: -------- - - None + - H5Epush_ret() now requires a trailing semi-colon + + H5Epush_ret() is a function-like macro that has been changed to + contain a `do {} while(0)` loop. Consequently, a trailing semi-colon + is now required to end the `while` statement. Previously, a trailing + semi would work, but was not mandatory. This change was made to allow + clang-format to correctly format the source code. + + (SAM - 2021/03/03) Fortran Library: diff --git a/src/H5B2int.c b/src/H5B2int.c index a8d475a..e153063 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -170,15 +170,15 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *cur unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - uint16_t mid_record; /* Index of "middle" record in current node */ - uint16_t old_node_nrec; /* Number of records in internal node split */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + uint16_t mid_record; /* Index of "middle" record in current node */ + uint16_t old_node_nrec; /* Number of records in internal node split */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ herr_t ret_value = SUCCEED; /* Return value */ @@ -450,13 +450,13 @@ done: static herr_t H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal_t *internal, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal redistrib */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ @@ -709,20 +709,20 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_internal unsigned *internal_flags_ptr, unsigned idx) { H5B2_node_ptr_t *left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - H5B2_node_ptr_t * middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - haddr_t middle_addr; /* Address of middle child node */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - void * middle_child = NULL; /* Pointers to middle child node */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint16_t * middle_nrec; /* Pointers to middle child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - uint8_t * middle_native; /* Pointers to middle child's native records */ - hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal split */ - hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */ - unsigned left_child_flags = H5AC__NO_FLAGS_SET, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + H5B2_node_ptr_t * middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + haddr_t middle_addr = HADDR_UNDEF; /* Address of middle child node */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + void * middle_child = NULL; /* Pointers to middle child node */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint16_t *middle_nrec; /* Pointers to middle child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + uint8_t * middle_native; /* Pointers to middle child's native records */ + hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal split */ + hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */ + unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1107,16 +1107,16 @@ H5B2_merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *cur unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */ - uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - unsigned left_child_flags = H5AC__NO_FLAGS_SET, - right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */ + uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + unsigned left_child_flags = H5AC__NO_FLAGS_SET, + right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1273,19 +1273,19 @@ H5B2_merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *cur unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - haddr_t middle_addr; /* Address of middle child node */ - void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ - void * middle_child = NULL; /* Pointer to middle child node */ - uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */ - uint16_t * middle_nrec; /* Pointer to middle child # of records */ - uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ - uint8_t * middle_native; /* Pointer to middle child's native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointer to child's node pointer info */ - hsize_t middle_moved_nrec; /* Number of records moved, for internal split */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + haddr_t middle_addr = HADDR_UNDEF; /* Address of middle child node */ + void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ + void * middle_child = NULL; /* Pointer to middle child node */ + uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */ + uint16_t *middle_nrec; /* Pointer to middle child # of records */ + uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ + uint8_t * middle_native; /* Pointer to middle child's native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointer to child's node pointer info */ + hsize_t middle_moved_nrec; /* Number of records moved, for internal split */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ diff --git a/src/H5B2public.h b/src/H5B2public.h index 7686b33..0049253 100644 --- a/src/H5B2public.h +++ b/src/H5B2public.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5B2public_H -#define _H5B2public_H +#ifndef H5B2public_H +#define H5B2public_H /* Public headers needed by this file */ #include "H5public.h" @@ -48,4 +48,4 @@ extern "C" { } #endif -#endif /* _H5B2public_H */ +#endif /* H5B2public_H */ diff --git a/src/H5Bpublic.h b/src/H5Bpublic.h index 688b824..3ce7eb4 100644 --- a/src/H5Bpublic.h +++ b/src/H5Bpublic.h @@ -23,8 +23,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Bpublic_H -#define _H5Bpublic_H +#ifndef H5Bpublic_H +#define H5Bpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5C.c b/src/H5C.c index 4471891..ca696b1 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -3183,12 +3183,12 @@ done: hbool_t first_flush; hbool_t have_write_permitted = FALSE; hbool_t read_only = FALSE; - hbool_t write_permitted; + hbool_t write_permitted = FALSE; herr_t result; size_t empty_space; void * thing; H5C_cache_entry_t *entry_ptr; - void * ret_value; /* Return value */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index d028d33..ce03ba0 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -30,7 +30,7 @@ /* Private headers needed by this header */ #include "H5private.h" /* Generic Functions */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #define H5C_DO_SANITY_CHECKS 0 #define H5C_DO_EXTREME_SANITY_CHECKS 0 diff --git a/src/H5Edefin.h b/src/H5Edefin.h index b580fc0..3dcbd3a 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -15,51 +15,133 @@ /* Add new errors to H5err.txt file */ -#ifndef _H5Edefin_H -#define _H5Edefin_H +#ifndef H5Edefin_H +#define H5Edefin_H /* Major error IDs */ -hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ -hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ +hid_t H5E_DATASET_g = FAIL; /* Dataset */ +hid_t H5E_REFERENCE_g = FAIL; /* References */ +hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ +hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ +hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ hid_t H5E_CACHE_g = FAIL; /* Object cache */ -hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ -hid_t H5E_ATOM_g = FAIL; /* Object atom */ -hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ -hid_t H5E_STORAGE_g = FAIL; /* Data storage */ -hid_t H5E_FILE_g = FAIL; /* File accessibility */ +hid_t H5E_IO_g = FAIL; /* Low-level I/O */ +hid_t H5E_LINK_g = FAIL; /* Links */ +hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ +hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ +hid_t H5E_EFL_g = FAIL; /* External file list */ hid_t H5E_PLINE_g = FAIL; /* Data filters */ -hid_t H5E_REFERENCE_g = FAIL; /* References */ +hid_t H5E_ATOM_g = FAIL; /* Object atom */ hid_t H5E_ERROR_g = FAIL; /* Error API */ +hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ +hid_t H5E_BTREE_g = FAIL; /* B-Tree node */ +hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */ +hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */ +hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ hid_t H5E_DATATYPE_g = FAIL; /* Datatype */ -hid_t H5E_ATTR_g = FAIL; /* Attribute */ +hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ hid_t H5E_OHDR_g = FAIL; /* Object header */ -hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */ -hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */ +hid_t H5E_PLIST_g = FAIL; /* Property lists */ hid_t H5E_SYM_g = FAIL; /* Symbol table */ +hid_t H5E_STORAGE_g = FAIL; /* Data storage */ +hid_t H5E_FILE_g = FAIL; /* File accessibility */ hid_t H5E_SLIST_g = FAIL; /* Skip Lists */ -hid_t H5E_LINK_g = FAIL; /* Links */ -hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */ hid_t H5E_HEAP_g = FAIL; /* Heap */ -hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */ -hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */ -hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */ -hid_t H5E_EFL_g = FAIL; /* External file list */ -hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */ -hid_t H5E_DATASET_g = FAIL; /* Dataset */ -hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */ -hid_t H5E_PLIST_g = FAIL; /* Property lists */ -hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */ -hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */ /* Minor error IDs */ -/* Generic low-level file I/O errors */ -hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ -hid_t H5E_READERROR_g = FAIL; /* Read failed */ -hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ -hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ -hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ -hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ +/* Property list errors */ +hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ +hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ +hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ +hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ + +/* I/O pipeline errors */ +hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ +hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ +hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ +hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ +hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ +hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ + +/* Function entry/exit interface errors */ +hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ +hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ +hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ + +/* Object atom related errors */ +hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */ +hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */ +hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */ +hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */ +hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ +hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ + +/* Resource errors */ +hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ +hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ +hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ +hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ +hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ +hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ +hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ +hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */ +hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */ +hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */ + +/* No error */ +hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ + +/* Heap errors */ +hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ +hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ +hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ +hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ +hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ +hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ + +/* Argument errors */ +hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ +hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ +hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ +hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ +hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ + +/* Parallel MPI errors */ +hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ +hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ +hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ + +/* File accessibility errors */ +hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ +hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ +hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ +hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ +hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ +hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ +hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ +hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ +hid_t H5E_MOUNT_g = FAIL; /* File mount error */ + +/* Plugin errors */ +hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ + +/* Dataspace errors */ +hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ +hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ +hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ +hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ +hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ +hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ + +/* Group related errors */ +hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ +hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ +hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ +hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ /* B-tree related errors */ hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */ @@ -74,16 +156,14 @@ hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */ hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */ hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */ -/* System level errors */ -hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ +/* Free space errors */ +hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ +hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ +hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ -/* Dataspace errors */ -hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */ -hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */ -hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ -hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ -hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ -hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ +/* Datatype conversion errors */ +hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ +hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ /* Object header related errors */ hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */ @@ -96,37 +176,23 @@ hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */ hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */ hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */ -/* No error */ -hid_t H5E_NONE_MINOR_g = FAIL; /* No error */ - -/* Datatype conversion errors */ -hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */ -hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */ - -/* Group related errors */ -hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */ -hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */ -hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */ -hid_t H5E_PATH_g = FAIL; /* Problem with path to object */ +/* Link related errors */ +hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ +hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ +hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ +hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ +hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ -/* File accessibility errors */ -hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */ -hid_t H5E_FILEOPEN_g = FAIL; /* File already open */ -hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */ -hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */ -hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */ -hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */ -hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */ -hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */ -hid_t H5E_MOUNT_g = FAIL; /* File mount error */ +/* Generic low-level file I/O errors */ +hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */ +hid_t H5E_READERROR_g = FAIL; /* Read failed */ +hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */ +hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */ +hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */ +hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */ -/* Heap errors */ -hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */ -hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */ -hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */ -hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */ -hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */ -hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */ +/* System level errors */ +hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */ /* Cache related errors */ hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */ @@ -145,70 +211,4 @@ hid_t H5E_CANTDIRTY_g = FAIL; /* Unable to mark metadata as dirty */ hid_t H5E_CANTEXPUNGE_g = FAIL; /* Unable to expunge a metadata cache entry */ hid_t H5E_CANTRESIZE_g = FAIL; /* Unable to resize a metadata cache entry */ -/* Parallel MPI errors */ -hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */ -hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */ -hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */ - -/* Link related errors */ -hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */ -hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */ -hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */ -hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */ -hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */ - -/* Resource errors */ -hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */ -hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */ -hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */ -hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */ -hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */ -hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */ -hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */ -hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */ -hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */ -hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */ - -/* Plugin errors */ -hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */ - -/* Argument errors */ -hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ -hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */ -hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */ -hid_t H5E_BADRANGE_g = FAIL; /* Out of range */ -hid_t H5E_BADVALUE_g = FAIL; /* Bad value */ - -/* Object atom related errors */ -hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */ -hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */ -hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */ -hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */ -hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */ -hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */ - -/* Function entry/exit interface errors */ -hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */ -hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */ -hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */ - -/* I/O pipeline errors */ -hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */ -hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */ -hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */ -hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */ -hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */ -hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */ - -/* Property list errors */ -hid_t H5E_CANTGET_g = FAIL; /* Can't get value */ -hid_t H5E_CANTSET_g = FAIL; /* Can't set value */ -hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */ -hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */ - -/* Free space errors */ -hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */ -hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */ -hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */ - #endif /* H5Edefin_H */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 56b9662..dc524f1 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -15,388 +15,410 @@ /* Add new errors to H5err.txt file */ -#ifndef _H5Einit_H -#define _H5Einit_H +#ifndef H5Einit_H +#define H5Einit_H /*********************/ /* Major error codes */ /*********************/ -HDassert(H5E_RESOURCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) +HDassert(H5E_INTERNAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_IO_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) +HDassert(H5E_DATASET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_REFERENCE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_FSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_SOHM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_DATASPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_CACHE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BTREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) +HDassert(H5E_IO_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) +HDassert(H5E_LINK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_RS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) +HDassert(H5E_NONE_MAJOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_STORAGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) +HDassert(H5E_ATTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FILE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibility"))==NULL) +HDassert(H5E_TST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_EFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_PLINE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_REFERENCE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL) +HDassert(H5E_ATOM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_ERROR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_VFL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_ARGS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_BTREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_RS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_RESOURCE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +HDassert(H5E_FUNC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_DATATYPE_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ATTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL) +HDassert(H5E_PLUGIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_OHDR_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FUNC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_VFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL) +HDassert(H5E_PLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_SYM_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) +HDassert(H5E_STORAGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_LINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL) +HDassert(H5E_FILE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibility"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NONE_MAJOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL) +HDassert(H5E_SLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") HDassert(H5E_HEAP_g==(-1)); if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_TST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL) + +/*********************/ +/* Minor error codes */ +/*********************/ + + +/* Property list errors */ +HDassert(H5E_CANTGET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL) +HDassert(H5E_CANTSET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_INTERNAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL) +HDassert(H5E_DUPCLASS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_EFL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL) +HDassert(H5E_SETDISALLOWED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLUGIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL) + +/* I/O pipeline errors */ +HDassert(H5E_NOFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL) +HDassert(H5E_CALLBACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SOHM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL) +HDassert(H5E_CANAPPLY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL) +HDassert(H5E_SETLOCAL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DATASPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL) +HDassert(H5E_NOENCODER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ARGS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL) +HDassert(H5E_CANTFILTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/*********************/ -/* Minor error codes */ -/*********************/ - - -/* Generic low-level file I/O errors */ -HDassert(H5E_SEEKERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) +/* Function entry/exit interface errors */ +HDassert(H5E_CANTINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_READERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) +HDassert(H5E_ALREADYINIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_WRITEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) +HDassert(H5E_CANTRELEASE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CLOSEERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) + +/* Object atom related errors */ +HDassert(H5E_BADATOM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_OVERFLOW_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) +HDassert(H5E_BADGROUP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_FCNTL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) +HDassert(H5E_CANTREGISTER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* B-tree related errors */ -HDassert(H5E_NOTFOUND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_EXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTENCODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDECODE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSPLIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREDISTRIBUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) +HDassert(H5E_CANTINC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSWAP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) +HDassert(H5E_CANTDEC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTINSERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) +HDassert(H5E_NOIDS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTLIST_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) + +/* Resource errors */ +HDassert(H5E_NOSPACE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTMODIFY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) +HDassert(H5E_CANTALLOC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) +HDassert(H5E_CANTCOPY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* System level errors */ -HDassert(H5E_SYSERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) +HDassert(H5E_CANTFREE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Dataspace errors */ -HDassert(H5E_CANTCLIP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) +HDassert(H5E_ALREADYEXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) +HDassert(H5E_CANTLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) +HDassert(H5E_CANTUNLOCK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTNEXT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) +HDassert(H5E_CANTGC_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADSELECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) +HDassert(H5E_CANTGETSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPARE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) +HDassert(H5E_OBJOPEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Object header related errors */ -HDassert(H5E_LINKCOUNT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) +/* No error */ +HDassert(H5E_NONE_MINOR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_VERSION_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) + +/* Heap errors */ +HDassert(H5E_CANTRESTORE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ALIGNMENT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) +HDassert(H5E_CANTCOMPUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADMESG_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) +HDassert(H5E_CANTEXTEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDELETE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) +HDassert(H5E_CANTATTACH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADITER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) +HDassert(H5E_CANTUPDATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTPACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) +HDassert(H5E_CANTOPERATE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRESET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) + +/* Argument errors */ +HDassert(H5E_UNINITIALIZED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRENAME_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) +HDassert(H5E_UNSUPPORTED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* No error */ -HDassert(H5E_NONE_MINOR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL) +HDassert(H5E_BADTYPE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Datatype conversion errors */ -HDassert(H5E_CANTCONVERT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) +HDassert(H5E_BADRANGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) +HDassert(H5E_BADVALUE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Group related errors */ -HDassert(H5E_CANTOPENOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCLOSEOBJ_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) +/* Parallel MPI errors */ +HDassert(H5E_MPI_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_COMPLEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) +HDassert(H5E_MPIERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PATH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) +HDassert(H5E_CANTRECV_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* File accessibility errors */ @@ -446,363 +468,341 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL) if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Heap errors */ -HDassert(H5E_CANTRESTORE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL) +/* Plugin errors */ +HDassert(H5E_OPENERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOMPUTE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL) + +/* Dataspace errors */ +HDassert(H5E_CANTCLIP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTEXTEND_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL) +HDassert(H5E_CANTCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTATTACH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL) +HDassert(H5E_CANTSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUPDATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL) +HDassert(H5E_CANTNEXT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTOPERATE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL) +HDassert(H5E_BADSELECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Cache related errors */ -HDassert(H5E_CANTFLUSH_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSERIALIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTLOAD_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) +HDassert(H5E_CANTCOMPARE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_PROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) + +/* Group related errors */ +HDassert(H5E_CANTOPENOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOTCACHED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) +HDassert(H5E_CANTCLOSEOBJ_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SYSTEM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) +HDassert(H5E_COMPLEN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTINS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) +HDassert(H5E_PATH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) + +/* B-tree related errors */ +HDassert(H5E_NOTFOUND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUNPROTECT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) +HDassert(H5E_EXISTS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) +HDassert(H5E_CANTENCODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUNPIN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) +HDassert(H5E_CANTDECODE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTMARKDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) +HDassert(H5E_CANTSPLIT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDIRTY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) +HDassert(H5E_CANTREDISTRIBUTE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTEXPUNGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) +HDassert(H5E_CANTSWAP_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRESIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) +HDassert(H5E_CANTINSERT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Parallel MPI errors */ -HDassert(H5E_MPI_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL) +HDassert(H5E_CANTLIST_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_MPIERRSTR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL) +HDassert(H5E_CANTMODIFY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRECV_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL) +HDassert(H5E_CANTREMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Link related errors */ -HDassert(H5E_TRAVERSE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NLINKS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) - HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) - HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOTREGISTERED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) +/* Free space errors */ +HDassert(H5E_CANTMERGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTMOVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) +HDassert(H5E_CANTREVIVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSORT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) +HDassert(H5E_CANTSHRINK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Resource errors */ -HDassert(H5E_NOSPACE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL) +/* Datatype conversion errors */ +HDassert(H5E_CANTCONVERT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTALLOC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL) +HDassert(H5E_BADSIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTCOPY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL) + +/* Object header related errors */ +HDassert(H5E_LINKCOUNT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_LINKCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTFREE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL) +HDassert(H5E_VERSION_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Wrong version number"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_VERSION_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ALREADYEXISTS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL) +HDassert(H5E_ALIGNMENT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Alignment error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_ALIGNMENT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL) +HDassert(H5E_BADMESG_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unrecognized message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADMESG_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTUNLOCK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL) +HDassert(H5E_CANTDELETE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't delete message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDELETE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTGC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL) +HDassert(H5E_BADITER_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Iteration failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_BADITER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTGETSIZE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL) +HDassert(H5E_CANTPACK_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't pack messages"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_OBJOPEN_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL) +HDassert(H5E_CANTRESET_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't reset object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Plugin errors */ -HDassert(H5E_OPENERROR_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL) +HDassert(H5E_CANTRENAME_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Argument errors */ -HDassert(H5E_UNINITIALIZED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL) +/* Link related errors */ +HDassert(H5E_TRAVERSE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link traversal failure"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_TRAVERSE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_UNSUPPORTED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL) +HDassert(H5E_NLINKS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Too many soft links in path"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NLINKS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADTYPE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL) +HDassert(H5E_NOTREGISTERED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Link class not registered"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTREGISTERED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADRANGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL) +HDassert(H5E_CANTMOVE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move object"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADVALUE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL) +HDassert(H5E_CANTSORT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Object atom related errors */ -HDassert(H5E_BADATOM_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL) +/* Generic low-level file I/O errors */ +HDassert(H5E_SEEKERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_BADGROUP_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL) +HDassert(H5E_READERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREGISTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL) +HDassert(H5E_WRITEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTINC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL) +HDassert(H5E_CLOSEERROR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTDEC_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL) +HDassert(H5E_OVERFLOW_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOIDS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL) +HDassert(H5E_FCNTL_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -/* Function entry/exit interface errors */ -HDassert(H5E_CANTINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to initialize object"))==NULL) +/* System level errors */ +HDassert(H5E_SYSERRSTR_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_ALREADYINIT_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already initialized"))==NULL) + +/* Cache related errors */ +HDassert(H5E_CANTFLUSH_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to flush data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_ALREADYINIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTFLUSH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTRELEASE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL) +HDassert(H5E_CANTSERIALIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to serialize data from cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTSERIALIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* I/O pipeline errors */ -HDassert(H5E_NOFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Requested filter is not available"))==NULL) +HDassert(H5E_CANTLOAD_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to load metadata into cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTLOAD_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CALLBACK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Callback failed"))==NULL) +HDassert(H5E_PROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Protected metadata error"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CALLBACK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_PROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANAPPLY_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'can apply' callback"))==NULL) +HDassert(H5E_NOTCACHED_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Metadata not currently cached"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANAPPLY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_NOTCACHED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SETLOCAL_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Error from filter 'set local' callback"))==NULL) +HDassert(H5E_SYSTEM_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Internal error detected"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETLOCAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_SYSTEM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_NOENCODER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter present but encoding disabled"))==NULL) +HDassert(H5E_CANTINS_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert metadata into cache"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_NOENCODER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTINS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTFILTER_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL) +HDassert(H5E_CANTPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to protect metadata"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Property list errors */ -HDassert(H5E_CANTGET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL) +HDassert(H5E_CANTUNPROTECT_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unprotect metadata"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNPROTECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSET_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL) +HDassert(H5E_CANTPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to pin cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_DUPCLASS_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL) +HDassert(H5E_CANTUNPIN_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to un-pin cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTUNPIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_SETDISALLOWED_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL) +HDassert(H5E_CANTMARKDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark a pinned entry as dirty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTMARKDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") - -/* Free space errors */ -HDassert(H5E_CANTMERGE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't merge objects"))==NULL) +HDassert(H5E_CANTDIRTY_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to mark metadata as dirty"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTMERGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTDIRTY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTREVIVE_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't revive object"))==NULL) +HDassert(H5E_CANTEXPUNGE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to expunge a metadata cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTREVIVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTEXPUNGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") -HDassert(H5E_CANTSHRINK_g==(-1)); -if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL) +HDassert(H5E_CANTRESIZE_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entry"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") -if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) +if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") #endif /* H5Einit_H */ diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index dd07c76..2ccd1a5 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -15,8 +15,8 @@ /* Add new errors to H5err.txt file */ -#ifndef _H5Epubgen_H -#define _H5Epubgen_H +#ifndef H5Epubgen_H +#define H5Epubgen_H #ifdef __cplusplus extern "C" { @@ -26,86 +26,226 @@ extern "C" { /* Major error codes */ /*********************/ -#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) -#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) +#define H5E_DATASET (H5OPEN H5E_DATASET_g) +#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) +#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) +#define H5E_SOHM (H5OPEN H5E_SOHM_g) +#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) #define H5E_CACHE (H5OPEN H5E_CACHE_g) -#define H5E_BTREE (H5OPEN H5E_BTREE_g) -#define H5E_ATOM (H5OPEN H5E_ATOM_g) -#define H5E_RS (H5OPEN H5E_RS_g) -#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) -#define H5E_FILE (H5OPEN H5E_FILE_g) +#define H5E_IO (H5OPEN H5E_IO_g) +#define H5E_LINK (H5OPEN H5E_LINK_g) +#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) +#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_TST (H5OPEN H5E_TST_g) +#define H5E_EFL (H5OPEN H5E_EFL_g) #define H5E_PLINE (H5OPEN H5E_PLINE_g) -#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g) +#define H5E_ATOM (H5OPEN H5E_ATOM_g) #define H5E_ERROR (H5OPEN H5E_ERROR_g) +#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_ARGS (H5OPEN H5E_ARGS_g) +#define H5E_BTREE (H5OPEN H5E_BTREE_g) +#define H5E_RS (H5OPEN H5E_RS_g) +#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g) +#define H5E_FUNC (H5OPEN H5E_FUNC_g) #define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g) -#define H5E_ATTR (H5OPEN H5E_ATTR_g) +#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) #define H5E_OHDR (H5OPEN H5E_OHDR_g) -#define H5E_FUNC (H5OPEN H5E_FUNC_g) -#define H5E_VFL (H5OPEN H5E_VFL_g) +#define H5E_PLIST (H5OPEN H5E_PLIST_g) #define H5E_SYM (H5OPEN H5E_SYM_g) +#define H5E_STORAGE (H5OPEN H5E_STORAGE_g) +#define H5E_FILE (H5OPEN H5E_FILE_g) #define H5E_SLIST (H5OPEN H5E_SLIST_g) -#define H5E_LINK (H5OPEN H5E_LINK_g) -#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g) #define H5E_HEAP (H5OPEN H5E_HEAP_g) -#define H5E_TST (H5OPEN H5E_TST_g) -#define H5E_FSPACE (H5OPEN H5E_FSPACE_g) -#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g) -#define H5E_EFL (H5OPEN H5E_EFL_g) -#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g) -#define H5E_DATASET (H5OPEN H5E_DATASET_g) -#define H5E_SOHM (H5OPEN H5E_SOHM_g) -#define H5E_PLIST (H5OPEN H5E_PLIST_g) -#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g) -#define H5E_ARGS (H5OPEN H5E_ARGS_g) -H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ -H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ +H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ +H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ +H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ +H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ +H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */ -H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ -H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ -H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ -H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ -H5_DLLVAR hid_t H5E_FILE_g; /* File accessibility */ +H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */ +H5_DLLVAR hid_t H5E_LINK_g; /* Links */ +H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ +H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ +H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */ -H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */ +H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */ H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */ +H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ +H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */ +H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */ +H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */ +H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */ -H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */ +H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */ -H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */ -H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */ +H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */ +H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */ +H5_DLLVAR hid_t H5E_FILE_g; /* File accessibility */ H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */ -H5_DLLVAR hid_t H5E_LINK_g; /* Links */ -H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */ H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */ -H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */ -H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */ -H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */ -H5_DLLVAR hid_t H5E_EFL_g; /* External file list */ -H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */ -H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */ -H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */ -H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */ -H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */ -H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */ /*********************/ /* Minor error codes */ /*********************/ -/* Generic low-level file I/O errors */ -#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) -#define H5E_READERROR (H5OPEN H5E_READERROR_g) -#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) -#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) -#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) -#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) -H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ -H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ -H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ -H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ -H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ -H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ +/* Property list errors */ +#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) +#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) +#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) +#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) +H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ +H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ +H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ +H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ + +/* I/O pipeline errors */ +#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) +#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) +#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) +#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) +#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) +#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) +H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ +H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ +H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ +H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ +H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ +H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ + +/* Function entry/exit interface errors */ +#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) +#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) +#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) +H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ +H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ +H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ + +/* Object atom related errors */ +#define H5E_BADATOM (H5OPEN H5E_BADATOM_g) +#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g) +#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g) +#define H5E_CANTINC (H5OPEN H5E_CANTINC_g) +#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g) +#define H5E_NOIDS (H5OPEN H5E_NOIDS_g) +H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */ +H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */ +H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */ +H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ +H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ +H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ + +/* Resource errors */ +#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) +#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) +#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) +#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) +#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) +#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) +#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) +#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) +#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) +#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) +H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ +H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ +H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ +H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ +H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ +H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ +H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ +H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */ +H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */ +H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */ + +/* No error */ +#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) +H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ + +/* Heap errors */ +#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) +#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) +#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) +#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) +#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) +#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) +H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ +H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ +H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ +H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ +H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ +H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ + +/* Argument errors */ +#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) +#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) +#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) +#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) +#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) +H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ +H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ +H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ +H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ +H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ + +/* Parallel MPI errors */ +#define H5E_MPI (H5OPEN H5E_MPI_g) +#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) +#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) +H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ +H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ +H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ + +/* File accessibility errors */ +#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) +#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) +#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) +#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) +#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) +#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) +#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) +#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) +#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) +H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ +H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ +H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ +H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ +H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ +H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ +H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ +H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ +H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ + +/* Plugin errors */ +#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) +H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ + +/* Dataspace errors */ +#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) +#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) +#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) +#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) +#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) +#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) +H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ +H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ +H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ +H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ +H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ +H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ + +/* Group related errors */ +#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) +#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) +#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) +#define H5E_PATH (H5OPEN H5E_PATH_g) +H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ +H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ +H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ +H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ /* B-tree related errors */ #define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g) @@ -131,23 +271,19 @@ H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */ H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */ H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */ -/* System level errors */ -#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) -H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ +/* Free space errors */ +#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) +#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) +#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) +H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ +H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ +H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ -/* Dataspace errors */ -#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g) -#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g) -#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g) -#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) -#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) -#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) -H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ -H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ -H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ -H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ -H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ -H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ +/* Datatype conversion errors */ +#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) +#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) +H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ +H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ /* Object header related errors */ #define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g) @@ -169,59 +305,35 @@ H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */ H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */ H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */ -/* No error */ -#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g) -H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */ - -/* Datatype conversion errors */ -#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g) -#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g) -H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */ -H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */ - -/* Group related errors */ -#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g) -#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g) -#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g) -#define H5E_PATH (H5OPEN H5E_PATH_g) -H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */ -H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */ -H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */ -H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */ +/* Link related errors */ +#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) +#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) +#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) +#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) +#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) +H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ +H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ +H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ +H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ +H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ -/* File accessibility errors */ -#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g) -#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g) -#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g) -#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g) -#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g) -#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g) -#define H5E_BADFILE (H5OPEN H5E_BADFILE_g) -#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g) -#define H5E_MOUNT (H5OPEN H5E_MOUNT_g) -H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */ -H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */ -H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */ -H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */ -H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */ -H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */ -H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */ -H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */ -H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */ +/* Generic low-level file I/O errors */ +#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g) +#define H5E_READERROR (H5OPEN H5E_READERROR_g) +#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g) +#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g) +#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g) +#define H5E_FCNTL (H5OPEN H5E_FCNTL_g) +H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */ +H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */ +H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */ +H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */ +H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */ +H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */ -/* Heap errors */ -#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g) -#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g) -#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g) -#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g) -#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g) -#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g) -H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */ -H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */ -H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */ -H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */ -H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */ -H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */ +/* System level errors */ +#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g) +H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */ /* Cache related errors */ #define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g) @@ -255,118 +367,6 @@ H5_DLLVAR hid_t H5E_CANTDIRTY_g; /* Unable to mark metadata as dirty */ H5_DLLVAR hid_t H5E_CANTEXPUNGE_g; /* Unable to expunge a metadata cache entry */ H5_DLLVAR hid_t H5E_CANTRESIZE_g; /* Unable to resize a metadata cache entry */ -/* Parallel MPI errors */ -#define H5E_MPI (H5OPEN H5E_MPI_g) -#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g) -#define H5E_CANTRECV (H5OPEN H5E_CANTRECV_g) -H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */ -H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */ -H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ - -/* Link related errors */ -#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g) -#define H5E_NLINKS (H5OPEN H5E_NLINKS_g) -#define H5E_NOTREGISTERED (H5OPEN H5E_NOTREGISTERED_g) -#define H5E_CANTMOVE (H5OPEN H5E_CANTMOVE_g) -#define H5E_CANTSORT (H5OPEN H5E_CANTSORT_g) -H5_DLLVAR hid_t H5E_TRAVERSE_g; /* Link traversal failure */ -H5_DLLVAR hid_t H5E_NLINKS_g; /* Too many soft links in path */ -H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */ -H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */ -H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */ - -/* Resource errors */ -#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g) -#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g) -#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g) -#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g) -#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g) -#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g) -#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g) -#define H5E_CANTGC (H5OPEN H5E_CANTGC_g) -#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g) -#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g) -H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */ -H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */ -H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */ -H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */ -H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */ -H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */ -H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */ -H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */ -H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */ -H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */ - -/* Plugin errors */ -#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g) -H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */ - -/* Argument errors */ -#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) -#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g) -#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g) -#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g) -#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g) -H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */ -H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */ -H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */ -H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */ -H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */ - -/* Object atom related errors */ -#define H5E_BADATOM (H5OPEN H5E_BADATOM_g) -#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g) -#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g) -#define H5E_CANTINC (H5OPEN H5E_CANTINC_g) -#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g) -#define H5E_NOIDS (H5OPEN H5E_NOIDS_g) -H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */ -H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */ -H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */ -H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */ -H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */ -H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */ - -/* Function entry/exit interface errors */ -#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g) -#define H5E_ALREADYINIT (H5OPEN H5E_ALREADYINIT_g) -#define H5E_CANTRELEASE (H5OPEN H5E_CANTRELEASE_g) -H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */ -H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */ -H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */ - -/* I/O pipeline errors */ -#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g) -#define H5E_CALLBACK (H5OPEN H5E_CALLBACK_g) -#define H5E_CANAPPLY (H5OPEN H5E_CANAPPLY_g) -#define H5E_SETLOCAL (H5OPEN H5E_SETLOCAL_g) -#define H5E_NOENCODER (H5OPEN H5E_NOENCODER_g) -#define H5E_CANTFILTER (H5OPEN H5E_CANTFILTER_g) -H5_DLLVAR hid_t H5E_NOFILTER_g; /* Requested filter is not available */ -H5_DLLVAR hid_t H5E_CALLBACK_g; /* Callback failed */ -H5_DLLVAR hid_t H5E_CANAPPLY_g; /* Error from filter 'can apply' callback */ -H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback */ -H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */ -H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */ - -/* Property list errors */ -#define H5E_CANTGET (H5OPEN H5E_CANTGET_g) -#define H5E_CANTSET (H5OPEN H5E_CANTSET_g) -#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g) -#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g) -H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */ -H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */ -H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */ -H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */ - -/* Free space errors */ -#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g) -#define H5E_CANTREVIVE (H5OPEN H5E_CANTREVIVE_g) -#define H5E_CANTSHRINK (H5OPEN H5E_CANTSHRINK_g) -H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */ -H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */ -H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */ - #ifdef __cplusplus } #endif diff --git a/src/H5Epublic.h b/src/H5Epublic.h index dc8e079..72c3884 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -32,8 +32,8 @@ typedef enum H5E_type_t { H5E_MAJOR, H5E_MINOR } H5E_type_t; /* Information about an error; element of error stack */ typedef struct H5E_error2_t { hid_t cls_id; /*class ID */ - hid_t maj_num; /*major error ID */ - hid_t min_num; /*minor error number */ + hid_t maj_num; /*major error ID */ + hid_t min_num; /*minor error number */ unsigned line; /*line in file where error occurs */ const char *func_name; /*function in which error occurred */ const char *file_name; /*file in which error occurred */ @@ -42,11 +42,11 @@ typedef struct H5E_error2_t { /* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* HDF5 error class */ #define H5E_ERR_CLS (H5OPEN H5E_ERR_CLS_g) @@ -61,12 +61,12 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g; * trying something that's likely or expected to fail. The code to try can * be nested between calls to H5Eget_auto() and H5Eset_auto(), but it's * easier just to use this macro like: - * H5E_BEGIN_TRY { - * ...stuff here that's likely to fail... + * H5E_BEGIN_TRY { + * ...stuff here that's likely to fail... * } H5E_END_TRY; * * Warning: don't break, return, or longjmp() from the body of the loop or - * the error reporting won't be properly restored! + * the error reporting won't be properly restored! * * These two macros still use the old API functions for backward compatibility * purpose. @@ -124,10 +124,10 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g; /* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */ /* And return after pushing error onto stack */ #define H5Epush_ret(func, cls, maj, min, str, ret) \ - { \ + do { \ H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \ return (ret); \ - } + } while (0) /* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in * And goto a label after pushing error onto stack. diff --git a/src/H5Eterm.h b/src/H5Eterm.h index e6b2f07..34cf06a 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -15,53 +15,135 @@ /* Add new errors to H5err.txt file */ -#ifndef _H5Eterm_H -#define _H5Eterm_H +#ifndef H5Eterm_H +#define H5Eterm_H /* Reset major error IDs */ -H5E_RESOURCE_g= -H5E_IO_g= -H5E_CACHE_g= -H5E_BTREE_g= -H5E_ATOM_g= -H5E_RS_g= -H5E_STORAGE_g= -H5E_FILE_g= -H5E_PLINE_g= +H5E_INTERNAL_g= +H5E_DATASET_g= H5E_REFERENCE_g= -H5E_ERROR_g= -H5E_DATATYPE_g= -H5E_ATTR_g= -H5E_OHDR_g= -H5E_FUNC_g= -H5E_VFL_g= -H5E_SYM_g= -H5E_SLIST_g= +H5E_FSPACE_g= +H5E_SOHM_g= +H5E_DATASPACE_g= +H5E_CACHE_g= +H5E_IO_g= H5E_LINK_g= H5E_NONE_MAJOR_g= -H5E_HEAP_g= +H5E_ATTR_g= H5E_TST_g= -H5E_FSPACE_g= -H5E_INTERNAL_g= H5E_EFL_g= +H5E_PLINE_g= +H5E_ATOM_g= +H5E_ERROR_g= +H5E_VFL_g= +H5E_ARGS_g= +H5E_BTREE_g= +H5E_RS_g= +H5E_RESOURCE_g= +H5E_FUNC_g= +H5E_DATATYPE_g= H5E_PLUGIN_g= -H5E_DATASET_g= -H5E_SOHM_g= +H5E_OHDR_g= H5E_PLIST_g= -H5E_DATASPACE_g= -H5E_ARGS_g= (-1); +H5E_SYM_g= +H5E_STORAGE_g= +H5E_FILE_g= +H5E_SLIST_g= +H5E_HEAP_g= (-1); /* Reset minor error IDs */ -/* Generic low-level file I/O errors */ -H5E_SEEKERROR_g= -H5E_READERROR_g= -H5E_WRITEERROR_g= -H5E_CLOSEERROR_g= -H5E_OVERFLOW_g= -H5E_FCNTL_g= +/* Property list errors */ +H5E_CANTGET_g= +H5E_CANTSET_g= +H5E_DUPCLASS_g= +H5E_SETDISALLOWED_g= + +/* I/O pipeline errors */ +H5E_NOFILTER_g= +H5E_CALLBACK_g= +H5E_CANAPPLY_g= +H5E_SETLOCAL_g= +H5E_NOENCODER_g= +H5E_CANTFILTER_g= + +/* Function entry/exit interface errors */ +H5E_CANTINIT_g= +H5E_ALREADYINIT_g= +H5E_CANTRELEASE_g= + +/* Object atom related errors */ +H5E_BADATOM_g= +H5E_BADGROUP_g= +H5E_CANTREGISTER_g= +H5E_CANTINC_g= +H5E_CANTDEC_g= +H5E_NOIDS_g= + +/* Resource errors */ +H5E_NOSPACE_g= +H5E_CANTALLOC_g= +H5E_CANTCOPY_g= +H5E_CANTFREE_g= +H5E_ALREADYEXISTS_g= +H5E_CANTLOCK_g= +H5E_CANTUNLOCK_g= +H5E_CANTGC_g= +H5E_CANTGETSIZE_g= +H5E_OBJOPEN_g= + +/* No error */ +H5E_NONE_MINOR_g= + +/* Heap errors */ +H5E_CANTRESTORE_g= +H5E_CANTCOMPUTE_g= +H5E_CANTEXTEND_g= +H5E_CANTATTACH_g= +H5E_CANTUPDATE_g= +H5E_CANTOPERATE_g= + +/* Argument errors */ +H5E_UNINITIALIZED_g= +H5E_UNSUPPORTED_g= +H5E_BADTYPE_g= +H5E_BADRANGE_g= +H5E_BADVALUE_g= + +/* Parallel MPI errors */ +H5E_MPI_g= +H5E_MPIERRSTR_g= +H5E_CANTRECV_g= + +/* File accessibility errors */ +H5E_FILEEXISTS_g= +H5E_FILEOPEN_g= +H5E_CANTCREATE_g= +H5E_CANTOPENFILE_g= +H5E_CANTCLOSEFILE_g= +H5E_NOTHDF5_g= +H5E_BADFILE_g= +H5E_TRUNCATED_g= +H5E_MOUNT_g= + +/* Plugin errors */ +H5E_OPENERROR_g= + +/* Dataspace errors */ +H5E_CANTCLIP_g= +H5E_CANTCOUNT_g= +H5E_CANTSELECT_g= +H5E_CANTNEXT_g= +H5E_BADSELECT_g= +H5E_CANTCOMPARE_g= + +/* Group related errors */ +H5E_CANTOPENOBJ_g= +H5E_CANTCLOSEOBJ_g= +H5E_COMPLEN_g= +H5E_PATH_g= /* B-tree related errors */ H5E_NOTFOUND_g= @@ -76,16 +158,14 @@ H5E_CANTLIST_g= H5E_CANTMODIFY_g= H5E_CANTREMOVE_g= -/* System level errors */ -H5E_SYSERRSTR_g= +/* Free space errors */ +H5E_CANTMERGE_g= +H5E_CANTREVIVE_g= +H5E_CANTSHRINK_g= -/* Dataspace errors */ -H5E_CANTCLIP_g= -H5E_CANTCOUNT_g= -H5E_CANTSELECT_g= -H5E_CANTNEXT_g= -H5E_BADSELECT_g= -H5E_CANTCOMPARE_g= +/* Datatype conversion errors */ +H5E_CANTCONVERT_g= +H5E_BADSIZE_g= /* Object header related errors */ H5E_LINKCOUNT_g= @@ -98,37 +178,23 @@ H5E_CANTPACK_g= H5E_CANTRESET_g= H5E_CANTRENAME_g= -/* No error */ -H5E_NONE_MINOR_g= - -/* Datatype conversion errors */ -H5E_CANTCONVERT_g= -H5E_BADSIZE_g= - -/* Group related errors */ -H5E_CANTOPENOBJ_g= -H5E_CANTCLOSEOBJ_g= -H5E_COMPLEN_g= -H5E_PATH_g= +/* Link related errors */ +H5E_TRAVERSE_g= +H5E_NLINKS_g= +H5E_NOTREGISTERED_g= +H5E_CANTMOVE_g= +H5E_CANTSORT_g= -/* File accessibility errors */ -H5E_FILEEXISTS_g= -H5E_FILEOPEN_g= -H5E_CANTCREATE_g= -H5E_CANTOPENFILE_g= -H5E_CANTCLOSEFILE_g= -H5E_NOTHDF5_g= -H5E_BADFILE_g= -H5E_TRUNCATED_g= -H5E_MOUNT_g= +/* Generic low-level file I/O errors */ +H5E_SEEKERROR_g= +H5E_READERROR_g= +H5E_WRITEERROR_g= +H5E_CLOSEERROR_g= +H5E_OVERFLOW_g= +H5E_FCNTL_g= -/* Heap errors */ -H5E_CANTRESTORE_g= -H5E_CANTCOMPUTE_g= -H5E_CANTEXTEND_g= -H5E_CANTATTACH_g= -H5E_CANTUPDATE_g= -H5E_CANTOPERATE_g= +/* System level errors */ +H5E_SYSERRSTR_g= /* Cache related errors */ H5E_CANTFLUSH_g= @@ -145,72 +211,6 @@ H5E_CANTUNPIN_g= H5E_CANTMARKDIRTY_g= H5E_CANTDIRTY_g= H5E_CANTEXPUNGE_g= -H5E_CANTRESIZE_g= - -/* Parallel MPI errors */ -H5E_MPI_g= -H5E_MPIERRSTR_g= -H5E_CANTRECV_g= - -/* Link related errors */ -H5E_TRAVERSE_g= -H5E_NLINKS_g= -H5E_NOTREGISTERED_g= -H5E_CANTMOVE_g= -H5E_CANTSORT_g= - -/* Resource errors */ -H5E_NOSPACE_g= -H5E_CANTALLOC_g= -H5E_CANTCOPY_g= -H5E_CANTFREE_g= -H5E_ALREADYEXISTS_g= -H5E_CANTLOCK_g= -H5E_CANTUNLOCK_g= -H5E_CANTGC_g= -H5E_CANTGETSIZE_g= -H5E_OBJOPEN_g= - -/* Plugin errors */ -H5E_OPENERROR_g= - -/* Argument errors */ -H5E_UNINITIALIZED_g= -H5E_UNSUPPORTED_g= -H5E_BADTYPE_g= -H5E_BADRANGE_g= -H5E_BADVALUE_g= - -/* Object atom related errors */ -H5E_BADATOM_g= -H5E_BADGROUP_g= -H5E_CANTREGISTER_g= -H5E_CANTINC_g= -H5E_CANTDEC_g= -H5E_NOIDS_g= - -/* Function entry/exit interface errors */ -H5E_CANTINIT_g= -H5E_ALREADYINIT_g= -H5E_CANTRELEASE_g= - -/* I/O pipeline errors */ -H5E_NOFILTER_g= -H5E_CALLBACK_g= -H5E_CANAPPLY_g= -H5E_SETLOCAL_g= -H5E_NOENCODER_g= -H5E_CANTFILTER_g= - -/* Property list errors */ -H5E_CANTGET_g= -H5E_CANTSET_g= -H5E_DUPCLASS_g= -H5E_SETDISALLOWED_g= - -/* Free space errors */ -H5E_CANTMERGE_g= -H5E_CANTREVIVE_g= -H5E_CANTSHRINK_g= (-1); +H5E_CANTRESIZE_g= (-1); #endif /* H5Eterm_H */ diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h index b8a9f5b..0a41728 100644 --- a/src/H5FDdirect.h +++ b/src/H5FDdirect.h @@ -23,7 +23,7 @@ #ifdef H5_HAVE_DIRECT #define H5FD_DIRECT (H5FD_direct_init()) #else -#define H5FD_DIRECT (-1) +#define H5FD_DIRECT (H5I_INVALID_HID) #endif /* H5_HAVE_DIRECT */ #ifdef H5_HAVE_DIRECT diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h index a5d08b2..6692ed6 100644 --- a/src/H5FDhdfs.h +++ b/src/H5FDhdfs.h @@ -25,7 +25,7 @@ #ifdef H5_HAVE_LIBHDFS #define H5FD_HDFS (H5FD_hdfs_init()) #else /* H5_HAVE_LIBHDFS */ -#define H5FD_HDFS (-1) +#define H5FD_HDFS (H5I_INVALID_HID) #endif /* H5_HAVE_LIBHDFS */ /**************************************************************************** diff --git a/src/H5FDlog.c b/src/H5FDlog.c index a14e0de..26d4794 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -365,9 +365,9 @@ H5FD_log_fapl_get(H5FD_t *_file) static void * H5FD_log_fapl_copy(const void *_old_fa) { - const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t *)_old_fa; - H5FD_log_fapl_t * new_fa = NULL; /* New FAPL info */ - void * ret_value; /* Return value */ + const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t *)_old_fa; + H5FD_log_fapl_t * new_fa = NULL; /* New FAPL info */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -458,7 +458,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) struct timeval stat_timeval_diff; #endif /* H5_HAVE_GETTIMEOFDAY */ h5_stat_t sb; - H5FD_t * ret_value; /* Return value */ + H5FD_t * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h index ee1f905..5446b77 100644 --- a/src/H5FDmpio.h +++ b/src/H5FDmpio.h @@ -25,7 +25,7 @@ #ifdef H5_HAVE_PARALLEL #define H5FD_MPIO (H5FD_mpio_init()) #else -#define H5FD_MPIO (-1) +#define H5FD_MPIO (H5I_INVALID_HID) #endif /* H5_HAVE_PARALLEL */ #ifdef H5_HAVE_PARALLEL diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index a2641bc..943a679 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -435,12 +435,12 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Check arguments and supply default values */ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1) if (!memb_map) - { - for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) - _memb_map[mt] = H5FD_MEM_DEFAULT; - memb_map = _memb_map; - } + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1); + if (!memb_map) { + for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) + _memb_map[mt] = H5FD_MEM_DEFAULT; + memb_map = _memb_map; + } if (!memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS); @@ -464,19 +464,20 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Map usage type */ mmt = memb_map[mt]; if (mmt < 0 || mmt >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", - -1) if (H5FD_MEM_DEFAULT == mmt) mmt = mt; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1); + if (H5FD_MEM_DEFAULT == mmt) + mmt = mt; /* * All members of MEMB_FAPL must be either defaults or actual file * access property lists. */ if (H5P_DEFAULT != memb_fapl[mmt] && TRUE != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1); - /* All names must be defined */ - if (!memb_name[mmt] || !memb_name[mmt][0]) H5Epush_ret( - func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1) + /* All names must be defined */ + if (!memb_name[mmt] || !memb_name[mmt][0]) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1); } /* @@ -527,13 +528,14 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl H5Eclear2(H5E_DEFAULT); if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", - -1) if (H5FD_MULTI != H5Pget_driver(fapl_id)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", - -1) if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1) - - if (memb_map) memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1); + if (H5FD_MULTI != H5Pget_driver(fapl_id)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1); + if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1); + + if (memb_map) + memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); if (memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { if (fa->memb_fapl[mt] >= 0) @@ -670,10 +672,10 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out } END_MEMBERS; if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); - /* Encode all name templates */ - p = buf + 8 + nseen * 2 * 8; + /* Encode all name templates */ + p = buf + 8 + nseen * 2 * 8; UNIQUE_MEMBERS(file->fa.memb_map, mt) { size_t n = strlen(file->fa.memb_name[mt]) + 1; @@ -728,15 +730,15 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Make sure the name/version number is correct */ if (strcmp(name, "NCSAmult")) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1); - /* Set default values */ - ALL_MEMBERS(mt) - { - memb_addr[mt] = HADDR_UNDEF; - memb_eoa[mt] = HADDR_UNDEF; - memb_name[mt] = NULL; - } + /* Set default values */ + ALL_MEMBERS(mt) + { + memb_addr[mt] = HADDR_UNDEF; + memb_eoa[mt] = HADDR_UNDEF; + memb_name[mt] = NULL; + } END_MEMBERS; /* @@ -759,9 +761,9 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memcpy(x, buf, (nseen * 2 * 8)); buf += nseen * 2 * 8; if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen * 2, x, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) - ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - - 2019/07/05, QAK */ + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); + ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - + 2019/07/05, QAK */ UNIQUE_MEMBERS(map, mt) { memb_addr[_unmapped] = *ap++; @@ -816,23 +818,23 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } END_MEMBERS; if (compute_next(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1); - /* Open all necessary files */ - if (open_members(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1) + /* Open all necessary files */ + if (open_members(file) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1); - /* Set the EOA marker for all open files */ - UNIQUE_MEMBERS(file->fa.memb_map, mt) - { - if (file->memb[mt]) - if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1) + /* Set the EOA marker for all open files */ + UNIQUE_MEMBERS(file->fa.memb_map, mt) + { + if (file->memb[mt]) + if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1); - /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) - */ - file->memb_eoa[mt] = memb_eoa[mt]; - } + /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) + */ + file->memb_eoa[mt] = memb_eoa[mt]; + } END_MEMBERS; return 0; @@ -918,7 +920,7 @@ H5FD_multi_fapl_copy(const void *_old_fa) } END_MEMBERS; free(new_fa); - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "invalid freespace objects", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "invalid freespace objects", NULL); } return new_fa; } @@ -950,8 +952,9 @@ H5FD_multi_fapl_free(void *_fa) { if (fa->memb_fapl[mt] >= 0) if (H5Pclose(fa->memb_fapl[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", - -1) if (fa->memb_name[mt]) free(fa->memb_name[mt]); + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1); + if (fa->memb_name[mt]) + free(fa->memb_name[mt]); } END_MEMBERS; free(fa); @@ -989,25 +992,24 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", - NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL); + if (0 == maxaddr || HADDR_UNDEF == maxaddr) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL); - /* - * Initialize the file from the file access properties, using default - * values if necessary. Make sure to use CALLOC here because the code - * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa - * in H5FD_multi_t. - */ - if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) H5Epush_ret( - func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", - NULL) if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) - { - close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); - if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) - H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) - } - fa = (H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); + /* + * Initialize the file from the file access properties, using default + * values if necessary. Make sure to use CALLOC here because the code + * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa + * in H5FD_multi_t. + */ + if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); + if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) { + close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); + if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) + H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) + } + fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); assert(fa); ALL_MEMBERS(mt) { @@ -1104,16 +1106,16 @@ H5FD_multi_close(H5FD_t *_file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1); - /* Clean up other stuff */ - ALL_MEMBERS(mt) - { - if (file->fa.memb_fapl[mt] >= 0) - (void)H5Pclose(file->fa.memb_fapl[mt]); - if (file->fa.memb_name[mt]) - free(file->fa.memb_name[mt]); - } + /* Clean up other stuff */ + ALL_MEMBERS(mt) + { + if (file->fa.memb_fapl[mt] >= 0) + (void)H5Pclose(file->fa.memb_fapl[mt]); + if (file->fa.memb_name[mt]) + free(file->fa.memb_name[mt]); + } END_MEMBERS; free(file->name); @@ -1268,7 +1270,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) + HADDR_UNDEF); } else if (file->fa.relax) { /* @@ -1279,7 +1281,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != memb_eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } if (memb_eoa > eoa) @@ -1299,7 +1301,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (eoa > 0) eoa += file->fa.memb_addr[mmt]; + HADDR_UNDEF); + if (eoa > 0) + eoa += file->fa.memb_addr[mmt]; } else if (file->fa.relax) { /* @@ -1310,7 +1314,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } } @@ -1368,9 +1372,9 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) H5E_BEGIN_TRY { status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); } H5E_END_TRY; if (status < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1); - return 0; + return 0; } /* end H5FD_multi_set_eoa() */ /*------------------------------------------------------------------------- @@ -1410,7 +1414,9 @@ H5FD_multi_get_eof(const H5FD_t *_file) if (HADDR_UNDEF == tmp_eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", - HADDR_UNDEF) if (tmp_eof > 0) tmp_eof += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (tmp_eof > 0) + tmp_eof += file->fa.memb_addr[mt]; /* Retrieve EOA */ H5E_BEGIN_TRY { tmp_eoa = H5FDget_eoa(file->memb[mt], mt); } @@ -1418,7 +1424,9 @@ H5FD_multi_get_eof(const H5FD_t *_file) if (HADDR_UNDEF == tmp_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (tmp_eoa > 0) tmp_eoa += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (tmp_eoa > 0) + tmp_eoa += file->fa.memb_addr[mt]; } else if (file->fa.relax) { /* @@ -1432,7 +1440,7 @@ H5FD_multi_get_eof(const H5FD_t *_file) assert(HADDR_UNDEF != tmp_eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF); } if (tmp_eof > eof) @@ -1467,9 +1475,10 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get data type for multi driver */ if (H5Pget_multi_type(fapl, &type) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't get data type for multi driver", - -1) if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1) mmt = - file->fa.memb_map[type]; + -1); + if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1); + mmt = file->fa.memb_map[type]; if (H5FD_MEM_DEFAULT == mmt) mmt = type; @@ -1503,8 +1512,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) mmt = type; if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF) - addr += file->fa.memb_addr[mmt]; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF); + addr += file->fa.memb_addr[mmt]; /*#ifdef TMP if ( addr + size > file->eoa ) { @@ -1512,7 +1521,7 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \ - "can't set eoa", HADDR_UNDEF) + "can't set eoa", HADDR_UNDEF); } } #else @@ -1680,26 +1689,26 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing) H5FD_mem_t mmt; /* Debugging stuff... */ - HDfprintf(stderr, "multifile access information:\n"); + fprintf(stderr, "multifile access information:\n"); /* print the map */ - HDfprintf(stderr, " map="); + fprintf(stderr, " map="); for (mt=1; mtmemb_map[mt]; if (H5FD_MEM_DEFAULT==mmt) mmt = mt; - HDfprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt); + fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt); } - HDfprintf(stderr, "\n"); + fprintf(stderr, "\n"); /* print info about each file */ - HDfprintf(stderr, " File Starting Allocated Next Member\n"); - HDfprintf(stderr, " Number Address Size Address Name\n"); - HDfprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n"); + fprintf(stderr, " File Starting Allocated Next Member\n"); + fprintf(stderr, " Number Address Size Address Name\n"); + fprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n"); for (mt=1; mtmemb_addr[mt]) { haddr_t eoa = H5FDget_eoa(file->memb[mt], mt); - HDfprintf(stderr, " %6d %20llu %20llu %20llu %s\n", + fprintf(stderr, " %6d %20llu %20llu %20llu %s\n", (int)mt, (unsigned long long)(file->memb_addr[mt]), (unsigned long long)eoa, (unsigned long long)(file->memb_next[mt]), @@ -1723,9 +1732,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1); - return 0; + return 0; } /*------------------------------------------------------------------------- @@ -1764,9 +1773,9 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1); - return 0; + return 0; } /* end H5FD_multi_truncate() */ /*------------------------------------------------------------------------- @@ -1862,13 +1871,13 @@ open_members(H5FD_multi_t *file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1); - return 0; + return 0; } H5_GCC_DIAG_ON("format-nonliteral") -#ifdef _H5private_H +#ifdef H5private_H /* * This is not related to the functionality of the driver code. * It is added here to trigger warning if HDF5 private definitions are included diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 631d96d..67b7c5a 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -235,6 +235,7 @@ H5FD_stdio_init(void) if (H5I_VFL != H5Iget_type(H5FD_STDIO_g)) H5FD_STDIO_g = H5FDregister(&H5FD_stdio_g); + return H5FD_STDIO_g; } /* end H5FD_stdio_init() */ @@ -284,9 +285,9 @@ H5Pset_fapl_stdio(hid_t fapl_id) H5Eclear2(H5E_DEFAULT); if (0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1); - return H5Pset_driver(fapl_id, H5FD_STDIO, NULL); + return H5Pset_driver(fapl_id, H5FD_STDIO, NULL); } /* end H5Pset_fapl_stdio() */ /*------------------------------------------------------------------------- @@ -337,14 +338,15 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", - NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", - NULL) if (ADDR_OVERFLOW(maxaddr)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL) - - /* Tentatively open file in read-only mode, to check for existence */ - if (flags & H5F_ACC_RDWR) f = fopen(name, "rb+"); + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL); + if (0 == maxaddr || HADDR_UNDEF == maxaddr) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL); + if (ADDR_OVERFLOW(maxaddr)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL); + + /* Tentatively open file in read-only mode, to check for existence */ + if (flags & H5F_ACC_RDWR) + f = fopen(name, "rb+"); else f = fopen(name, "rb"); @@ -357,14 +359,14 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr } else H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, - "file doesn't exist and CREAT wasn't specified", NULL) + "file doesn't exist and CREAT wasn't specified", NULL); } else if (flags & H5F_ACC_EXCL) { /* File exists, but EXCL is passed. Fail. */ assert(flags & H5F_ACC_CREAT); fclose(f); H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_FILEEXISTS, - "file exists but CREAT and EXCL were specified", NULL) + "file exists but CREAT and EXCL were specified", NULL); } else if (flags & H5F_ACC_RDWR) { if (flags & H5F_ACC_TRUNC) @@ -375,14 +377,13 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr * as the tentative open will work */ if (!f) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL); - /* Build the return value */ - if (NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t)))) - { - fclose(f); - H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL) - } /* end if */ + /* Build the return value */ + if (NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t)))) { + fclose(f); + H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); + } /* end if */ file->fp = f; file->op = H5FD_STDIO_OP_SEEK; file->pos = HADDR_UNDEF; @@ -430,7 +431,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr if (fstat(file->fd, &sb) < 0) { free(file); fclose(f); - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL); } /* end if */ file->device = sb.st_dev; file->inode = sb.st_ino; @@ -464,9 +465,9 @@ H5FD_stdio_close(H5FD_t *_file) H5Eclear2(H5E_DEFAULT); if (fclose(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1); - free(file); + free(file); return 0; } /* end H5FD_stdio_close() */ @@ -733,9 +734,9 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) *file_handle = &(file->fp); if (*file_handle == NULL) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1); - return 0; + return 0; } /* end H5FD_stdio_get_handle() */ /*------------------------------------------------------------------------- @@ -771,12 +772,13 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz /* Check for overflow */ if (HADDR_UNDEF == addr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", - -1) if (REGION_OVERFLOW(addr, size)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + if (REGION_OVERFLOW(addr, size)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); - /* Check easy cases */ - if (0 == size) return 0; + /* Check easy cases */ + if (0 == size) + return 0; if ((haddr_t)addr >= file->eof) { memset(buf, 0, size); return 0; @@ -787,7 +789,7 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1); } file->pos = addr; } @@ -819,7 +821,7 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz if (0 == bytes_read && ferror(file->fp)) { /* error */ file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1); } /* end if */ if (0 == bytes_read && feof(file->fp)) { @@ -872,20 +874,19 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si /* Check for overflow conditions */ if (HADDR_UNDEF == addr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", - -1) if (REGION_OVERFLOW(addr, size)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) - - /* Seek to the correct file position. */ - if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr) - { - if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { - file->op = H5FD_STDIO_OP_UNKNOWN; - file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1) - } - file->pos = addr; + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + if (REGION_OVERFLOW(addr, size)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + + /* Seek to the correct file position. */ + if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr) { + if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { + file->op = H5FD_STDIO_OP_UNKNOWN; + file->pos = HADDR_UNDEF; + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1); } + file->pos = addr; + } /* Write the buffer. On successful return, the file position will be * advanced by the number of bytes read. On failure, the file position is @@ -907,7 +908,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si if (bytes_wrote != bytes_in || (0 == bytes_wrote && ferror(file->fp))) { /* error */ file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1); } /* end if */ assert(bytes_wrote > 0); @@ -961,11 +962,11 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing) if (file->write_access) { if (!closing) { if (fflush(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1); - /* Reset last file I/O information */ - file->pos = HADDR_UNDEF; - file->op = H5FD_STDIO_OP_UNKNOWN; + /* Reset last file I/O information */ + file->pos = HADDR_UNDEF; + file->op = H5FD_STDIO_OP_UNKNOWN; } /* end if */ } /* end if */ @@ -1030,13 +1031,13 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) if (INVALID_SET_FILE_POINTER == dwPtrLow) { dwError = GetLastError(); if (dwError != NO_ERROR) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_FILEOPEN, "unable to set file pointer", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_FILEOPEN, "unable to set file pointer", -1); } bError = SetEndOfFile(file->hFile); if (0 == bError) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, - "unable to truncate/extend file properly", -1) + "unable to truncate/extend file properly", -1); #else /* H5_HAVE_WIN32_API */ /* Reset seek offset to beginning of file, so that file isn't re-extended later */ rewind(file->fp); @@ -1044,11 +1045,11 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) /* Truncate file to proper length */ if (-1 == file_ftruncate(file->fd, (file_offset_t)file->eoa)) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, - "unable to truncate/extend file properly", -1) + "unable to truncate/extend file properly", -1); #endif /* H5_HAVE_WIN32_API */ - /* Update the eof value */ - file->eof = file->eoa; + /* Update the eof value */ + file->eof = file->eoa; /* Reset last file I/O information */ file->pos = HADDR_UNDEF; @@ -1058,13 +1059,13 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) else { /* Double-check for problems */ if (file->eoa > file->eof) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_TRUNCATED, "eoa > eof!", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_TRUNCATED, "eoa > eof!", -1); } /* end else */ return 0; } /* end H5FD_stdio_truncate() */ -#ifdef _H5private_H +#ifdef H5private_H /* * This is not related to the functionality of the driver code. * It is added here to trigger warning if HDF5 private definitions are included diff --git a/src/H5FSpublic.h b/src/H5FSpublic.h index 09a2f6d..0d7f5f7 100644 --- a/src/H5FSpublic.h +++ b/src/H5FSpublic.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5FSpublic_H -#define _H5FSpublic_H +#ifndef H5FSpublic_H +#define H5FSpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -48,4 +48,4 @@ extern "C" { } #endif -#endif /* _H5FSpublic_H */ +#endif /* H5FSpublic_H */ diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 2c04204..caa53d2 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -1106,8 +1106,8 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Loop until no more merging */ if (fspace->sinfo->merge_list) { do { - H5SL_node_t * less_sect_node; /* Skip list node for section less than new section */ - H5SL_node_t * greater_sect_node; /* Skip list node for section greater than new section */ + H5SL_node_t *less_sect_node; /* Skip list node for section less than new section */ + H5SL_node_t *greater_sect_node = NULL; /* Skip list node for section greater than new section */ H5FS_section_info_t * tmp_sect; /* Temporary free space section */ H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */ hbool_t greater_sect_node_valid = FALSE; /* Indicate if 'greater than' section node is valid */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 139b38b..c44b61e 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -615,10 +615,10 @@ herr_t H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows) { - H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */ - H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */ - hbool_t did_protect; /* Whether we protected the indirect block or not */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */ + H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5HFman.c b/src/H5HFman.c index fb6e844..612993d 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -13,11 +13,11 @@ /*------------------------------------------------------------------------- * - * Created: H5HFman.c - * Feb 24 2006 - * Quincey Koziol + * Created: H5HFman.c + * Feb 24 2006 + * Quincey Koziol * - * Purpose: "Managed" object routines for fractal heaps. + * Purpose: "Managed" object routines for fractal heaps. * *------------------------------------------------------------------------- */ @@ -31,12 +31,12 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5HFpkg.h" /* Fractal heaps */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5HFpkg.h" /* Fractal heaps */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ @@ -82,14 +82,14 @@ static herr_t H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id /*******************/ /*------------------------------------------------------------------------- - * Function: H5HF_man_insert + * Function: H5HF_man_insert * - * Purpose: Insert an object in a managed direct block + * Purpose: Insert an object in a managed direct block * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Mar 13 2006 + * Programmer: Quincey Koziol + * Mar 13 2006 * *------------------------------------------------------------------------- */ @@ -209,15 +209,15 @@ done: } /* end H5HF_man_insert() */ /*------------------------------------------------------------------------- - * Function: H5HF_man_op_real + * Function: H5HF_man_op_real * - * Purpose: Internal routine to perform an operation on a managed heap + * Purpose: Internal routine to perform an operation on a managed heap * object * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Mar 17 2006 + * Programmer: Quincey Koziol + * Mar 17 2006 * *------------------------------------------------------------------------- */ @@ -225,16 +225,16 @@ static herr_t H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, H5HF_operator_t op, void *op_data, unsigned op_flags) { - H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */ - H5AC_protect_t dblock_access; /* Access method for direct block */ - haddr_t dblock_addr; /* Direct block address */ - size_t dblock_size; /* Direct block size */ - unsigned dblock_cache_flags; /* Flags for unprotecting direct block */ - hsize_t obj_off; /* Object's offset in heap */ - size_t obj_len; /* Object's length in heap */ - size_t blk_off; /* Offset of object in block */ - uint8_t * p; /* Temporary pointer to obj info in block */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_direct_t *dblock = NULL; /* Pointer to direct block to query */ + H5AC_protect_t dblock_access; /* Access method for direct block */ + haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */ + size_t dblock_size; /* Direct block size */ + unsigned dblock_cache_flags = 0; /* Flags for unprotecting direct block */ + hsize_t obj_off; /* Object's offset in heap */ + size_t obj_len; /* Object's length in heap */ + size_t blk_off; /* Offset of object in block */ + uint8_t * p; /* Temporary pointer to obj info in block */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -359,14 +359,14 @@ done: } /* end H5HF_man_op_real() */ /*------------------------------------------------------------------------- - * Function: H5HF_man_read + * Function: H5HF_man_read * - * Purpose: Read an object from a managed heap + * Purpose: Read an object from a managed heap * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Mar 17 2006 + * Programmer: Quincey Koziol + * Mar 17 2006 * *------------------------------------------------------------------------- */ @@ -393,14 +393,14 @@ done: } /* end H5HF_man_read() */ /*------------------------------------------------------------------------- - * Function: H5HF_man_write + * Function: H5HF_man_write * - * Purpose: Write an object to a managed heap + * Purpose: Write an object to a managed heap * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 18 2006 + * Programmer: Quincey Koziol + * Dec 18 2006 * *------------------------------------------------------------------------- */ @@ -428,14 +428,14 @@ done: } /* end H5HF_man_write() */ /*------------------------------------------------------------------------- - * Function: H5HF_man_op + * Function: H5HF_man_op * - * Purpose: Operate directly on an object from a managed heap + * Purpose: Operate directly on an object from a managed heap * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Sept 11 2006 + * Programmer: Quincey Koziol + * Sept 11 2006 * *------------------------------------------------------------------------- */ @@ -462,23 +462,23 @@ done: } /* end H5HF_man_op() */ /*------------------------------------------------------------------------- - * Function: H5HF_man_remove + * Function: H5HF_man_remove * - * Purpose: Remove an object from a managed heap + * Purpose: Remove an object from a managed heap * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * May 15 2006 + * Programmer: Quincey Koziol + * May 15 2006 * *------------------------------------------------------------------------- */ herr_t H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id) { - H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ - H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ - hbool_t did_protect; /* Whether we protected the indirect block or not */ + H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ + H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ hsize_t obj_off; /* Object's offset in heap */ size_t obj_len; /* Object's length in heap */ size_t dblock_size; /* Direct block size */ diff --git a/src/H5HFpublic.h b/src/H5HFpublic.h index c35ceb9..cb9901e 100644 --- a/src/H5HFpublic.h +++ b/src/H5HFpublic.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5HFpublic_H -#define _H5HFpublic_H +#ifndef H5HFpublic_H +#define H5HFpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -48,4 +48,4 @@ extern "C" { } #endif -#endif /* _H5HFpublic_H */ +#endif /* H5HFpublic_H */ diff --git a/src/H5HFsection.c b/src/H5HFsection.c index a940243..4352694 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -2432,7 +2432,7 @@ H5HF_sect_indirect_init_rows(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_free_section_t /* Add an indirect section for each indirect block in the row */ for (v = 0; v < row_entries; v++) { - hbool_t did_protect; /* Whether we protected the indirect block or not */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ /* Try to get the child section's indirect block, if it's available */ if (sect->sect_info.state == H5FS_SECT_LIVE) { diff --git a/src/H5HGpublic.h b/src/H5HGpublic.h index 31cde60..42cbc1a 100644 --- a/src/H5HGpublic.h +++ b/src/H5HGpublic.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Friday, March 27, 1998 */ -#ifndef _H5HGpublic_H -#define _H5HGpublic_H +#ifndef H5HGpublic_H +#define H5HGpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5HL.c b/src/H5HL.c index 3de5340..345d9bf 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -101,7 +101,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p /*out*/) { H5HL_t * heap = NULL; /* Heap created */ H5HL_prfx_t *prfx = NULL; /* Heap prefix */ - hsize_t total_size; /* Total heap size on disk */ + hsize_t total_size; /* Total heap size on disk */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -178,15 +178,15 @@ done: } /* end H5HL_create() */ /*------------------------------------------------------------------------- - * Function: H5HL_dblk_realloc + * Function: H5HL_dblk_realloc * - * Purpose: Reallocate data block for heap + * Purpose: Reallocate data block for heap * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * Oct 12 2008 + * Programmer: Quincey Koziol + * Oct 12 2008 * *------------------------------------------------------------------------- */ @@ -720,7 +720,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void * /* * If no free chunk was large enough, then allocate more space and - * add it to the free list. If the heap ends with a free chunk, we + * add it to the free list. If the heap ends with a free chunk, we * can extend that free chunk. Otherwise we'll have to make another * free chunk. If the heap must expand, we double its size. */ @@ -855,7 +855,7 @@ done: * Function: H5HL_remove * * Purpose: Removes an object or part of an object from the heap at - * address ADDR of file F. The object (or part) to remove + * address ADDR of file F. The object (or part) to remove * begins at byte OFFSET from the beginning of the heap and * continues for SIZE bytes. * @@ -966,7 +966,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size) /* * The amount which is being removed must be large enough to - * hold the free list data. If not, the freed chunk is forever + * hold the free list data. If not, the freed chunk is forever * lost. */ if (size < H5HL_SIZEOF_FREE(f)) { @@ -1095,8 +1095,8 @@ herr_t H5HL_get_size(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t *size) { H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ - H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ - H5HL_t * heap; /* Heap data structure */ + H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ + H5HL_t * heap = NULL; /* Heap data structure */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1147,8 +1147,8 @@ herr_t H5HL_heapsize(H5F_t *f, hid_t dxpl_id, haddr_t addr, hsize_t *heap_size) { H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ - H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ - H5HL_t * heap; /* Heap data structure */ + H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ + H5HL_t * heap = NULL; /* Heap data structure */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5HLpublic.h b/src/H5HLpublic.h index ddda38c..842c301 100644 --- a/src/H5HLpublic.h +++ b/src/H5HLpublic.h @@ -23,8 +23,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5HLpublic_H -#define _H5HLpublic_H +#ifndef H5HLpublic_H +#define H5HLpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index e4198d5..fe74ebe 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -1784,8 +1784,8 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh) for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) { if (u != v && H5O_NULL_ID == curr_msg2->type->id && curr_msg->chunkno == curr_msg2->chunkno) { - ssize_t adj_raw; /* Amount to adjust raw message pointer */ - size_t adj_raw_size; /* Amount to adjust raw message size */ + ssize_t adj_raw = 0; /* Amount to adjust raw message pointer */ + size_t adj_raw_size = 0; /* Amount to adjust raw message size */ /* Check for second message after first message */ if ((curr_msg->raw + curr_msg->raw_size) == diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index 88a84d6..15b56b1 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -79,8 +79,8 @@ H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { - H5O_btreek_t *mesg; /* Native message */ - void * ret_value; /* Return value */ + H5O_btreek_t *mesg; /* Native message */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -159,9 +159,9 @@ H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared static void * H5O_btreek_copy(const void *_mesg, void *_dest) { - const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg; - H5O_btreek_t * dest = (H5O_btreek_t *)_dest; - void * ret_value; + const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg; + H5O_btreek_t * dest = (H5O_btreek_t *)_dest; + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -200,7 +200,7 @@ static size_t H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg) { - size_t ret_value; + size_t ret_value = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Pint.c b/src/H5Pint.c index 9be74e2..6086b48 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -4809,7 +4809,7 @@ done: H5P_genclass_t * H5P_get_class_parent(const H5P_genclass_t *pclass) { - H5P_genclass_t *ret_value; /* return value */ + H5P_genclass_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 39a7fc2..01986ea 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -39,11 +39,11 @@ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * The library's property list classes diff --git a/src/H5RCprivate.h b/src/H5RCprivate.h index 7092986..e1b7306 100644 --- a/src/H5RCprivate.h +++ b/src/H5RCprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5RC module */ -#ifndef _H5RCprivate_H -#define _H5RCprivate_H +#ifndef H5RCprivate_H +#define H5RCprivate_H /**************************************/ /* Public headers needed by this file */ @@ -56,4 +56,4 @@ typedef struct H5RC_t { H5_DLL H5RC_t *H5RC_create(void *s, H5RC_free_func_t free_func); H5_DLL herr_t H5RC_decr(H5RC_t *rc); -#endif /* _H5RSprivate_H */ +#endif /* H5RSprivate_H */ diff --git a/src/H5SL.c b/src/H5SL.c index a1f109a..9b8f65f 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -688,10 +688,10 @@ done: static H5SL_node_t * H5SL_insert_common(H5SL_t *slist, void *item, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - H5SL_node_t *prev; /* Node before the new node */ - uint32_t hashval = 0; /* Hash value for key */ - H5SL_node_t *ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + H5SL_node_t *prev; /* Node before the new node */ + uint32_t hashval = 0; /* Hash value for key */ + H5SL_node_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1316,9 +1316,9 @@ done: void * H5SL_search(H5SL_t *slist, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - uint32_t hashval = 0; /* Hash value for key */ - void * ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + uint32_t hashval = 0; /* Hash value for key */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1614,9 +1614,9 @@ done: H5SL_node_t * H5SL_find(H5SL_t *slist, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - uint32_t hashval = 0; /* Hash value for key */ - H5SL_node_t *ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + uint32_t hashval = 0; /* Hash value for key */ + H5SL_node_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 09142d6..e5e71d3 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -18,14 +18,14 @@ * Purpose: Hyperslab selection dataspace I/O functions. */ -#define H5S_PACKAGE /*suppress error about including H5Spkg */ +#define H5S_PACKAGE /*suppress error about including H5Spkg */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* ID Functions */ -#include "H5Spkg.h" /* Dataspace functions */ -#include "H5VMprivate.h" /* Vector functions */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5Iprivate.h" /* ID Functions */ +#include "H5Spkg.h" /* Dataspace functions */ +#include "H5VMprivate.h" /* Vector functions */ /* Local datatypes */ @@ -216,13 +216,13 @@ H5S_hyper_print_diminfo(FILE *f, const H5S_t *space) #endif /* H5S_HYPER_DEBUG */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_init + * Function: H5S_hyper_iter_init * - * Purpose: Initializes iteration information for hyperslab span tree selection. + * Purpose: Initializes iteration information for hyperslab span tree selection. * - * Return: non-negative on success, negative on failure. + * Return: non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, February 24, 2001 * * Notes: If the 'elmt_size' parameter is set to zero, the regular @@ -409,14 +409,14 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space) } /* H5S_hyper_iter_init() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_coords + * Function: H5S_hyper_iter_coords * - * Purpose: Retrieve the current coordinates of iterator for current + * Purpose: Retrieve the current coordinates of iterator for current * selection * - * Return: non-negative on success, negative on failure + * Return: non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 22, 2003 * * Modifications: @@ -496,14 +496,14 @@ H5S_hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) } /* H5S_hyper_iter_coords() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_block + * Function: H5S_hyper_iter_block * - * Purpose: Retrieve the current block of iterator for current + * Purpose: Retrieve the current block of iterator for current * selection * - * Return: non-negative on success, negative on failure + * Return: non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 2, 2003 * * Notes: This routine assumes that the iterator is always located at @@ -549,13 +549,13 @@ H5S_hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end) } /* H5S_hyper_iter_block() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_nelmts + * Function: H5S_hyper_iter_nelmts * - * Purpose: Return number of elements left to process in iterator + * Purpose: Return number of elements left to process in iterator * - * Return: non-negative number of elements on success, zero on failure + * Return: non-negative number of elements on success, zero on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 16, 1998 * * Modifications: @@ -629,15 +629,15 @@ done: } /* H5S_hyper_iter_has_next_block() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_next + * Function: H5S_hyper_iter_next * - * Purpose: Moves a hyperslab iterator to the beginning of the next sequence + * Purpose: Moves a hyperslab iterator to the beginning of the next sequence * of elements to read. Handles walking off the end in all dimensions. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, September 8, 2000 * * Modifications: @@ -745,10 +745,10 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) } /* end if */ /* Must be an irregular hyperslab selection */ else { - H5S_hyper_span_t * curr_span; /* Current hyperslab span node */ - H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ - hsize_t * abs_arr; /* Absolute hyperslab span position */ - int curr_dim; /* Temporary rank holder */ + H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */ + H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ + hsize_t * abs_arr; /* Absolute hyperslab span position */ + int curr_dim; /* Temporary rank holder */ /* Set the rank of the fastest changing dimension */ ndims = iter->rank; @@ -848,15 +848,15 @@ H5S_hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) } /* H5S_hyper_iter_next() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_iter_next_block + * Function: H5S_hyper_iter_next_block * - * Purpose: Moves a hyperslab iterator to the beginning of the next sequence + * Purpose: Moves a hyperslab iterator to the beginning of the next sequence * of elements to read. Handles walking off the end in all dimensions. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 3, 2003 * * Modifications: @@ -946,10 +946,10 @@ H5S_hyper_iter_next_block(H5S_sel_iter_t *iter) } /* end if */ /* Must be an irregular hyperslab selection */ else { - H5S_hyper_span_t * curr_span; /* Current hyperslab span node */ - H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ - hsize_t * abs_arr; /* Absolute hyperslab span position */ - int curr_dim; /* Temporary rank holder */ + H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */ + H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ + hsize_t * abs_arr; /* Absolute hyperslab span position */ + int curr_dim; /* Temporary rank holder */ /* Set the rank of the fastest changing dimension */ ndims = iter->rank; @@ -3189,11 +3189,11 @@ H5S_hyper_is_regular(const H5S_t *space) COMMENTS, BUGS, ASSUMPTIONS EXAMPLES REVISION LOG - * Robb Matzke, 1998-08-25 - * The fields which are freed are set to NULL to prevent them from being - * freed again later. This fixes some allocation problems where - * changing the hyperslab selection of one data space causes a core dump - * when closing some other data space. + * Robb Matzke, 1998-08-25 + * The fields which are freed are set to NULL to prevent them from being + * freed again later. This fixes some allocation problems where + * changing the hyperslab selection of one data space causes a core dump + * when closing some other data space. --------------------------------------------------------------------------*/ static herr_t H5S_hyper_release(H5S_t *space) @@ -4053,14 +4053,14 @@ done: } /* H5S_hyper_adjust_u() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_project_scalar + * Function: H5S_hyper_project_scalar * - * Purpose: Projects a single element hyperslab selection into a scalar + * Purpose: Projects a single element hyperslab selection into a scalar * dataspace * - * Return: non-negative on success, negative on failure. + * Return: non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -4123,14 +4123,14 @@ done: } /* H5S_hyper_project_scalar() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_project_simple_lower + * Function: H5S_hyper_project_simple_lower * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a lower rank * - * Return: non-negative on success, negative on failure. + * Return: non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -4169,14 +4169,14 @@ H5S_hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space) } /* H5S_hyper_project_simple_lower() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_project_simple_higher + * Function: H5S_hyper_project_simple_higher * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a higher rank * - * Return: non-negative on success, negative on failure. + * Return: non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -4258,14 +4258,14 @@ done: } /* H5S_hyper_project_simple_higher() */ /*------------------------------------------------------------------------- - * Function: H5S_hyper_project_simple + * Function: H5S_hyper_project_simple * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a different rank * - * Return: non-negative on success, negative on failure. + * Return: non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -6119,13 +6119,13 @@ done: #ifndef NEW_HYPERSLAB_API /*------------------------------------------------------------------------- - * Function: H5S_generate_hyperlab + * Function: H5S_generate_hyperlab * - * Purpose: Generate hyperslab information from H5S_select_hyperslab() + * Purpose: Generate hyperslab information from H5S_select_hyperslab() * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol (split from HS_select_hyperslab()). + * Programmer: Quincey Koziol (split from HS_select_hyperslab()). * Tuesday, September 12, 2000 * * Modifications: @@ -6363,13 +6363,13 @@ done: } /* end H5S_generate_hyperslab() */ /*------------------------------------------------------------------------- - * Function: H5S_select_hyperslab + * Function: H5S_select_hyperslab * - * Purpose: Internal version of H5Sselect_hyperslab(). + * Purpose: Internal version of H5Sselect_hyperslab(). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, January 10, 2001 * *------------------------------------------------------------------------- @@ -6689,14 +6689,14 @@ done: #else /* NEW_HYPERSLAB_API */ /* Works */ /*------------------------------------------------------------------------- - * Function: H5S_operate_hyperslab + * Function: H5S_operate_hyperslab * - * Purpose: Combines two hyperslabs with an operation, putting the + * Purpose: Combines two hyperslabs with an operation, putting the * result into a third hyperslab selection * - * Return: non-negative on success/NULL on failure + * Return: non-negative on success/NULL on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 30, 2001 * * Modifications: @@ -6895,13 +6895,13 @@ done: } /* end H5S_operate_hyperslab() */ /*------------------------------------------------------------------------- - * Function: H5S_generate_hyperlab + * Function: H5S_generate_hyperlab * - * Purpose: Generate hyperslab information from H5S_select_hyperslab() + * Purpose: Generate hyperslab information from H5S_select_hyperslab() * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol (split from HS_select_hyperslab()). + * Programmer: Quincey Koziol (split from HS_select_hyperslab()). * Tuesday, September 12, 2000 * * Modifications: @@ -6964,13 +6964,13 @@ done: } /* end H5S_generate_hyperslab() */ /*------------------------------------------------------------------------- - * Function: H5S_select_hyperslab + * Function: H5S_select_hyperslab * - * Purpose: Internal version of H5Sselect_hyperslab(). + * Purpose: Internal version of H5Sselect_hyperslab(). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, January 10, 2001 * * Modifications: @@ -7346,13 +7346,13 @@ done: } /* end H5Scombine_hyperslab() */ /*------------------------------------------------------------------------- - * Function: H5S_combine_select + * Function: H5S_combine_select * - * Purpose: Internal version of H5Scombine_select(). + * Purpose: Internal version of H5Scombine_select(). * - * Return: New dataspace on success/NULL on failure + * Return: New dataspace on success/NULL on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 30, 2001 * * Modifications: @@ -7474,13 +7474,13 @@ done: } /* end H5Scombine_select() */ /*------------------------------------------------------------------------- - * Function: H5S_select_select + * Function: H5S_select_select * - * Purpose: Internal version of H5Sselect_select(). + * Purpose: Internal version of H5Sselect_select(). * - * Return: New dataspace on success/NULL on failure + * Return: New dataspace on success/NULL on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 30, 2001 * * Modifications: diff --git a/src/H5overflow.h b/src/H5overflow.h index 8664f29..869117e 100644 --- a/src/H5overflow.h +++ b/src/H5overflow.h @@ -15,8 +15,8 @@ /* Add new types to H5overflow.txt file */ -#ifndef _H5overflow_H -#define _H5overflow_H +#ifndef H5overflow_H +#define H5overflow_H /* Each type in this file is tested for assignment to the other types, diff --git a/src/H5system.c b/src/H5system.c index 7dd0fc7..70e41f3 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -384,7 +384,7 @@ HDfprintf(FILE *stream, const char *fmt, ...) len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); HDstrncat(format_templ, "s", (sizeof(format_templ) - (size_t)(len + 1))); - fprintf(stream, format_templ, "UNDEF"); + n = fprintf(stream, format_templ, "UNDEF"); } } break; @@ -408,11 +408,11 @@ HDfprintf(FILE *stream, const char *fmt, ...) htri_t tri_var = HDva_arg(ap, htri_t); if (tri_var > 0) - fprintf(stream, "TRUE"); + n = fprintf(stream, "TRUE"); else if (!tri_var) - fprintf(stream, "FALSE"); + n = fprintf(stream, "FALSE"); else - fprintf(stream, "FAIL(%d)", (int)tri_var); + n = fprintf(stream, "FAIL(%d)", (int)tri_var); } break; default: @@ -624,8 +624,8 @@ H5_make_time(struct tm *tm) * VS 2015 is removed, with _get_timezone replacing it. */ long timezone = 0; -#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ - time_t ret_value; /* Return value */ +#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ + time_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1141,7 +1141,7 @@ done: herr_t H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) { - size_t path1_len; /* length of path1 */ + size_t path1_len = 0; /* length of path1 */ size_t path2_len; /* length of path2 */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5version.h b/src/H5version.h index d147c74..7c80c03 100644 --- a/src/H5version.h +++ b/src/H5version.h @@ -15,8 +15,8 @@ /* Add new versioned symbols to H5vers.txt file */ -#ifndef _H5version_H -#define _H5version_H +#ifndef H5version_H +#define H5version_H /* Issue error if contradicting macros have been defined. */ #if defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS) diff --git a/test/cache_common.h b/test/cache_common.h index aa4c733..7021394 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -17,8 +17,8 @@ * This file contains common #defines, type definitions, and * externs for tests of the cache implemented in H5C.c */ -#ifndef _CACHE_COMMON_H -#define _CACHE_COMMON_H +#ifndef CACHE_COMMON_H +#define CACHE_COMMON_H #define H5C_PACKAGE /*suppress error about including H5Cpkg */ #define H5F_PACKAGE /*suppress error about including H5Fpkg */ @@ -529,4 +529,4 @@ void check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t * void validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t compare_init, int test_num); -#endif /* _CACHE_COMMON_H */ +#endif /* CACHE_COMMON_H */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 1b8fd17..577160a 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, December 9, 1997 * * Purpose: Tests the data type interface (H5T) @@ -775,7 +775,7 @@ test_particular_fp_integer(void) /* Print errors */ if (dst_c != SCHAR_MAX) { - double x; + double x = 0.0; signed char y; if (0 == fails_this_test++) @@ -819,7 +819,7 @@ test_particular_fp_integer(void) /* Print errors */ if (dst_i != fill_value) { - float x; + float x = 0.0; int y; if (0 == fails_this_test++) @@ -2783,18 +2783,18 @@ my_isnan(dtype_t type, void *val) char s[256]; if (FLT_FLOAT == type) { - float x; + float x = 0.0; HDmemcpy(&x, val, sizeof(float)); retval = (x != x); } else if (FLT_DOUBLE == type) { - double x; + double x = 0.0; HDmemcpy(&x, val, sizeof(double)); retval = (x != x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 } else if (FLT_LDOUBLE == type) { - long double x; + long double x = 0.0; HDmemcpy(&x, val, sizeof(long double)); retval = (x != x); #endif @@ -2809,20 +2809,20 @@ my_isnan(dtype_t type, void *val) */ if (!retval) { if (FLT_FLOAT == type) { - float x; + float x = 0.0; HDmemcpy(&x, val, sizeof(float)); HDsnprintf(s, sizeof(s), "%g", (double)x); } else if (FLT_DOUBLE == type) { - double x; + double x = 0.0; HDmemcpy(&x, val, sizeof(double)); HDsnprintf(s, sizeof(s), "%g", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 } else if (FLT_LDOUBLE == type) { - long double x; + long double x = 0.0; HDmemcpy(&x, val, sizeof(long double)); HDsnprintf(s, sizeof(s), "%Lg", x); @@ -3283,7 +3283,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) int check_expo[2]; if (FLT_FLOAT == dst_type) { - float x; + float x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(float)); if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN) continue; /* all underflowed, no error */ @@ -3294,7 +3294,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) check_mant[1] = HDfrexpf(hw_f, check_expo + 1); } else if (FLT_DOUBLE == dst_type) { - double x; + double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(double)); if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN) continue; /* all underflowed, no error */ @@ -3306,7 +3306,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) #if H5_SIZEOF_LONG_DOUBLE != 0 && (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE) } else { - long double x; + long double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(long double)); /* dst is largest float, no need to check underflow. */ check_mant[0] = (double)HDfrexpl(x, check_expo + 0); @@ -3353,18 +3353,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]); HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), ""); if (FLT_FLOAT == src_type) { - float x; + float x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(float)); HDprintf(" %29.20e\n", (double)x); } else if (FLT_DOUBLE == src_type) { - double x; + double x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(double)); HDprintf(" %29.20e\n", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE } else { - long double x; + long double x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(long double)); HDfprintf(stdout, " %29.20Le\n", x); #endif @@ -3375,18 +3375,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]); HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), ""); if (FLT_FLOAT == dst_type) { - float x; + float x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(float)); HDprintf(" %29.20e\n", (double)x); } else if (FLT_DOUBLE == dst_type) { - double x; + double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(double)); HDprintf(" %29.20e\n", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE } else { - long double x; + long double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(long double)); HDfprintf(stdout, " %29.20Le\n", x); #endif diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake index ca321a4..97d92b8 100644 --- a/tools/h5diff/CMakeTests.cmake +++ b/tools/h5diff/CMakeTests.cmake @@ -872,6 +872,8 @@ h5diff_800.out.err h5diff_801.out h5diff_801.out.err + h5diff_830.out + h5diff_830.out.err h5diff_8625.out h5diff_8625.out.err h5diff_8639.out @@ -1487,6 +1489,11 @@ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/ ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array) ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array) +# ############################################################################## +# # dataset subsets +# ############################################################################## +#TRILABS_227 ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]) + ############################################################################## ### P L U G I N T E S T S ############################################################################## diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index a34ebe9..01eaf86 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -70,7 +70,6 @@ check_options(diff_opt_t *opts) } } -#if TRILABS_227 /*------------------------------------------------------------------------- * Function: parse_hsize_list * @@ -186,7 +185,6 @@ parse_subset_params(const char *dset) return s; } -#endif /*------------------------------------------------------------------------- * Function: parse_command_line @@ -442,11 +440,9 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char * TRILABS_227 is complete except for an issue with printing indices * the following calls will enable subsetting */ -#if TRILABS_227 opts->sset[0] = parse_subset_params(*objname1); opts->sset[1] = parse_subset_params(*objname2); -#endif H5TOOLS_ENDDEBUG(""); } @@ -766,19 +762,27 @@ usage(void) /* * TRILABS_227 is complete except for an issue with printing indices * the following will be needed for subsetting + */ PRINTVALSTREAM(rawoutstream, " Subsetting options:\n"); - PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the fcompact form of subsetting, as - follows:\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); - PRINTVALSTREAM(rawoutstream, " It is not required to use all parameters, but until the last parameter - value used,\n"); PRINTVALSTREAM(rawoutstream, " all of the semicolons (;) are required, even when a - parameter value is not specified. Example:\n"); PRINTVALSTREAM(rawoutstream, " obj1 - /foo/mydataset[START;;COUNT;BLOCK]\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); - PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 - in\n"); PRINTVALSTREAM(rawoutstream, " each dimension. START is optional and will default to 0 in each - dimension.\n"); PRINTVALSTREAM(rawoutstream, " Each of START, STRIDE, COUNT, and BLOCK must be a - comma-separated list of integers with\n"); PRINTVALSTREAM(rawoutstream, " one integer for each dimension - of the dataset.\n"); PRINTVALSTREAM(rawoutstream, "\n"); - */ + PRINTVALSTREAM(rawoutstream, + " Subsetting is available by using the fcompact form of subsetting, as follows:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, + " It is not required to use all parameters, but until the last parameter value used,\n"); + PRINTVALSTREAM( + rawoutstream, + " all of the semicolons (;) are required, even when a parameter value is not specified. Example:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); + PRINTVALSTREAM(rawoutstream, + " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n"); + PRINTVALSTREAM(rawoutstream, + " each dimension. START is optional and will default to 0 in each dimension.\n"); + PRINTVALSTREAM( + rawoutstream, + " Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with\n"); + PRINTVALSTREAM(rawoutstream, " one integer for each dimension of the dataset.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Exit code:\n"); PRINTVALSTREAM(rawoutstream, " 0 if no differences, 1 if differences found, 2 if error\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/h5diff/h5diff_common.h b/tools/h5diff/h5diff_common.h index 6594478..83f4255 100644 --- a/tools/h5diff/h5diff_common.h +++ b/tools/h5diff/h5diff_common.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DIFFCOMMON_H__ -#define H5DIFFCOMMON_H__ +#ifndef H5DIFFCOMMON_H +#define H5DIFFCOMMON_H #include "h5tools.h" /* Name of tool */ @@ -32,4 +32,4 @@ void print_info(diff_opt_t *opts); } #endif -#endif /* H5DIFFCOMMON_H__ */ +#endif /* H5DIFFCOMMON_H */ diff --git a/tools/h5diff/h5diff_plugin.sh.in b/tools/h5diff/h5diff_plugin.sh.in index 832981d..076ca74 100644 --- a/tools/h5diff/h5diff_plugin.sh.in +++ b/tools/h5diff/h5diff_plugin.sh.in @@ -217,19 +217,21 @@ TOOLTEST() { # Run test. TESTING $H5DIFF $@ ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@" + #echo "#############################" + #echo "Expected output for '$H5DIFF $@'" + #echo "#############################" + cd $TESTDIR + eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err EXIT_CODE=$? + # save actual and actual_err in case they are needed later. cp $actual $actual_sav STDOUT_FILTER $actual cp $actual_err $actual_err_sav STDERR_FILTER $actual_err cat $actual_err >> $actual + # don't add exit code check in pmode, as it causes failure. (exit code # is from mpirun not tool) # if any problem occurs relate to an exit code, it will be caught in @@ -259,27 +261,29 @@ TOOLTEST() { actual_sorted=actual_sorted sort $expect -o $expect_sorted sort $actual -o $actual_sorted + # remove "EXIT CODE:" line from expect file. test for exit code # is done by serial mode. grep -v "EXIT CODE:" $expect_sorted > $expect_sorted.noexit mv $expect_sorted.noexit $expect_sorted - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" + + if $CMP $expect_sorted $actual_sorted; then + echo " PASSED" + else + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" + $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' + echo "====The actual output ($actual_sav)" + sed 's/^/ /' < $actual_sav + echo "====The actual stderr ($actual_err_sav)" + sed 's/^/ /' < $actual_err_sav + echo "====End of actual stderr ($actual_err_sav)" + echo "" + fi fi fi - fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then @@ -305,18 +309,20 @@ TOOLTEST_ERR() { # Run test. TESTING $H5DIFF $@ ( - #echo "#############################" - #echo "Expected output for '$H5DIFF $@'" - #echo "#############################" - cd $TESTDIR - eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@" + #echo "#############################" + #echo "Expected output for '$H5DIFF $@'" + #echo "#############################" + cd $TESTDIR + eval $ENVCMD $RUNCMD $H5DIFF_BIN "$@" ) >$actual 2>$actual_err EXIT_CODE=$? + # save actual and actual_err in case they are needed later. cp $actual $actual_sav STDOUT_FILTER $actual cp $actual_err $actual_err_sav STDERR_FILTER $actual_err + # don't add exit code check in pmode, as it causes failure. (exit code # is from mpirun not tool) # if any problem occurs relate to an exit code, it will be caught in @@ -347,23 +353,24 @@ TOOLTEST_ERR() { sort $expect_err -o $expect_sorted sort $actual_err -o $actual_sorted mv $expect_sorted.noexit $expect_sorted - if $CMP $expect_sorted $actual_sorted; then - echo " PASSED" - else - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - if test yes = "$verbose"; then - echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" - $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' - echo "====The actual output ($actual_sav)" - sed 's/^/ /' < $actual_sav - echo "====The actual stderr ($actual_err_sav)" - sed 's/^/ /' < $actual_err_sav - echo "====End of actual stderr ($actual_err_sav)" - echo "" + + if $CMP $expect_sorted $actual_sorted; then + echo " PASSED" + else + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + if test yes = "$verbose"; then + echo "====Expected result ($expect_sorted) differs from actual result ($actual_sorted)" + $DIFF $expect_sorted $actual_sorted |sed 's/^/ /' + echo "====The actual output ($actual_sav)" + sed 's/^/ /' < $actual_sav + echo "====The actual stderr ($actual_err_sav)" + sed 's/^/ /' < $actual_err_sav + echo "====End of actual stderr ($actual_err_sav)" + echo "" + fi fi fi - fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then diff --git a/tools/h5diff/testfiles/h5diff_10.txt b/tools/h5diff/testfiles/h5diff_10.txt index 0618705..5804ac3 100644 --- a/tools/h5diff/testfiles/h5diff_10.txt +++ b/tools/h5diff/testfiles/h5diff_10.txt @@ -131,6 +131,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_600.txt b/tools/h5diff/testfiles/h5diff_600.txt index 98c80be..fa7447b 100644 --- a/tools/h5diff/testfiles/h5diff_600.txt +++ b/tools/h5diff/testfiles/h5diff_600.txt @@ -131,6 +131,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_603.txt b/tools/h5diff/testfiles/h5diff_603.txt index a5bb805..9e1dc89 100644 --- a/tools/h5diff/testfiles/h5diff_603.txt +++ b/tools/h5diff/testfiles/h5diff_603.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_606.txt b/tools/h5diff/testfiles/h5diff_606.txt index 4782e17..146b944 100644 --- a/tools/h5diff/testfiles/h5diff_606.txt +++ b/tools/h5diff/testfiles/h5diff_606.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_612.txt b/tools/h5diff/testfiles/h5diff_612.txt index ee40713..511e693 100644 --- a/tools/h5diff/testfiles/h5diff_612.txt +++ b/tools/h5diff/testfiles/h5diff_612.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_615.txt b/tools/h5diff/testfiles/h5diff_615.txt index 5504812..c4b41f9 100644 --- a/tools/h5diff/testfiles/h5diff_615.txt +++ b/tools/h5diff/testfiles/h5diff_615.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_621.txt b/tools/h5diff/testfiles/h5diff_621.txt index e4dba56..9dd312d 100644 --- a/tools/h5diff/testfiles/h5diff_621.txt +++ b/tools/h5diff/testfiles/h5diff_621.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_622.txt b/tools/h5diff/testfiles/h5diff_622.txt index 0e7ffa3..0f7c4af 100644 --- a/tools/h5diff/testfiles/h5diff_622.txt +++ b/tools/h5diff/testfiles/h5diff_622.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_623.txt b/tools/h5diff/testfiles/h5diff_623.txt index bb70458..3e1b5f3 100644 --- a/tools/h5diff/testfiles/h5diff_623.txt +++ b/tools/h5diff/testfiles/h5diff_623.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_624.txt b/tools/h5diff/testfiles/h5diff_624.txt index cb30023..0645961 100644 --- a/tools/h5diff/testfiles/h5diff_624.txt +++ b/tools/h5diff/testfiles/h5diff_624.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/h5diff/testfiles/h5diff_830.txt b/tools/h5diff/testfiles/h5diff_830.txt new file mode 100644 index 0000000..8f00d8b --- /dev/null +++ b/tools/h5diff/testfiles/h5diff_830.txt @@ -0,0 +1,30 @@ +dataset: and +size: [4x3x2] [4x3x2] +position array3D array3D difference +------------------------------------------------------------ +[ 0 0 0 ] 1 0 1 +[ 0 0 0 ] 2 0 2 +[ 0 0 0 ] 3 0 3 +[ 0 0 1 ] 4 0 4 +[ 0 0 1 ] 5 0 5 +[ 0 0 1 ] 6 0 6 +[ 0 2 0 ] 13 0 13 +[ 0 2 0 ] 14 0 14 +[ 0 2 0 ] 15 0 15 +[ 0 2 1 ] 16 0 16 +[ 0 2 1 ] 17 0 17 +[ 0 2 1 ] 18 0 18 +[ 2 0 0 ] 37 0 37 +[ 2 0 0 ] 38 0 38 +[ 2 0 0 ] 39 0 39 +[ 2 0 1 ] 40 0 40 +[ 2 0 1 ] 41 0 41 +[ 2 0 1 ] 42 0 42 +[ 2 2 0 ] 49 0 49 +[ 2 2 0 ] 50 0 50 +[ 2 2 0 ] 51 0 51 +[ 2 2 1 ] 52 0 52 +[ 2 2 1 ] 53 0 53 +[ 2 2 1 ] 54 0 54 +24 differences found +EXIT CODE: 1 diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in index 179e7dc..688af68 100644 --- a/tools/h5diff/testh5diff.sh.in +++ b/tools/h5diff/testh5diff.sh.in @@ -311,6 +311,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_708.txt $SRC_H5DIFF_TESTFILES/h5diff_709.txt $SRC_H5DIFF_TESTFILES/h5diff_710.txt $SRC_H5DIFF_TESTFILES/h5diff_80.txt +$SRC_H5DIFF_TESTFILES/h5diff_830.txt $SRC_H5DIFF_TESTFILES/h5diff_90.txt $SRC_H5DIFF_TESTFILES/h5diff_8625.txt $SRC_H5DIFF_TESTFILES/h5diff_8639.txt @@ -1130,6 +1131,10 @@ TOOLTEST h5diff_644.txt -v --use-system-epsilon -d 5 h5diff_basic1.h5 h5diff_bas TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4 +# ############################################################################## +# # dataset subsets +# ############################################################################## +#TRILABS_227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;] # ############################################################################## # # END diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h index 92fc7d5..518d17f 100644 --- a/tools/h5dump/h5dump.h +++ b/tools/h5dump/h5dump.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_H__ -#define H5DUMP_H__ +#ifndef H5DUMP_H +#define H5DUMP_H #include "hdf5.h" #include "H5private.h" @@ -110,4 +110,4 @@ const dump_functions *dump_function_table; } #endif -#endif /* !H5DUMP_H__ */ +#endif /* H5DUMP_H */ diff --git a/tools/h5dump/h5dump_ddl.h b/tools/h5dump/h5dump_ddl.h index 6d65796..8487270 100644 --- a/tools/h5dump/h5dump_ddl.h +++ b/tools/h5dump/h5dump_ddl.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_DDL_H__ -#define H5DUMP_DDL_H__ +#ifndef H5DUMP_DDL_H +#define H5DUMP_DDL_H #ifdef __cplusplus extern "C" { @@ -50,4 +50,4 @@ void handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, in } #endif -#endif /* !H5DUMP_DDL_H__ */ +#endif /* H5DUMP_DDL_H */ diff --git a/tools/h5dump/h5dump_defines.h b/tools/h5dump/h5dump_defines.h index 0fb8def..21a31dd 100644 --- a/tools/h5dump/h5dump_defines.h +++ b/tools/h5dump/h5dump_defines.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_DEFINES_H__ -#define H5DUMP_DEFINES_H__ +#ifndef H5DUMP_DEFINES_H +#define H5DUMP_DEFINES_H #define H5DUMP_MAX_RANK H5S_MAX_RANK @@ -50,4 +50,4 @@ #define H5_SZIP_MSB_OPTION_MASK 16 #define H5_SZIP_RAW_OPTION_MASK 128 -#endif /* !H5DUMP_DEFINES_H__ */ +#endif /* H5DUMP_DEFINES_H */ diff --git a/tools/h5dump/h5dump_extern.h b/tools/h5dump/h5dump_extern.h index 3ffac43..c4eb2ed 100644 --- a/tools/h5dump/h5dump_extern.h +++ b/tools/h5dump/h5dump_extern.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_EXTERN_H__ -#define H5DUMP_EXTERN_H__ +#ifndef H5DUMP_EXTERN_H +#define H5DUMP_EXTERN_H #include "hdf5.h" #include "H5private.h" @@ -107,4 +107,4 @@ ssize_t table_list_visited(unsigned long file_no); } #endif -#endif /* !H5DUMP_EXTERN_H__ */ +#endif /* H5DUMP_EXTERN_H */ diff --git a/tools/h5dump/h5dump_plugin.sh.in b/tools/h5dump/h5dump_plugin.sh.in index 09f4985..17e4a43 100644 --- a/tools/h5dump/h5dump_plugin.sh.in +++ b/tools/h5dump/h5dump_plugin.sh.in @@ -177,24 +177,24 @@ TOOLTEST() { STDERR_FILTER $actual_err cat $actual_err >> $actual - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + echo " Expected result (*.ddl) missing" + nerrors="`expr $nerrors + 1`" elif $CMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" + echo " PASSED" else - echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' fi # Clean up output file if test -z "$HDF5_NOCLEANUP"; then - rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext + rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext fi } diff --git a/tools/h5dump/h5dump_xml.h b/tools/h5dump/h5dump_xml.h index 9ff22ed..d69f6d5 100644 --- a/tools/h5dump/h5dump_xml.h +++ b/tools/h5dump/h5dump_xml.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_XML_H__ -#define H5DUMP_XML_H__ +#ifndef H5DUMP_XML_H +#define H5DUMP_XML_H extern const char *xmlnsprefix; @@ -34,4 +34,4 @@ void xml_dump_data(hid_t, int, struct subset_t *, int); } #endif -#endif /* !H5DUMP_XML_H__ */ +#endif /* H5DUMP_XML_H */ diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index e3f4384..471af51 100644 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp) token = HDstrtok(temp, delimiter); if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); @@ -2546,7 +2546,7 @@ parsePathInfo(struct path_info *path, char *temp) if (token == NULL) break; if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); diff --git a/tools/h5import/h5import.h b/tools/h5import/h5import.h index 2192f4a..efd40e1 100644 --- a/tools/h5import/h5import.h +++ b/tools/h5import/h5import.h @@ -17,8 +17,8 @@ * */ -#ifndef H5IMPORT_H__ -#define H5IMPORT_H__ +#ifndef H5IMPORT_H +#define H5IMPORT_H /* * state table tokens @@ -189,4 +189,4 @@ void help(char *); hid_t createOutputDataType(struct Input *in); hid_t createInputDataType(struct Input *in); -#endif /* H5IMPORT_H__ */ +#endif /* H5IMPORT_H */ diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index c5b0c01..be0194f 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -2595,7 +2595,7 @@ int main(int argc, const char *argv[]) { hid_t file_id = H5I_INVALID_HID; - char * fname = NULL, *oname = NULL, *x; + char * fname = NULL, *oname = NULL, *x = NULL; const char *s = NULL; char * rest; int argno; diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index 58967c0..fd2e36b 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5REPACK_H__ -#define H5REPACK_H__ +#ifndef H5REPACK_H +#define H5REPACK_H #include "H5private.h" #include "hdf5.h" @@ -212,4 +212,4 @@ obj_list_t *parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, obj_list_t *parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about object */ pack_opt_t *options); -#endif /* H5REPACK_H__ */ +#endif /* H5REPACK_H */ diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index d518675..f14bcda 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DIFF_H__ -#define H5DIFF_H__ +#ifndef H5DIFF_H +#define H5DIFF_H #include "hdf5.h" #include "h5tools.h" @@ -159,4 +159,4 @@ int print_objname(diff_opt_t *opts, hsize_t nfound); void do_print_objname(const char *OBJ, const char *path1, const char *path2, diff_opt_t *opts); void do_print_attrname(const char *attr, const char *path1, const char *path2); -#endif /* H5DIFF_H__ */ +#endif /* H5DIFF_H */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 7d80985..0da4df1 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3130,48 +3130,66 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) hsize_t curr_pos = idx; parallel_print("[ "); - H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", i, opts->hs_nelmts, opts->err_stat); + H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", idx, opts->hs_nelmts, + opts->err_stat); if (opts->sset[0] != NULL) { /* Subsetting is used - calculate total position */ - hsize_t elmnt_cnt = 1; - hsize_t dim_cnt = 0; /* previous dim size */ - hsize_t str_cnt = 0; /* previous dim stride */ - hsize_t curr_idx = idx; /* calculated running position */ - hsize_t str_idx = 0; - hsize_t blk_idx = 0; - hsize_t cnt_idx = 0; - hsize_t hs_idx = 0; - j = opts->rank - 1; + hsize_t prev_dim_size = 0; /* previous dim size */ + hsize_t prev_str = 0; /* previouw stride idx*/ + hsize_t str_cnt = 0; /* stride multiplier*/ + hsize_t curr_idx = 0; /* calculated running position */ + hsize_t str_idx = 0; + hsize_t blk_idx = 0; + hsize_t cnt_idx = 0; + hsize_t dim_size = 0; /* current dim size */ + hsize_t elmnt_cnt = 1; + hsize_t next_idx = idx; + hsize_t data_idx = 0; + j = opts->rank - 1; + H5TOOLS_DEBUG("...begin:%ld=> opts->rank:%ld (idx:%ld)", j, opts->rank, idx); do { - cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - count:%ld", j, - curr_pos, curr_idx, cnt_idx); - blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - block:%ld", j, - curr_pos, curr_idx, blk_idx); - hs_idx = cnt_idx * blk_idx; /* hyperslab area value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - hs:%ld", j, curr_pos, - curr_idx, hs_idx); - str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - stride:%ld", j, - curr_pos, curr_idx, str_idx); - elmnt_cnt *= opts->dims[j]; /* Total number of elements in dimension */ - H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld", j, elmnt_cnt); - if (str_idx > blk_idx) - curr_idx += dim_cnt * (str_idx - blk_idx); /* */ - else if (curr_idx >= hs_idx) - curr_idx += dim_cnt * str_cnt; - H5TOOLS_DEBUG("... sset loop:%d with idx:%ld (curr_idx:%ld) - stride:%ld", j, idx, - curr_idx, str_idx); - dim_cnt = elmnt_cnt; /* */ - if (str_idx > blk_idx) - str_cnt = str_idx - blk_idx; /* */ - else - str_cnt = str_idx; /* */ - H5TOOLS_DEBUG("... sset loop:%d with dim_cnt:%ld - str_cnt:%ld", j, dim_cnt, str_cnt); + curr_idx = next_idx; /* New current data position */ + cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ + blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ + str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j, + curr_pos, curr_idx, cnt_idx, blk_idx, str_idx); + dim_size = opts->dims[j]; /* Current dimension size */ + // elmnt_cnt *= dim_size; /* Total number of elements in dimension */ + H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) " + "- str_cnt:%ld", + j, elmnt_cnt, prev_dim_size, dim_size, str_cnt); + data_idx = elmnt_cnt * dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (data_idx:%ld)", j, curr_pos, data_idx); + for (i = 0; i < cnt_idx; i++) { + H5TOOLS_DEBUG("... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld (curr_idx:%ld - " + "data_idx:%ld)", + i, cnt_idx, str_cnt, curr_idx, data_idx); + if (curr_idx >= data_idx) { + /* get to next block */ + data_idx += str_idx * dim_size; + /* get next block */ + str_cnt++; + H5TOOLS_DEBUG( + "... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld - data_idx:%ld", i, + cnt_idx, str_cnt, data_idx); + } + H5TOOLS_DEBUG("... ... end data loop:%d with dim_cnt:%ld - str_cnt:%ld - " + "(curr_idx:%ld - data_idx:%ld)", + i, dim_size, str_cnt, curr_idx, data_idx); + } + next_idx += dim_size * str_cnt; // + prev_dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx); + str_cnt = 0; + prev_str = str_idx; + prev_dim_size = dim_size; + H5TOOLS_DEBUG("... end sset loop:%d with prev_dim_size:%ld (curr_idx:%ld - data_idx:%ld) " + "- str_cnt:%ld", + j, prev_dim_size, curr_idx, data_idx, str_cnt); + elmnt_cnt *= dim_size; /* Total number of elements in dimension */ j--; - } while (curr_idx >= elmnt_cnt && j >= 0); + } while (next_idx >= elmnt_cnt && j >= 0); curr_pos = curr_idx; /* New current position */ H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos); } /* if (opts->sset[0] != NULL) */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index f0ebbe7..65e456a 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1599,7 +1599,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } break; case H5T_ARRAY: { int k, ndims; - hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts; + hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts = 0; hid_t memb = H5I_INVALID_HID; H5TOOLS_DEBUG("H5T_ARRAY"); diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 10acea3..6308008 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -17,8 +17,8 @@ * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_H__ -#define H5TOOLS_H__ +#ifndef H5TOOLS_H +#define H5TOOLS_H #include "hdf5.h" #include "h5tools_error.h" @@ -657,4 +657,4 @@ H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_for } #endif -#endif /* H5TOOLS_H__ */ +#endif /* H5TOOLS_H */ diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index c69c583..d06f48a 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -14,8 +14,8 @@ /* * Purpose: Support h5dump functions for the various tools. */ -#ifndef H5TOOLS_DUMP_H__ -#define H5TOOLS_DUMP_H__ +#ifndef H5TOOLS_DUMP_H +#define H5TOOLS_DUMP_H #include "h5tools_utils.h" @@ -90,4 +90,4 @@ H5TOOLS_DLL void h5tools_print_packed_bits(h5tools_str_t *buffer /*in,out*/, hid } #endif -#endif /* H5TOOLS_DUMP_H__ */ +#endif /* H5TOOLS_DUMP_H */ diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index b8e5339..8fd33bb 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -14,8 +14,8 @@ /* * Header file for error values, etc. */ -#ifndef H5TOOLS_ERROR_H_ -#define H5TOOLS_ERROR_H_ +#ifndef H5TOOLS_ERROR_H +#define H5TOOLS_ERROR_H #include "H5Epublic.h" #include "H5Eprivate.h" /* Error handling */ @@ -250,4 +250,4 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; H5_LEAVE(ret_val) \ } while (0) -#endif /* H5TOOLS_ERROR_H_ */ +#endif /* H5TOOLS_ERROR_H */ diff --git a/tools/lib/h5tools_ref.h b/tools/lib/h5tools_ref.h index 2720620..e3d55c6 100644 --- a/tools/lib/h5tools_ref.h +++ b/tools/lib/h5tools_ref.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TOOLS_REF_H__ -#define H5TOOLS_REF_H__ +#ifndef H5TOOLS_REF_H +#define H5TOOLS_REF_H #include "hdf5.h" diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 25876e8..9e181f3 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -630,7 +630,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai long double templdouble; HDmemcpy(&templdouble, vp, sizeof(long double)); - h5tools_str_append(str, OPT(info->fmt_double, "%Lf"), templdouble); + h5tools_str_append(str, "%Lg", templdouble); #endif } break; diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 1c3301a..3bbf6b1 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -15,8 +15,8 @@ * Programmer: Bill Wendling * Monday, 19. February 2001 */ -#ifndef H5TOOLS_STR_H__ -#define H5TOOLS_STR_H__ +#ifndef H5TOOLS_STR_H +#define H5TOOLS_STR_H typedef struct h5tools_str_t { char * s; /*allocate string */ @@ -46,4 +46,4 @@ H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t * hid_t type, void *vp, h5tools_context_t *ctx); H5TOOLS_DLL char *h5tools_str_replace(const char *string, const char *substr, const char *replacement); -#endif /* H5TOOLS_STR_H__ */ +#endif /* H5TOOLS_STR_H */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 4bc69de..4629736 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -196,7 +196,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti /* long command line option */ int i; const char ch = '='; - char * arg = &argv[opt_ind][2]; + char * arg = HDstrdup(&argv[opt_ind][2]); size_t arg_len = 0; opt_arg = strchr(&argv[opt_ind][2], ch); @@ -251,6 +251,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_ind++; sp = 1; + + HDfree(arg); } else { register char *cp; /* pointer into current token */ @@ -1077,12 +1079,14 @@ h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim, H5FD_ros3_fapl_t ccred[1] = (const char *)s3cred[1]; ccred[2] = (const char *)s3cred[2]; - if (h5tools_populate_ros3_fapl(fapl_config_out, ccred) < 0) + if (0 == h5tools_populate_ros3_fapl(fapl_config_out, ccred)) H5TOOLS_GOTO_ERROR(FAIL, "failed to populate S3 VFD FAPL config"); done: - HDfree(s3cred); - HDfree(s3cred_src); + if (s3cred) + HDfree(s3cred); + if (s3cred_src) + HDfree(s3cred_src); return ret_value; } diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index d38abce..34ac89b 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -17,8 +17,8 @@ * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_UTILS_H__ -#define H5TOOLS_UTILS_H__ +#ifndef H5TOOLS_UTILS_H +#define H5TOOLS_UTILS_H #include "hdf5.h" @@ -190,4 +190,4 @@ H5TOOLS_DLL herr_t h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int deli } #endif -#endif /* H5TOOLS_UTILS_H__ */ +#endif /* H5TOOLS_UTILS_H */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 6d35cfe..b62ff3d 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TRAV_H__ -#define H5TRAV_H__ +#ifndef H5TRAV_H +#define H5TRAV_H #include "hdf5.h" @@ -187,4 +187,4 @@ H5TOOLS_DLL void trav_table_free(trav_table_t *table); H5TOOLS_DLL void trav_table_addflags(unsigned *flags, char *objname, h5trav_type_t type, trav_table_t *table); -#endif /* H5TRAV_H__ */ +#endif /* H5TRAV_H */ diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h index 96ea05e..0269b93 100644 --- a/tools/lib/io_timer.h +++ b/tools/lib/io_timer.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef IO_TIMER__ -#define IO_TIMER__ +#ifndef IO_TIMER +#define IO_TIMER #include "hdf5.h" @@ -88,4 +88,4 @@ H5TOOLS_DLL double io_time_get(io_time_t *pt, timer_type t); } #endif /* __cplusplus */ -#endif /* IO_TIMER__ */ +#endif /* IO_TIMER */ diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 8e884dd..7dce495 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _PH5DIFF_H__ -#define _PH5DIFF_H__ +#ifndef PH5DIFF_H +#define PH5DIFF_H /* Send from manager to workers */ #define MPI_TAG_ARGS 1 @@ -40,4 +40,4 @@ struct diffs_found { int not_cmp; }; -#endif /* _PH5DIFF_H__ */ +#endif /* PH5DIFF_H */ diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index 08204d6..9128706 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -15,7 +15,7 @@ * * Created: debug.c * Jul 18 1997 - * Robb Matzke + * Robb Matzke * * Purpose: Debugs an existing HDF5 file at a low level. * @@ -61,7 +61,6 @@ * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- @@ -70,7 +69,7 @@ static const H5B2_class_t * get_H5B2_class(const uint8_t *sig) { H5B2_subid_t subtype = (H5B2_subid_t)sig[H5_SIZEOF_MAGIC + 1]; - const H5B2_class_t *cls; + const H5B2_class_t *cls = NULL; switch (subtype) { case H5B2_TEST_ID: @@ -131,7 +130,6 @@ get_H5B2_class(const uint8_t *sig) * Failure: exit (non-zero) * * Programmer: Robb Matzke - * matzke@llnl.gov * Jul 18 1997 * *------------------------------------------------------------------------- @@ -139,24 +137,29 @@ get_H5B2_class(const uint8_t *sig) int main(int argc, char *argv[]) { - hid_t fid, fapl, dxpl; + hid_t fid = H5I_INVALID_HID; + hid_t fapl = H5I_INVALID_HID; + hid_t dxpl = H5I_INVALID_HID; H5F_t * f; haddr_t addr = 0, extra = 0, extra2 = 0, extra3 = 0, extra4 = 0; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; - H5E_auto2_t func; - void * edata; - herr_t status = SUCCEED; + H5E_auto2_t func = NULL; + void * edata = NULL; + herr_t status = SUCCEED; + int exit_value = 0; if (argc == 1) { - HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]]\n", argv[0]); - HDexit(1); + HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]); + exit_value = 1; + goto done; } /* end if */ /* Initialize the library */ if (H5open() < 0) { HDfprintf(stderr, "cannot initialize the library\n"); - HDexit(1); + exit_value = 1; + goto done; } /* end if */ /* Disable error reporting */ @@ -168,24 +171,29 @@ main(int argc, char *argv[]) */ if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) { HDfprintf(stderr, "cannot create dataset transfer property list\n"); - HDexit(1); + exit_value = 1; + goto done; } /* end if */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) { HDfprintf(stderr, "cannot create file access property list\n"); - HDexit(1); + exit_value = 1; + goto done; } /* end if */ if (HDstrchr(argv[1], '%')) if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) { HDfprintf(stderr, "cannot set file access property list\n"); - HDexit(1); + exit_value = 1; + goto done; } if ((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) { HDfprintf(stderr, "cannot open file\n"); - HDexit(1); + exit_value = 1; + goto done; } /* end if */ if (NULL == (f = (H5F_t *)H5I_object(fid))) { HDfprintf(stderr, "cannot obtain H5F_t pointer\n"); - HDexit(2); + exit_value = 2; + goto done; } /* end if */ /* @@ -208,7 +216,8 @@ main(int argc, char *argv[]) HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr); if (H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), dxpl, sig) < 0) { HDfprintf(stderr, "cannot read signature\n"); - HDexit(3); + exit_value = 3; + goto done; } if (!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) { /* @@ -262,7 +271,8 @@ main(int argc, char *argv[]) HDfprintf(stderr, "B-tree symbol table node usage:\n"); HDfprintf(stderr, "\th5debug
\n\n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra); @@ -277,7 +287,8 @@ main(int argc, char *argv[]) HDfprintf(stderr, "B-tree chunked storage node usage:\n"); HDfprintf(stderr, "\th5debug <# of dimensions> ...\n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ /* Build array of chunk dimensions */ @@ -287,7 +298,8 @@ main(int argc, char *argv[]) default: HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype)); - HDexit(4); + exit_value = 4; + goto done; } } else if (!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { @@ -315,7 +327,8 @@ main(int argc, char *argv[]) HDfprintf(stderr, "v2 B-tree internal node usage:\n"); HDfprintf(stderr, "\th5debug " " \n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, @@ -337,7 +350,8 @@ main(int argc, char *argv[]) HDfprintf( stderr, "\th5debug \n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, @@ -362,7 +376,8 @@ main(int argc, char *argv[]) HDfprintf( stderr, "\th5debug \n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5HF_dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra, (size_t)extra2); @@ -380,7 +395,8 @@ main(int argc, char *argv[]) HDfprintf( stderr, "\th5debug \n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = @@ -405,7 +421,8 @@ main(int argc, char *argv[]) HDfprintf(stderr, "Free space serialized sections usage:\n"); HDfprintf(stderr, "\th5debug \n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5FS_sects_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra, extra2); @@ -431,7 +448,8 @@ main(int argc, char *argv[]) HDfprintf(stderr, "Shared message list usage:\n"); HDfprintf(stderr, "\th5debug " "\n"); - HDexit(4); + exit_value = 4; + goto done; } /* end if */ status = H5SM_list_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, (unsigned)extra, @@ -469,21 +487,27 @@ main(int argc, char *argv[]) HDputchar('\n'); HDfprintf(stderr, "unknown signature\n"); - HDexit(4); + exit_value = 4; + goto done; } /* end else */ /* Check for an error when dumping information */ if (status < 0) { HDfprintf(stderr, "An error occurred!\n"); H5Eprint2(H5E_DEFAULT, stderr); - HDexit(5); + exit_value = 5; + goto done; } /* end if */ - H5Pclose(dxpl); - H5Pclose(fapl); - H5Fclose(fid); +done: + if (dxpl > 0) + H5Pclose(dxpl); + if (fapl > 0) + H5Pclose(fapl); + if (fid > 0) + H5Fclose(fid); H5Eset_auto2(H5E_DEFAULT, func, edata); - return 0; + return exit_value; } /* main() */ diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c index 93b6abf..ca93bb7 100644 --- a/tools/misc/h5repart.c +++ b/tools/misc/h5repart.c @@ -106,7 +106,7 @@ static off_t get_size(const char *progname, int *argno, int argc, char *argv[]) { off_t retval = -1; - char *suffix; + char *suffix = NULL; if (isdigit((int)(argv[*argno][2]))) { retval = HDstrtol(argv[*argno] + 2, &suffix, 10); diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c index 397954a..ada2ed3 100644 --- a/tools/perform/chunk.c +++ b/tools/perform/chunk.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, May 14, 1998 * * Purpose: Checks the effect of various I/O request sizes and raw data diff --git a/tools/perform/iopipe.c b/tools/perform/iopipe.c index 25e39ed..415d613 100644 --- a/tools/perform/iopipe.c +++ b/tools/perform/iopipe.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, March 12, 1998 */ @@ -54,8 +54,6 @@ * Programmer: Robb Matzke * Thursday, March 12, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ #ifdef H5_HAVE_GETRUSAGE @@ -105,8 +103,6 @@ print_stats(const char *prefix, struct timeval *r_start, struct timeval *r_stop, * Programmer: Robb Matzke * Thursday, March 12, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ static void @@ -139,8 +135,6 @@ synchronize(void) * Programmer: Robb Matzke * Thursday, March 12, 1998 * - * Modifications: - * *------------------------------------------------------------------------- */ int diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c index ec8c281..dba8220 100644 --- a/tools/perform/overhead.c +++ b/tools/perform/overhead.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, September 28, 1998 * * Purpose: Creates a chunked dataset and measures the storage overhead. diff --git a/tools/perform/perf_meta.c b/tools/perform/perf_meta.c index f9e1a7f..a93d673 100644 --- a/tools/perform/perf_meta.c +++ b/tools/perform/perf_meta.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Friday, Oct 3, 2004 * * Purpose: Tests performance of metadata diff --git a/tools/perform/pio_perf.h b/tools/perform/pio_perf.h index 027b553..24621da 100644 --- a/tools/perform/pio_perf.h +++ b/tools/perform/pio_perf.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef PIO_PERF_H__ -#define PIO_PERF_H__ +#ifndef PIO_PERF_H +#define PIO_PERF_H #ifndef STANDALONE #include "io_timer.h" @@ -97,4 +97,4 @@ extern results do_pio(parameters param); } #endif /* __cplusplus */ -#endif /* PIO_PERF_H__ */ +#endif /* PIO_PERF_H */ diff --git a/tools/perform/pio_standalone.h b/tools/perform/pio_standalone.h index bc5897d..55650f6 100644 --- a/tools/perform/pio_standalone.h +++ b/tools/perform/pio_standalone.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef PIO_STANDALONE_H__ -#define PIO_PERF_H__ +#ifndef PIO_STANDALONE_H +#define PIO_STANDALONE_H /* Header file for building h5perf by standalone mode. * Created: Christian Chilan, 2005/5/18. diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c index 32fb1bd..d42a450 100644 --- a/tools/perform/sio_engine.c +++ b/tools/perform/sio_engine.c @@ -783,7 +783,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) /* Allocate data verification buffer */ if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) { - HDfprintf(stderr, "malloc for data verification buffer size (%Zu) failed\n", linear_buf_size); + HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size); GOTOERROR(FAIL); } /* end if */ @@ -1263,8 +1263,7 @@ done: * 'temp' in the code below, but early (4.4.7, at least) gcc only * allows diagnostic pragmas to be toggled outside of functions. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +H5_GCC_DIAG_OFF("format-nonliteral") static void do_cleanupfile(iotype iot, char *filename) { @@ -1327,4 +1326,4 @@ do_cleanupfile(iotype iot, char *filename) } } } -#pragma GCC diagnostic pop +H5_GCC_DIAG_ON("format-nonliteral") diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c index 2d97d5a..54bdde0 100644 --- a/tools/perform/sio_perf.c +++ b/tools/perform/sio_perf.c @@ -872,9 +872,9 @@ report_parameters(struct options *opts) HDfprintf(output, "\n"); if (opts->page_size) { - HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size); + HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size); if (opts->page_buffer_size) - HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size); + HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size); else HDfprintf(output, "Page Buffering Disabled\n"); } diff --git a/tools/perform/sio_perf.h b/tools/perform/sio_perf.h index acdb801..6242782 100644 --- a/tools/perform/sio_perf.h +++ b/tools/perform/sio_perf.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef SIO_PERF_H__ -#define SIO_PERF_H__ +#ifndef SIO_PERF_H +#define SIO_PERF_H #ifndef STANDALONE #include "io_timer.h" @@ -101,4 +101,4 @@ extern void do_sio(parameters param, results *res); } #endif /* __cplusplus */ -#endif /* PIO_PERF_H__ */ +#endif /* SIO_PERF_H */ diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index 5dbd0dd..81c0eff 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef SIO_STANDALONE_H__ -#define SIO_PERF_H__ +#ifndef SIO_STANDALONE_H +#define SIO_STANDALONE_H /* Header file for building h5perf by standalone mode. * Created: Christian Chilan, 2005/5/18. -- cgit v0.12