From 3239989544c0f822fbf05642c0efc924234449b5 Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Mon, 6 May 2002 08:46:30 -0500 Subject: [svn-r5357] Purpose: code clean-up to erase windows warnings Description: Solution: Platforms tested: windows 2000 --- perform/chunk.c | 8 ++++---- perform/overhead.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/perform/chunk.c b/perform/chunk.c index 47cd4db..edfc0eb 100644 --- a/perform/chunk.c +++ b/perform/chunk.c @@ -165,7 +165,7 @@ static double test_rowmaj (int op, hsize_t cache_size, hsize_t io_size) { hid_t file, dset, mem_space, file_space; - signed char *buf = calloc (1, SQUARE(io_size)); + signed char *buf = calloc (1, (size_t)(SQUARE(io_size))); hsize_t i, j, hs_size[2]; hssize_t hs_offset[2]; int mdc_nelmts, rdcc_nelmts; @@ -179,7 +179,7 @@ test_rowmaj (int op, hsize_t cache_size, hsize_t io_size) rdcc_nelmts = RM_NRDCC; #endif H5Pset_cache (fapl_g, mdc_nelmts, rdcc_nelmts, - cache_size*SQUARE (CH_SIZE), w0); + cache_size*(size_t)(SQUARE (CH_SIZE)), w0); file = H5Fopen (FILE_NAME, H5F_ACC_RDWR, fapl_g); dset = H5Dopen (file, "dset"); file_space = H5Dget_space (dset); @@ -243,7 +243,7 @@ test_diag (int op, hsize_t cache_size, hsize_t io_size, hsize_t offset) hsize_t i, hs_size[2]; hsize_t nio = 0; hssize_t hs_offset[2]; - signed char *buf = calloc (1, SQUARE (io_size)); + signed char *buf = calloc (1, (size_t)(SQUARE (io_size))); int mdc_nelmts, rdcc_nelmts; double w0; @@ -255,7 +255,7 @@ test_diag (int op, hsize_t cache_size, hsize_t io_size, hsize_t offset) rdcc_nelmts = DIAG_NRDCC; #endif H5Pset_cache (fapl_g, mdc_nelmts, rdcc_nelmts, - cache_size*SQUARE (CH_SIZE), w0); + cache_size*(size_t)(SQUARE (CH_SIZE)), w0); file = H5Fopen (FILE_NAME, H5F_ACC_RDWR, fapl_g); dset = H5Dopen (file, "dset"); file_space = H5Dget_space (dset); diff --git a/perform/overhead.c b/perform/overhead.c index 519b622..d965661 100644 --- a/perform/overhead.c +++ b/perform/overhead.c @@ -189,7 +189,7 @@ test(fill_t fill_style, const double splits[], int j; h5_stat_t sb; - if (!had) had = calloc(cur_size[0], sizeof(int)); + if (!had) had = calloc((size_t)cur_size[0], sizeof(int)); if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) goto error; if (!use_rdcc) { if (H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL)<0) goto error; @@ -231,7 +231,7 @@ test(fill_t fill_style, const double splits[], hs_start[0] = i%2 ? i/2 : cur_size[0]-i/2; break; case FILL_OUTWARD: - j = (cur_size[0]-i)+1; + j = ((size_t)cur_size[0]-i)+1; hs_start[0] = j%2 ? j/2 : cur_size[0]-j/2; break; case FILL_RANDOM: -- cgit v0.12