diff options
Diffstat (limited to 'c++/test/tarray.cpp')
-rw-r--r-- | c++/test/tarray.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp index 7525c5f..c7c0b65 100644 --- a/c++/test/tarray.cpp +++ b/c++/test/tarray.cpp @@ -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 |