summaryrefslogtreecommitdiffstats
path: root/test/h5test.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/h5test.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/h5test.c')
-rw-r--r--test/h5test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 4fae090..05df6c1 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -434,7 +434,7 @@ h5_fileaccess(void)
HDmemset(memb_map, 0, sizeof memb_map);
HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
+ HDmemset((void*)(&memb_name[0]), 0, sizeof memb_name);
HDmemset(memb_addr, 0, sizeof memb_addr);
assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
@@ -452,7 +452,7 @@ h5_fileaccess(void)
} else if (!HDstrcmp(name, "family")) {
/* Family of files, each 1MB and using the default driver */
if ((val=HDstrtok(NULL, " \t\n\r"))) {
- fam_size = HDstrtod(val, NULL) * 1024*1024;
+ fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024);
}
if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0) return -1;
} else if (!HDstrcmp(name, "log")) {