summaryrefslogtreecommitdiffstats
path: root/test/tselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-11-27 16:29:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-11-27 16:29:13 (GMT)
commitd456c2bb82be98bc2b7c1039927eb52258d1a0eb (patch)
treea7d8a65aef5d962c89b0965c86eb535917c023ad /test/tselect.c
parent05264c88788f9bd9b04a58673ded246904210235 (diff)
downloadhdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.zip
hdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.tar.gz
hdf5-d456c2bb82be98bc2b7c1039927eb52258d1a0eb.tar.bz2
[svn-r4643] Purpose:
Code cleanup Description: Windows is generating hundreds of warnings from some of the practices in the library. Mostly, they are because size_t is 32-bit and hsize_t is 64-bit on Windows and we were carelessly casting the larger values down to the smaller ones without checking for overflow. Also, some other small code cleanups,etc. Solution: Re-worked some algorithms to eliminate the casts and also added more overflow checking for assignments and function parameters which needed casts. Kent did most of the work, I just went over his changes and fit them into the the library code a bit better. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'test/tselect.c')
-rw-r--r--test/tselect.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/tselect.c b/test/tselect.c
index 32b7226..785d8be 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -348,7 +348,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(temp_coord1[i][2],coord1[i][2],"H5Sget_select_elem_pointlist");
} /* end for */
- ret = H5Sget_select_npoints(sid1);
+ ret = (int)H5Sget_select_npoints(sid1);
VERIFY(ret, 10, "H5Sget_select_npoints");
/* Append another sequence of ten points to disk dataset */
@@ -373,7 +373,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(temp_coord1[i][2],coord1[i][2],"H5Sget_select_elem_pointlist");
} /* end for */
- ret = H5Sget_select_npoints(sid1);
+ ret = (int)H5Sget_select_npoints(sid1);
VERIFY(ret, 20, "H5Sget_select_npoints");
/* Select sequence of ten points for memory dataset */
@@ -402,7 +402,7 @@ test_select_point(hid_t xfer_plist)
/* the next list of points to the beginning of the point selection list) */
HDmemcpy(((char *)pi.coord)+sizeof(coord2),coord2,sizeof(coord2));
- ret = H5Sget_select_npoints(sid2);
+ ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_npoints");
/* Append another sequence of ten points to memory dataset */
@@ -426,7 +426,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(temp_coord2[i][1],coord2[i][1],"H5Sget_select_elem_pointlist");
} /* end for */
- ret = H5Sget_select_npoints(sid2);
+ ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 20, "H5Sget_select_npoints");
/* Save points for later iteration */
@@ -468,7 +468,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(temp_coord3[i][1],coord3[i][1],"H5Sget_select_elem_pointlist");
} /* end for */
- ret = H5Sget_select_npoints(sid2);
+ ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_npoints");
/* Append another sequence of ten points to disk dataset */
@@ -491,8 +491,7 @@ test_select_point(hid_t xfer_plist)
VERIFY(temp_coord3[i][0],coord3[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord3[i][1],coord3[i][1],"H5Sget_select_elem_pointlist");
} /* end for */
-
- ret = H5Sget_select_npoints(sid2);
+ ret = (int)H5Sget_select_npoints(sid2);
VERIFY(ret, 20, "H5Sget_select_npoints");
/* Read selection from disk */