diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-06-01 13:49:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 13:49:39 (GMT) |
commit | 50d0888f491821435f6884c0c4c516f69ff67927 (patch) | |
tree | cfb3c7737ad9850667771206bc6f457da4e489fb /c++/test/tlinks.cpp | |
parent | 4ef33ef7cd0f2af55b34682b6949a101a68436bb (diff) | |
download | hdf5-50d0888f491821435f6884c0c4c516f69ff67927.zip hdf5-50d0888f491821435f6884c0c4c516f69ff67927.tar.gz hdf5-50d0888f491821435f6884c0c4c516f69ff67927.tar.bz2 |
C++ warning and build fixes (#707)
* Committing clang-format changes
* C++ build and warning updates
* Fixes all warnings on C++ (with gcc 9.3)
* Updates CMake and Autotools C++ builds
* Undo warning clobber
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++/test/tlinks.cpp')
-rw-r--r-- | c++/test/tlinks.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index e8dad5b..8c7f0cd 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -201,7 +201,8 @@ test_lcpl(hid_t fapl_id, hbool_t new_format) // Check that its character encoding is the default. linfo = file.getLinkInfo("/type"); - verify_val(linfo.cset, H5T_CSET_ASCII, "Character encoding is not default", __LINE__, __FILE__); + verify_val(static_cast<long>(linfo.cset), static_cast<long>(H5T_CSET_ASCII), + "Character encoding is not default", __LINE__, __FILE__); // Create a simple dataspace. dims[0] = H5L_DIM1; @@ -214,7 +215,8 @@ test_lcpl(hid_t fapl_id, hbool_t new_format) // Check that its character encoding is the default. linfo = file.getLinkInfo("/dataset"); - verify_val(linfo.cset, H5T_CSET_ASCII, "Character encoding is not default", __LINE__, __FILE__); + verify_val(static_cast<long>(linfo.cset), static_cast<long>(H5T_CSET_ASCII), + "Character encoding is not default", __LINE__, __FILE__); // Create a link creation property list with the UTF-8 character encoding. LinkCreatPropList lcpl; @@ -226,7 +228,8 @@ test_lcpl(hid_t fapl_id, hbool_t new_format) // Check that its character encoding is UTF-8. linfo = file.getLinkInfo(GROUP2NAME); - verify_val(linfo.cset, H5T_CSET_UTF8, "Character encoding is not UTF-8", __LINE__, __FILE__); + verify_val(static_cast<long>(linfo.cset), static_cast<long>(H5T_CSET_UTF8), + "Character encoding is not UTF-8", __LINE__, __FILE__); PASSED(); } // end of try block @@ -580,12 +583,13 @@ const H5std_string GROUP_NAME("/Data"); const H5std_string DSET1_NAME("/Data/Compressed_Data"); const H5std_string DSET2_NAME("/Data/Float_Data"); const int RANK = 2; -const int DIM1 = 2; // Operator function static int visit_obj_cb(H5Object &obj, const H5std_string name, const H5O_info2_t *oinfo, void *_op_data) { + (void)obj; // Unused + ovisit_ud_t *op_data = static_cast<ovisit_ud_t *>(_op_data); // Check for correct object information |