summaryrefslogtreecommitdiffstats
path: root/test/tselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-07-22 22:43:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-07-22 22:43:18 (GMT)
commit4af66b09e03af4e9b0b6a1293dfe746f48106aba (patch)
tree0cb162e0921a0a774a433f9d3cd9f08c44bbe57d /test/tselect.c
parent9b597a48552f5201b37793a4c6fece4fd9f1c346 (diff)
downloadhdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.zip
hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.gz
hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.bz2
[svn-r30219] Description:
More warning cleaups: down to 770 warnings (from ~940) in 134 files (from 148), with 28 unique kinds of warnings (from 31). Tested on: MacOSX/64 10.11.5 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'test/tselect.c')
-rw-r--r--test/tselect.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/tselect.c b/test/tselect.c
index 73b8015..9230d8b 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -720,7 +720,7 @@ test_select_all(hid_t xfer_plist)
for(i=0, tbuf=wbuf; i<SPACE4_DIM1; i++)
for(j=0; j<SPACE4_DIM2; j++)
for(k=0; k<SPACE4_DIM3; k++)
- *tbuf++ = (uint8_t)(((i * SPACE4_DIM2) + j) * SPACE4_DIM3) + k;
+ *tbuf++ = (uint8_t)((((i * SPACE4_DIM2) + j) * SPACE4_DIM3) + k);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -7188,8 +7188,8 @@ test_select_fill_point(hssize_t *offset)
/* Add in the offset */
for(u = 0; u < (unsigned)num_points; u++) {
- points[u][0] = (hsize_t)(points[u][0] + real_offset[0]);
- points[u][1] = (hsize_t)(points[u][1] + real_offset[1]);
+ points[u][0] = (hsize_t)((hssize_t)points[u][0] + real_offset[0]);
+ points[u][1] = (hsize_t)((hssize_t)points[u][1] + real_offset[1]);
} /* end for */
/* Iterate through selection, verifying correct data */
@@ -7269,8 +7269,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
/* Verify memory buffer the hard way... */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
for(v = 0; v < SPACE7_DIM2; v++, tbuf++) {
- if((u >= (unsigned)(start[0] + real_offset[0]) && u < (unsigned)(start[0] + count[0] + real_offset[0]))
- && (v >= (unsigned)(start[1] + real_offset[1]) && v < (unsigned)(start[1] + count[1] + real_offset[1]))) {
+ if((u >= (unsigned)((hssize_t)start[0] + real_offset[0]) && u < (unsigned)((hssize_t)(start[0] + count[0]) + real_offset[0]))
+ && (v >= (unsigned)((hssize_t)start[1] + real_offset[1]) && v < (unsigned)((hssize_t)(start[1] + count[1]) + real_offset[1]))) {
if(*tbuf != (unsigned)fill_value)
TestErrPrintf("Error! v=%u, u=%u, *tbuf=%u, fill_value=%u\n", v, u, *tbuf, (unsigned)fill_value);
} /* end if */
@@ -7288,8 +7288,8 @@ test_select_fill_hyper_simple(hssize_t *offset)
/* Set the coordinates of the selection (with the offset) */
for(u = 0, num_points = 0; u < (unsigned)count[0]; u++)
for(v = 0; v < (unsigned)count[1]; v++, num_points++) {
- points[num_points][0] = (hsize_t)(u + start[0] + real_offset[0]);
- points[num_points][1] = (hsize_t)(v + start[1] + real_offset[1]);
+ points[num_points][0] = (hsize_t)((hssize_t)(u + start[0]) + real_offset[0]);
+ points[num_points][1] = (hsize_t)((hssize_t)(v + start[1]) + real_offset[1]);
} /* end for */
/* Iterate through selection, verifying correct data */
@@ -7379,7 +7379,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
for(v = 0; v < SPACE7_DIM2; v++, tbuf++) {
for(w = 0; w < (unsigned)num_points; w++) {
- if(u == (unsigned)(points[w][0] + real_offset[0]) && v == (unsigned)(points[w][1] + real_offset[1])) {
+ if(u == (unsigned)((hssize_t)points[w][0] + real_offset[0]) && v == (unsigned)((hssize_t)points[w][1] + real_offset[1])) {
if(*tbuf != (unsigned)fill_value)
TestErrPrintf("Error! v=%u, u=%u, *tbuf=%u, fill_value=%u\n", v, u, *tbuf, (unsigned)fill_value);
break;
@@ -7396,8 +7396,8 @@ test_select_fill_hyper_regular(hssize_t *offset)
/* Add in the offset */
for(u = 0; u < (unsigned)num_points; u++) {
- points[u][0] = (hsize_t)(points[u][0] + real_offset[0]);
- points[u][1] = (hsize_t)(points[u][1] + real_offset[1]);
+ points[u][0] = (hsize_t)((hssize_t)points[u][0] + real_offset[0]);
+ points[u][1] = (hsize_t)((hssize_t)points[u][1] + real_offset[1]);
} /* end for */
/* Iterate through selection, verifying correct data */
@@ -7502,7 +7502,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
for(v = 0; v < SPACE7_DIM2; v++, tbuf++) {
for(w = 0; w < (unsigned)num_points; w++) {
- if(u == (unsigned)(points[w][0] + real_offset[0]) && v == (unsigned)(points[w][1] + real_offset[1])) {
+ if(u == (unsigned)((hssize_t)points[w][0] + real_offset[0]) && v == (unsigned)((hssize_t)points[w][1] + real_offset[1])) {
if(*tbuf != (unsigned)fill_value)
TestErrPrintf("Error! v=%u, u=%u, *tbuf=%u, fill_value=%u\n", v, u, *tbuf, (unsigned)fill_value);
break;
@@ -7519,8 +7519,8 @@ test_select_fill_hyper_irregular(hssize_t *offset)
/* Add in the offset */
for(u = 0; u < (unsigned)num_iter_points; u++) {
- iter_points[u][0] = (hsize_t)(iter_points[u][0] + real_offset[0]);
- iter_points[u][1] = (hsize_t)(iter_points[u][1] + real_offset[1]);
+ iter_points[u][0] = (hsize_t)((hssize_t)iter_points[u][0] + real_offset[0]);
+ iter_points[u][1] = (hsize_t)((hssize_t)iter_points[u][1] + real_offset[1]);
} /* end for */
/* Iterate through selection, verifying correct data */
@@ -13652,9 +13652,9 @@ test_hyper_unlim(void)
VERIFY(start2[0], start[0], "H5Sget_select_bounds");
VERIFY(start2[1], start[1], "H5Sget_select_bounds");
VERIFY(start2[2], start[2], "H5Sget_select_bounds");
- VERIFY(count2[0], start[0] + (stride[0] * (count[0] - (hsize_t)1)) + block[0] - (hsize_t)1, "H5Sget_select_bounds");
+ VERIFY(count2[0], (long)(start[0] + (stride[0] * (count[0] - 1)) + block[0] - 1), "H5Sget_select_bounds");
VERIFY(count2[1], H5S_UNLIMITED, "H5Sget_select_bounds");
- VERIFY(count2[2], start[2] + (stride[2] * (count[2] - (hsize_t)1)) + block[2] - (hsize_t)1, "H5Sget_select_bounds");
+ VERIFY(count2[2], (long)(start[2] + (stride[2] * (count[2] - 1)) + block[2] - 1), "H5Sget_select_bounds");
/* Close the dataspace */
ret = H5Sclose(sid);