diff options
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/test/dsets.c b/test/dsets.c index c4d1fcc..54b88bc 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -4034,7 +4034,7 @@ test_nbit_int_size(hid_t file) */ for (i=0; i < DSET_DIM1; i++) for (j=0; j < DSET_DIM2; j++) - orig_data[i][j] = rand() % (int)pow(2, precision-1) <<offset; + orig_data[i][j] = rand() % (int)pow((double)2, (double)(precision-1)) << offset; /* Describe the dataspace. */ @@ -7824,13 +7824,15 @@ test_chunk_expand(hid_t fapl) H5D_alloc_time_t alloc_time; /* Storage allocation time */ unsigned write_elem, read_elem; /* Element written/read */ unsigned u; /* Local index variable */ + size_t size; /* Size of type */ herr_t status; /* Generic return value */ TESTING("filter expanding chunks too much"); h5_fixname(FILENAME[10], fapl, filename, sizeof filename); - if(sizeof(size_t) <= 4) { + size = sizeof(size_t); + if(size <= 4) { SKIPPED(); puts(" Current machine can't test for error"); } /* end if */ @@ -8357,7 +8359,7 @@ test_scatter(void) scatter_info.size = 8; /* Scatter data */ - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR /* Verify data */ @@ -8397,7 +8399,7 @@ test_scatter(void) scatter_info.size = 12; /* Scatter data */ - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR /* Verify data */ @@ -8455,7 +8457,7 @@ test_scatter(void) scatter_info.size = 36; /* Scatter data */ - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR /* Verify data */ @@ -8511,7 +8513,7 @@ test_scatter(void) scatter_info.size = 16; /* Scatter data */ - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR /* Verify data */ @@ -8545,7 +8547,7 @@ test_scatter(void) scatter_info.size = 4; /* Scatter data */ - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR /* Verify data */ @@ -9022,7 +9024,7 @@ test_scatter_error(void) scatter_info.src_buf = src_buf; scatter_info.block = sizeof(src_buf)/sizeof(src_buf[0]); scatter_info.size = 6; - if(H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) + if(H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf) < 0) TEST_ERROR @@ -9039,21 +9041,21 @@ test_scatter_error(void) scatter_info.src_buf = src_buf; scatter_info.size = 6; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_cb, &scatter_info, sid, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, sid, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR scatter_info.src_buf = src_buf; scatter_info.size = 6; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, H5T_NATIVE_INT, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, H5T_NATIVE_INT, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR scatter_info.src_buf = src_buf; scatter_info.size = 6; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, NULL); + ret = H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, NULL); } H5E_END_TRY if(ret >= 0) TEST_ERROR @@ -9064,7 +9066,7 @@ test_scatter_error(void) scatter_info.src_buf = src_buf; scatter_info.size = 7; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_cb, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR @@ -9075,7 +9077,7 @@ test_scatter_error(void) scatter_info.src_buf = src_buf; scatter_info.size = 6; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_error_cb_fail, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_error_cb_fail, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR @@ -9086,7 +9088,7 @@ test_scatter_error(void) scatter_info.src_buf = src_buf; scatter_info.size = 6; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_error_cb_null, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_error_cb_null, &scatter_info, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR @@ -9096,7 +9098,7 @@ test_scatter_error(void) */ cb_unalign_nbytes = 0; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR @@ -9107,13 +9109,13 @@ test_scatter_error(void) */ cb_unalign_nbytes = sizeof(src_buf[0]) - 1; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR cb_unalign_nbytes = sizeof(src_buf[0]) + 1; H5E_BEGIN_TRY { - ret = H5Dscatter(scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); + ret = H5Dscatter((H5D_scatter_func_t)scatter_error_cb_unalign, &cb_unalign_nbytes, H5T_NATIVE_INT, sid, dst_buf); } H5E_END_TRY if(ret >= 0) TEST_ERROR |