diff options
author | kmu <kmu@hdfgroup.org> | 2020-01-23 21:12:00 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2020-01-23 21:12:00 (GMT) |
commit | 838d4ec56bfc82266a2110635e14d36e075075cc (patch) | |
tree | 0da94266f7a4f65b4f2f9045c2913dce9ec89863 /test/dsets.c | |
parent | a9aaad9be317ed92150ccc6b4e8574e596447dba (diff) | |
download | hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.zip hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.gz hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.bz2 |
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 061642a..bbe2d0f 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7269,8 +7269,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]); @@ -7390,14 +7390,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]); @@ -7506,8 +7506,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]); @@ -9732,8 +9732,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]); @@ -9861,8 +9861,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]); |