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>
This commit is contained in:
Dana Robinson
2021-06-01 08:49:39 -05:00
committed by GitHub
co-authored by github-actions
parent 4ef33ef7cd
commit 50d0888f49
39 changed files with 453 additions and 651 deletions
+7 -5
View File
@@ -83,7 +83,8 @@ test_array_compound_array()
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
wdata[idxi][idxj].i = static_cast<int>(idxi * 10 + idxj);
for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
float temp = idxi * 10.0 + idxj * 2.5 + idxk;
float temp = static_cast<float>(idxi) * 10.0F + static_cast<float>(idxj) * 2.5F +
static_cast<float>(idxk);
wdata[idxi][idxj].f[idxk] = temp;
}
} // end for
@@ -242,7 +243,7 @@ test_array_compound_array()
verify_val(ndims, ARRAY1_RANK, "f2_atype_check.getArrayNDims", __LINE__, __FILE__);
// Get the array dimensions
HDmemset(rdims1, 0, H5S_MAX_RANK);
HDmemset(rdims1, 0, sizeof(rdims1));
f2_atype_check.getArrayDims(rdims1);
// Check the array dimensions
@@ -288,7 +289,7 @@ test_array_compound_array()
/*
* Helper routine to demonstrate the issue in HDFFV-9562
*/
H5::DataType
static H5::DataType
getArr()
{
hsize_t *dims = new hsize_t;
@@ -388,10 +389,11 @@ test_array_info()
for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) {
wdata[idxi][idxj].i = static_cast<int>(idxi * 10 + idxj);
for (idxk = 0; idxk < ARRAY1_DIM1; idxk++) {
float temp = idxi * 10.0 + idxj * 2.5 + idxk;
float temp = static_cast<float>(idxi) * 10.0F + static_cast<float>(idxj) * 2.5F +
static_cast<float>(idxk);
wdata[idxi][idxj].f[idxk] = temp;
}
} // end for
}
try {
// Create File