diff options
author | Kimmy Mu <kmu@hdfgroup.org> | 2020-01-23 22:21:06 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2020-01-28 02:47:06 (GMT) |
commit | fe75e8f66f79c16d083d80ccdca303f267e96745 (patch) | |
tree | 345d20f70d273b8512aa6cf309a72d7c7b441ab4 /test/dsets.c | |
parent | b87a4362a12428613c2b8bd3ba2aa33828b4d5af (diff) | |
download | hdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.zip hdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.tar.gz hdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.tar.bz2 |
Merge pull request #2300 in HDFFV/hdf5 from ~KMU/hdf5:squashed_cast to develop
* commit 'af5c33afabdae2e39bb45eb1b3e9c8366da01145':
remove unnecessary stuff
squash cast warning fix
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/dsets.c b/test/dsets.c index f6f7f4a..8f89d82 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7165,8 +7165,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) /* Generate random point coordinates. Only one point is selected per chunk */ for(i=0; i<NPOINTS; i++){ - chunk_row = (int)(ofs / cols); - chunk_col = (int)(ofs % cols); + H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); + H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); HDassert(!check2[chunk_row][chunk_col]); @@ -7286,14 +7286,14 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) for(j = 0; j < nsize[1] / csize[1]; j++) check2[i][j] = 0; - rows = (long)(nsize[0] / csize[0]); - cols = (long)(nsize[1] / csize[1]); + H5_CHECKED_ASSIGN(rows, int, nsize[0] / csize[0], long); + H5_CHECKED_ASSIGN(cols, int, nsize[1] / csize[1], long); make_random_offset_and_increment(rows * cols, &ofs, &inc); /* Generate random point coordinates. Only one point is selected per chunk */ for(i = 0; i < NPOINTS; i++){ - chunk_row = (int)(ofs / cols); - chunk_col = (int)(ofs % cols); + H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); + H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); HDassert(!check2[chunk_row][chunk_col]); @@ -7402,8 +7402,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) /* Generate random point coordinates. Only one point is selected per chunk */ for(i = 0; i < NPOINTS; i++){ - chunk_row = (int)(ofs / cols); - chunk_col = (int)(ofs % cols); + H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); + H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); HDassert(!check2[chunk_row][chunk_col]); @@ -9524,8 +9524,8 @@ test_fixed_array(hid_t fapl) /* Generate random point coordinates. Only one point is selected per chunk */ for(i = 0; i < POINTS; i++){ - chunk_row = (int)(ofs / cols); - chunk_col = (int)(ofs % cols); + H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); + H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); HDassert(!chunks[chunk_row][chunk_col]); @@ -9653,8 +9653,8 @@ test_fixed_array(hid_t fapl) /* Generate random point coordinates. Only one point is selected per chunk */ for(i = 0; i < POINTS_BIG; i++){ - chunk_row = (int)(ofs / cols); - chunk_col = (int)(ofs % cols); + H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); + H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); HDassert(!chunks_big[chunk_row][chunk_col]); |