summaryrefslogtreecommitdiffstats
path: root/test/th5s.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/th5s.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/th5s.c')
-rw-r--r--test/th5s.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 54c45ac..64142ac 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -70,7 +70,7 @@ struct space4_struct {
unsigned u;
float f;
char c2;
- } space4_data={'v',987123,-3.14,'g'}; /* Test data for 4th dataspace */
+ } space4_data={'v',987123,(float)-3.14,'g'}; /* Test data for 4th dataspace */
/****************************************************************
**
@@ -509,7 +509,7 @@ test_h5s_chunk(void)
/* Initialize float array */
for(i=0; i<50000; i++)
for(j=0; j<3; j++)
- chunk_data_flt[i][j]=i*2.5-j*100.3;
+ chunk_data_flt[i][j]=(float)(i*2.5-j*100.3);
status= H5Dwrite(dsetID,H5T_NATIVE_FLOAT,H5S_ALL,H5S_ALL,H5P_DEFAULT,chunk_data_flt);
CHECK(status, FAIL, "H5Dwrite");