diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-03-06 23:33:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-06 23:33:00 (GMT) |
commit | 78375882485a99a81caa933928ed08d7a38ef88b (patch) | |
tree | f18c41d7794d546b6562dd2aa36932c78f00a16a /c++ | |
parent | 7e176db164d1a6f944e703c612c4952b15d333f4 (diff) | |
download | hdf5-78375882485a99a81caa933928ed08d7a38ef88b.zip hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.gz hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.bz2 |
VFD SWMR: normalization with develop (#1472)
Much normalization with develop. Still needs tools changes wrt VFD plugins.
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5AbstractDs.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5Attribute.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5DataSet.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5DataSpace.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5DataType.cpp | 4 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5File.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5Group.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5Location.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5Location.h | 4 | ||||
-rw-r--r-- | c++/src/H5PredType.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5PropList.cpp | 2 | ||||
-rw-r--r-- | c++/src/cpp_doc_config | 2 | ||||
-rw-r--r-- | c++/test/CMakeVFDTests.cmake | 16 | ||||
-rw-r--r-- | c++/test/tattr.cpp | 8 | ||||
-rw-r--r-- | c++/test/testhdf5.cpp | 2 | ||||
-rw-r--r-- | c++/test/th5s.cpp | 2 | ||||
-rw-r--r-- | c++/test/titerate.cpp | 9 | ||||
-rw-r--r-- | c++/test/tobject.cpp | 2 | ||||
-rw-r--r-- | c++/test/ttypes.cpp | 2 | ||||
-rw-r--r-- | c++/test/tvlstr.cpp | 10 |
21 files changed, 36 insertions, 45 deletions
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index eeb0155..70d8531 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -302,7 +302,7 @@ AbstractDs::getStrType() const //-------------------------------------------------------------------------- // Function: AbstractDs::getVarLenType -///\brief Returns the floating-point datatype of this abstract dataset, +///\brief Returns the variable length datatype of this abstract dataset, /// which can be a dataset or an attribute. ///\return VarLenType instance ///\exception H5::DataTypeIException diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 954222c..520a4f6 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -562,7 +562,7 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index ce56e30..627d81b 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -769,7 +769,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id, ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. //-------------------------------------------------------------------------- diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 342e9fa..e4aef83 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -629,7 +629,7 @@ DataSpace::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index af58a90..ff8f6dc 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -927,7 +927,7 @@ DataType::p_opentype(const H5Location &loc, const char *dtype_name) const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // Programmer Binh-Minh Ribler - 2000 @@ -983,7 +983,7 @@ DataType::close() // - Replaced decRefCount with close() to let the C library // handle the reference counting - BMR, Jun 1, 2006 // - Added the use of H5CPP_EXITED to terminate the HDF5 library -// and elimiate previous memory leaks. See comments in the +// and eliminate previous memory leaks. See comments in the // header file "H5PredType.h" for details. - BMR, Mar 30, 2012 // - Major re-implementation of the global constants was done // to avoid relying on the order of the creation and deletion diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index a9270fd..da19d8d 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -552,7 +552,7 @@ DSetCreatPropList::setShuffle() const ///\exception H5::PropListIException ///\par Description /// The values of space allocation time can be one of the -/// followings: +/// following: /// \li \c H5D_ALLOC_TIME_DEFAULT /// \li \c H5D_ALLOC_TIME_EARLY /// \li \c H5D_ALLOC_TIME_LATE diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index f92171b..92a8d59 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -665,7 +665,7 @@ H5File::getLocId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // December 2000 diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index fe791da..b017f4f 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -208,7 +208,7 @@ Group::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index eb8dd4c..13a89aa 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -1745,7 +1745,7 @@ H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t // Function: H5Location::getObjinfo ///\brief This is an overloaded member function, provided for convenience. /// It differs from the above functions in that it doesn't have -/// the paramemter \a follow_link. +/// the parameter \a follow_link. // Nov, 2005 //-------------------------------------------------------------------------- void diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index 740d0ce..0aec4d2 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -15,7 +15,7 @@ #ifndef H5Location_H #define H5Location_H -#include "H5Classes.h" // constains forward class declarations +#include "H5Classes.h" // contains forward class declarations namespace H5 { @@ -334,7 +334,7 @@ class H5_DLLCPP H5Location : public IdComponent { #endif // DOXYGEN_SHOULD_SKIP_THIS // Noop destructor. - virtual ~H5Location(); + virtual ~H5Location() override; }; // end of H5Location } // namespace H5 diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index c407c33..9458fb7 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -790,7 +790,7 @@ September 2015: classes, such as PropList, PredType, DataSpace, etc... Previously, these global constants were declared statically and the C++ library used a constant, called PredType::AtExit, to detect when all the global - contants are destroyed then close the C library (H5close). This method + constants are destroyed then close the C library (H5close). This method relied on the order of the constants being created and destroyed and that PredType constants be the last to be destroyed. In September 2015, it was recognized that the order in which the global constants were diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 7ee8395..e7a83af 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -301,7 +301,7 @@ PropList::getId() const ///\exception H5::IdComponentException when the attempt to close the HDF5 /// object fails // Description: -// The underlaying reference counting in the C library ensures +// The underlying reference counting in the C library ensures // that the current valid id of this object is properly closed. // Then the object's id is reset to the new id. // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 3eb7645..1e26187 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -38,7 +38,7 @@ PROJECT_NAME = # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.13.1-1, currently under development" +PROJECT_NUMBER = "1.13.2-1, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake index 360d14e..ced9b0c 100644 --- a/c++/test/CMakeVFDTests.cmake +++ b/c++/test/CMakeVFDTests.cmake @@ -15,20 +15,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - -set (VFD_LIST - sec2 - stdio - core - core_paged - split - multi - family -) - -if (H5_HAVE_DIRECT) - set (VFD_LIST ${VFD_LIST} direct) -endif () +H5_CREATE_VFD_DIR() ############################################################################## ############################################################################## @@ -38,7 +25,6 @@ endif () macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) - file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}") add_test ( NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects COMMAND ${CMAKE_COMMAND} -E remove diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 26699d2..dc968f9 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -95,7 +95,7 @@ struct attr4_struct { const H5std_string ATTR5_NAME("Attr5"); const int ATTR5_RANK = 0; -float attr_data5 = -5.123f; // Test data for 5th attribute +float attr_data5 = -5.123F; // Test data for 5th attribute /* Info for another attribute */ const H5std_string ATTR1A_NAME("Attr1_a"); @@ -1782,7 +1782,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl) unsigned attr_num; for (attr_num = 0; attr_num < max_compact; attr_num++) { // Create attribute - sprintf(attr_name, "attr %02u", attr_num); + snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num); Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space); // Write data to the attribute @@ -1794,7 +1794,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl) { // Add one more attribute, to push into "dense" storage // Create another attribute - sprintf(attr_name, "attr %02u", attr_num); + snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num); Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space); // Write data to the attribute @@ -1804,7 +1804,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl) // Attempt to add attribute again, which should fail try { // Create another attribute - sprintf(attr_name, "attr %02u", attr_num); + snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num); Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space); // continuation here, that means no exception has been thrown diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp index 71428ce..af50646 100644 --- a/c++/test/testhdf5.cpp +++ b/c++/test/testhdf5.cpp @@ -114,7 +114,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP)) TestCleanup(); /* Release test infrastructure */ diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 5808136..461d258 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -73,7 +73,7 @@ struct space4_struct { unsigned u; float f; char c2; -} space4_data = {'v', 987123, -3.14f, 'g'}; /* Test data for 4th dataspace */ +} space4_data = {'v', 987123, -3.14F, 'g'}; /* Test data for 4th dataspace */ /* Null dataspace */ int space5_data = 7; diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp index b6a9436..57761ea 100644 --- a/c++/test/titerate.cpp +++ b/c++/test/titerate.cpp @@ -160,7 +160,7 @@ test_iter_group(FileAccPropList &fapl) DataSpace filespace; for (int i = 0; i < NDATASETS; i++) { - sprintf(name, "Dataset %d", i); + snprintf(name, sizeof(name), "Dataset %d", i); // Create a dataset in the file DataSet dataset = file.createDataSet(name, datatype, filespace); @@ -351,7 +351,7 @@ test_iter_group(FileAccPropList &fapl) * Purpose Open an attribute and verify that it has a the correct name *------------------------------------------------------------------------- */ -const H5std_string FILE_NAME("titerate.h5"); +const H5std_string FILE_NAME("test_member_access.h5"); const H5std_string GRP_NAME("/Group_A"); const H5std_string FDATASET_NAME("file dset"); const H5std_string GDATASET_NAME("group dset"); @@ -396,6 +396,9 @@ test_HDFFV_9920() int attr_data[2] = {100, 200}; hsize_t dims[1] = {DIM1}; + /* Output message about test being performed */ + SUBTEST("Member access"); + try { // Create a new file and a group in it H5File file(FILE_NAME, H5F_ACC_TRUNC); @@ -425,6 +428,7 @@ test_HDFFV_9920() printelems(file, FDATASET_NAME, FATTR_NAME); printelems(gr1, GDATASET_NAME, GATTR_NAME); + PASSED(); } // end of try block // Catch all failures for handling in the same way @@ -473,4 +477,5 @@ extern "C" void cleanup_iterate() { HDremove(FILE_ITERATE.c_str()); + HDremove(FILE_NAME.c_str()); } // cleanup_iterate diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp index 2b694da..f040007 100644 --- a/c++/test/tobject.cpp +++ b/c++/test/tobject.cpp @@ -740,7 +740,7 @@ test_object() MESSAGE(5, ("Testing Object Functions\n")); test_get_objname(); // Test get object name from groups/datasets - test_existance(); // Test check for object existance + test_existance(); // Test check for object existence test_get_objname_ontypes(); // Test get object name from types test_get_objtype(); // Test get object type test_open_object_header(); // Test object header functions (H5O) diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 69c93d1..8afb4bb 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -28,7 +28,7 @@ using namespace H5; #include "h5cpputil.h" // C++ utilility header file /* - * Offset from alinged memory returned by malloc(). This can be used to test + * Offset from aligned memory returned by malloc(). This can be used to test * that type conversions handle non-aligned buffers correctly. */ #define ALIGNMENT 1 diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp index c91b566..405ca07 100644 --- a/c++/test/tvlstr.cpp +++ b/c++/test/tvlstr.cpp @@ -917,32 +917,32 @@ test_vl_rewrite() int i; char name[256]; // Buffer for names & data for (i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + snprintf(name, sizeof(name), "/set_%d", i); write_scalar_dset(file1, type, space, name, name); } // Effectively copy data from file 1 to 2. for (i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + snprintf(name, sizeof(name), "/set_%d", i); read_scalar_dset(file1, type, space, name, name); write_scalar_dset(file2, type, space, name, name); } // Read back from file 2. for (i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + snprintf(name, sizeof(name), "/set_%d", i); read_scalar_dset(file2, type, space, name, name); } // Remove from file 2. for (i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + snprintf(name, sizeof(name), "/set_%d", i); file2.unlink(name); } // Effectively copy from file 1 to file 2. for (i = 0; i < REWRITE_NDATASETS; i++) { - sprintf(name, "/set_%d", i); + snprintf(name, sizeof(name), "/set_%d", i); read_scalar_dset(file1, type, space, name, name); write_scalar_dset(file2, type, space, name, name); } |