Skip to content

Commit

Permalink
Merge pull request #6 from HDFGroup/develop
Browse files Browse the repository at this point in the history
Sync with the official repo.
  • Loading branch information
hyoklee authored Apr 3, 2021
2 parents 115fd1c + 78fe675 commit b12f98e
Show file tree
Hide file tree
Showing 97 changed files with 3,233 additions and 4,200 deletions.
35 changes: 21 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
# If the parent project needs to install hdf libraries, but avoid
# name conflicts with system versions, then a prefix may be added
# to ensure that the correct versions configured are used.
set (HDF5_LIB_INFIX "" CACHE STRING "Use infix for custom library naming.")
mark_as_advanced (HDF5_LIB_INFIX)
# HDF5_LIB_INFIX :
# This infix is added to all library names after 'hdf5'.
# e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so'
# This name is used in packages on debian based systems.
# (see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist)
#
# HDF5_INSTALL_BIN_DIR, HDF5_INSTALL_LIB_DIR, HDF5_INSTALL_INCLUDE_DIR, HDF5_INSTALL_DATA_DIR :
# Customize the 'bin', 'lib', 'include', and 'share' installation directories.
Expand Down Expand Up @@ -130,20 +137,20 @@ mark_as_advanced (ALLOW_UNSUPPORTED)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
#-----------------------------------------------------------------------------
set (HDF5_LIB_CORENAME "hdf5")
set (HDF5_TEST_LIB_CORENAME "hdf5_test")
set (HDF5_CPP_LIB_CORENAME "hdf5_cpp")
set (HDF5_HL_LIB_CORENAME "hdf5_hl")
set (HDF5_HL_CPP_LIB_CORENAME "hdf5_hl_cpp")
set (HDF5_TOOLS_LIB_CORENAME "hdf5_tools")
set (HDF5_UTILS_LIB_CORENAME "hdf5_utils")
set (HDF5_F90_LIB_CORENAME "hdf5_fortran")
set (HDF5_F90_C_LIB_CORENAME "hdf5_f90cstub")
set (HDF5_F90_TEST_LIB_CORENAME "hdf5_test_fortran")
set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5_test_f90cstub")
set (HDF5_HL_F90_LIB_CORENAME "hdf5_hl_fortran")
set (HDF5_HL_F90_C_LIB_CORENAME "hdf5_hl_f90cstub")
set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5_java")
set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}")
set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test")
set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp")
set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl")
set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp")
set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools")
set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils")
set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran")
set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub")
set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran")
set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub")
set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran")
set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub")
set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java")
set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5")
set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5")

Expand Down
7 changes: 4 additions & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@

./config/site-specific/BlankForm

./doc/branches-explained.md
./doc/code-conventions.md
./doc/contributing.md

./doxygen/aliases
./doxygen/Doxyfile.in
Expand Down Expand Up @@ -995,8 +997,6 @@
./src/H5SMpkg.h
./src/H5SMprivate.h
./src/H5SMtest.c
./src/H5ST.c
./src/H5STprivate.h
./src/H5T.c
./src/H5Tarray.c
./src/H5Tbit.c
Expand Down Expand Up @@ -1313,7 +1313,6 @@
./test/ttsafe_cancel.c
./test/ttsafe_dcreate.c
./test/ttsafe_error.c
./test/ttst.c
./test/tunicode.c
./test/tvlstr.c
./test/tvltypes.c
Expand Down Expand Up @@ -2132,6 +2131,8 @@
./tools/testfiles/twithddl.exp
./tools/testfiles/twithddlfile.ddl
./tools/testfiles/twithddlfile.exp
./tools/testfiles/tCVE_2018_11206_fill_old.h5
./tools/testfiles/tCVE_2018_11206_fill_new.h5

# h5dump test error files
./tools/test/h5dump/errfiles/filter_fail.err
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5DaccProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ DSetAccPropList::getConstant()
void
DSetAccPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5DataSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ DataSpace::getConstant()
void
DataSpace::deleteConstants()
{
if (ALL_ != 0)
delete ALL_;
delete ALL_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5DcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ DSetCreatPropList::getConstant()
void
DSetCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5DxferProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ DSetMemXferPropList::getConstant()
void
DSetMemXferPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5FaccProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ FileAccPropList::getConstant()
void
FileAccPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5FcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ FileCreatPropList::getConstant()
void
FileCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5LaccProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ LinkAccPropList::getConstant()
void
LinkAccPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5LcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ LinkCreatPropList::getConstant()
void
LinkCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5OcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ ObjCreatPropList::getConstant()
void
ObjCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/src/H5PropList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ PropList::getConstant()
void
PropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
delete DEFAULT_;
}

//--------------------------------------------------------------------------
Expand Down
36 changes: 12 additions & 24 deletions c++/test/dsets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,15 @@ test_create(H5File &file)
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;

// clean up and return with failure
if (dataset != NULL)
delete dataset;
delete dataset;
return -1;
}
// catch all other exceptions
catch (Exception &E) {
issue_fail_msg("test_create", __LINE__, __FILE__);

// clean up and return with failure
if (dataset != NULL)
delete dataset;
delete dataset;
return -1;
}
} // test_create
Expand Down Expand Up @@ -249,8 +247,7 @@ test_simple_io(H5File &file)
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;

// clean up and return with failure
if (tconv_buf)
delete[] tconv_buf;
delete[] tconv_buf;
return -1;
}
} // test_simple_io
Expand Down Expand Up @@ -692,10 +689,8 @@ test_compression(H5File &file)
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;

// clean up and return with failure
if (dataset != NULL)
delete dataset;
if (tconv_buf)
delete[] tconv_buf;
delete dataset;
delete[] tconv_buf;
return -1;
}
} // test_compression
Expand Down Expand Up @@ -885,8 +880,7 @@ test_multiopen(H5File &file)
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;

// clean up and return with failure
if (space != NULL)
delete space;
delete space;
return -1;
}
} // test_multiopen
Expand Down Expand Up @@ -964,8 +958,7 @@ test_types(H5File &file)
cerr << " <<< "
<< "bitfield_1: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
<< endl;
if (dset != NULL)
delete dset;
delete dset;
return -1;
}

Expand Down Expand Up @@ -996,8 +989,7 @@ test_types(H5File &file)
cerr << " <<< "
<< "bitfield_2: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
<< endl;
if (dset != NULL)
delete dset;
delete dset;
throw E; // propagate the exception
}

Expand Down Expand Up @@ -1031,10 +1023,8 @@ test_types(H5File &file)
cerr << " <<< "
<< "opaque_1: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
<< endl;
if (dset != NULL)
delete dset;
if (optype != NULL)
delete optype;
delete dset;
delete optype;
throw E; // propagate the exception
}

Expand Down Expand Up @@ -1067,10 +1057,8 @@ test_types(H5File &file)
cerr << " <<< "
<< "opaque_2: " << E.getFuncName() << " - " << E.getDetailMsg() << " >>>" << endl
<< endl;
if (dset != NULL)
delete dset;
if (optype != NULL)
delete optype;
delete dset;
delete optype;
throw E; // propagate the exception
}

Expand Down
12 changes: 4 additions & 8 deletions c++/test/tcompound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ test_compound_2()
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}

if (array_dt)
delete array_dt;
delete array_dt;
} // test_compound_2()

/*-------------------------------------------------------------------------
Expand Down Expand Up @@ -287,8 +286,7 @@ test_compound_3()
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}

if (array_dt)
delete array_dt;
delete array_dt;
} // test_compound_3()

/*-------------------------------------------------------------------------
Expand Down Expand Up @@ -407,8 +405,7 @@ test_compound_4()
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}

if (array_dt)
delete array_dt;
delete array_dt;
} // test_compound_4()

/*-------------------------------------------------------------------------
Expand Down Expand Up @@ -504,8 +501,7 @@ test_compound_5()
issue_fail_msg(E.getCFuncName(), __LINE__, __FILE__, E.getCDetailMsg());
}

if (array_dt)
delete array_dt;
delete array_dt;
} // test_compound_5()

/*-------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions c++/test/tfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ test_file_create()
catch (InvalidActionException &E) {
cerr << " *FAILED*" << endl;
cerr << " <<< " << E.getDetailMsg() << " >>>" << endl << endl;
if (file1 != NULL) // clean up
delete file1;
// clean up
delete file1;
}
// catch all other exceptions
catch (Exception &E) {
issue_fail_msg("test_file_create()", __LINE__, __FILE__, E.getCDetailMsg());
if (file1 != NULL) // clean up
delete file1;
// clean up
delete file1;
}

// Setting this to NULL for cleaning up in failure situations
Expand Down Expand Up @@ -260,8 +260,8 @@ test_file_create()
// catch all exceptions
catch (Exception &E) {
issue_fail_msg("test_file_create()", __LINE__, __FILE__, E.getCDetailMsg());
if (tmpl1 != NULL) // clean up
delete tmpl1;
// clean up
delete tmpl1;
}
} // test_file_create()

Expand Down
9 changes: 3 additions & 6 deletions c++/test/trefer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ test_reference_params()
issue_fail_msg("test_reference_param()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}

if (file1)
delete file1;
delete file1;
} /* test_reference_param() */

/*-------------------------------------------------------------------------
Expand Down Expand Up @@ -374,8 +373,7 @@ test_reference_obj()
issue_fail_msg("test_reference_obj()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}

if (file1)
delete file1;
delete file1;
} // test_reference_obj()

/*-------------------------------------------------------------------------
Expand Down Expand Up @@ -518,8 +516,7 @@ test_reference_group()
issue_fail_msg("test_reference_group()", __LINE__, __FILE__, E.getCFuncName(), E.getCDetailMsg());
}

if (file1)
delete file1;
delete file1;
} /* test_reference_group() */

/*-------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions c++/test/ttypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,7 @@ test_named()
issue_fail_msg("test_named", __LINE__, __FILE__, E.getCDetailMsg());
}

if (ds_type)
delete ds_type;
delete ds_type;
} // test_named

/*-------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit b12f98e

Please sign in to comment.