diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-31 00:13:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-31 00:13:27 (GMT) |
commit | bcda3c2dbfd1d7b1fa5e018dfa193ba499ac661d (patch) | |
tree | b72d46ee0babd2aabd0a34387162b8a0d6c8e09d | |
parent | 3f69573f575390295536c0faa6d083c58a7291fa (diff) | |
download | hdf5-bcda3c2dbfd1d7b1fa5e018dfa193ba499ac661d.zip hdf5-bcda3c2dbfd1d7b1fa5e018dfa193ba499ac661d.tar.gz hdf5-bcda3c2dbfd1d7b1fa5e018dfa193ba499ac661d.tar.bz2 |
[svn-r12833] Description:
Clean up more warnings...
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
-rw-r--r-- | src/H5FScache.c | 4 | ||||
-rw-r--r-- | test/bittests.c | 44 | ||||
-rw-r--r-- | test/cache.c | 68 | ||||
-rw-r--r-- | test/cache_api.c | 12 | ||||
-rw-r--r-- | test/dtypes.c | 3 | ||||
-rw-r--r-- | test/hyperslab.c | 110 | ||||
-rw-r--r-- | test/istore.c | 30 | ||||
-rw-r--r-- | test/lheap.c | 6 | ||||
-rw-r--r-- | test/links.c | 13 | ||||
-rw-r--r-- | test/ohdr.c | 2 | ||||
-rw-r--r-- | test/pool.c | 62 | ||||
-rw-r--r-- | test/stab.c | 8 | ||||
-rw-r--r-- | test/titerate.c | 2 | ||||
-rw-r--r-- | test/tunicode.c | 48 | ||||
-rw-r--r-- | test/tvlstr.c | 8 | ||||
-rw-r--r-- | test/tvltypes.c | 20 |
16 files changed, 215 insertions, 225 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c index 73341f2..09db1fd 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -548,7 +548,7 @@ HDfprintf(stderr, "%s: Load free space sections, addr = %a\n", FUNC, addr); HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "incorrect address for free space sections") /* Allocate space for the buffer to serialize the sections into */ - old_sect_size = fspace->sect_size; + H5_ASSIGN_OVERFLOW(/* To: */ old_sect_size, /* From: */ fspace->sect_size, /* From: */ hsize_t, /* To: */ size_t); #ifdef QAK HDfprintf(stderr, "%s: fspace->sect_size = %Hu\n", FUNC, fspace->sect_size); #endif /* QAK */ @@ -1121,7 +1121,7 @@ H5FS_cache_sinfo_size(const H5F_t UNUSED *f, const H5FS_sinfo_t *sinfo, size_t * HDassert(size_ptr); /* Set size value */ - *size_ptr = sinfo->fspace->sect_size; + H5_ASSIGN_OVERFLOW(/* To: */ *size_ptr, /* From: */ sinfo->fspace->sect_size, /* From: */ hsize_t, /* To: */ size_t); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5FS_cache_sinfo_size() */ diff --git a/test/bittests.c b/test/bittests.c index a44da2a..c9161de 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -54,15 +54,15 @@ test_find (void) TESTING("bit search operations"); /* The zero length buffer */ - memset (v1, 0xaa, sizeof v1); - n = H5T_bit_find (v1, 0, 0, H5T_BIT_LSB, TRUE); - if (-1!=n) { + HDmemset(v1, 0xaa, sizeof v1); + n = H5T_bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE); + if(-1 != n) { H5_FAILED(); puts (" Zero length test failed (lsb)!"); goto failed; } - n = H5T_bit_find (v1, 0, 0, H5T_BIT_MSB, TRUE); - if (-1!=n) { + n = H5T_bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE); + if(-1 != n) { H5_FAILED(); puts (" Zero length test failed (msb)!"); goto failed; @@ -70,32 +70,32 @@ test_find (void) /* The zero buffer */ - memset (v1, 0, sizeof v1); - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, TRUE); - if (-1!=n) { + HDmemset(v1, 0, sizeof v1); + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE); + if(-1 != n) { H5_FAILED(); puts (" Zero buffer test failed (lsb)!"); goto failed; } - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, TRUE); - if (-1!=n) { + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE); + if(-1 != n) { H5_FAILED(); puts (" Zero buffer test failed (msb)!"); goto failed; } /* Try all combinations of one byte */ - for (i=0; i<8*(int)sizeof(v1); i++) { - memset (v1, 0, sizeof v1); - v1[i/8] = 1<<(i%8); - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, TRUE); - if ((ssize_t)i!=n) { + for(i = 0; i < 8 * (int)sizeof(v1); i++) { + HDmemset(v1, 0, sizeof v1); + v1[i / 8] = 1 << (i % 8); + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE); + if((ssize_t)i != n) { H5_FAILED(); printf (" Test for set bit %d failed (lsb)!\n", i); goto failed; } - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, TRUE); - if ((ssize_t)i!=n) { + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE); + if((ssize_t)i != n) { H5_FAILED(); printf (" Test for set bit %d failed (msb)!\n", i); goto failed; @@ -103,15 +103,15 @@ test_find (void) } /* The one buffer */ - memset (v1, 0xff, sizeof v1); - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, FALSE); - if (-1!=n) { + HDmemset(v1, 0xff, sizeof v1); + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE); + if(-1 != n) { H5_FAILED(); puts (" One buffer test failed (lsb)!"); goto failed; } - n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_MSB, FALSE); - if (-1!=n) { + n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE); + if(-1 != n) { H5_FAILED(); puts (" One buffer test failed (msb)!"); goto failed; diff --git a/test/cache.c b/test/cache.c index ac9d198..19e9b70 100644 --- a/test/cache.c +++ b/test/cache.c @@ -9119,11 +9119,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 1); unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 1, - H5C__NO_FLAGS_SET, 0); + H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 2); unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 2, - H5C__NO_FLAGS_SET, 0); + H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 3); unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 3, @@ -9142,11 +9142,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 6); unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 6, - H5C__NO_FLAGS_SET, 0); + H5C__NO_FLAGS_SET, (size_t)0); protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 7); unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 7, - H5C__NO_FLAGS_SET, 0); + H5C__NO_FLAGS_SET, (size_t)0); if ( ( cache_ptr->index_len != 8 ) || ( cache_ptr->index_size != (4 * (VARIABLE_ENTRY_SIZE / 2)) + @@ -9190,25 +9190,25 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) * (VET, 7) dirties (VET, 6) */ add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__DIRTY, - VARIABLE_ENTRY_TYPE, 0, FALSE, 0); + VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); add_flush_op(VARIABLE_ENTRY_TYPE, 1, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, 3 * VARIABLE_ENTRY_SIZE / 4); add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__DIRTY, - VARIABLE_ENTRY_TYPE, 0, FALSE, 0); + VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE); add_flush_op(VARIABLE_ENTRY_TYPE, 2, FLUSH_OP__RENAME, - VARIABLE_ENTRY_TYPE, 0, FALSE, 0); + VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__DIRTY, - VARIABLE_ENTRY_TYPE, 0, FALSE, 0); + VARIABLE_ENTRY_TYPE, 0, FALSE, (size_t)0); add_flush_op(VARIABLE_ENTRY_TYPE, 3, FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 3, FALSE, VARIABLE_ENTRY_SIZE); add_flush_op(VARIABLE_ENTRY_TYPE, 7, FLUSH_OP__DIRTY, - VARIABLE_ENTRY_TYPE, 6, FALSE, 0); + VARIABLE_ENTRY_TYPE, 6, FALSE, (size_t)0); } if ( pass ) { @@ -9249,14 +9249,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 1; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* The cache should now be exactly full */ @@ -9324,7 +9324,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 1, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - @@ -9390,7 +9390,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 2, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); if ( ( cache_ptr->index_len != 40 ) || ( cache_ptr->index_size != (2 * 1024 * 1024) - @@ -9463,11 +9463,11 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 3, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 4); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 4, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); /* verify cache size */ if ( ( cache_ptr->index_len != 41 ) || @@ -9504,14 +9504,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 5; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9571,7 +9571,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9633,7 +9633,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9699,7 +9699,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9735,14 +9735,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < 10; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9846,7 +9846,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -9879,14 +9879,14 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } for ( i = 0; i < num_large_entries; i++ ) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* update the expected array to mark all these entries dirty again. */ @@ -9973,7 +9973,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr) { protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i); unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i, - H5C__DIRTIED_FLAG, 0); + H5C__DIRTIED_FLAG, (size_t)0); } /* verify cache size */ @@ -12316,7 +12316,7 @@ check_get_entry_status(void) } } - mark_pinned_entry_dirty(cache_ptr, 0, 0, FALSE, 0); + mark_pinned_entry_dirty(cache_ptr, 0, 0, FALSE, (size_t)0); if ( pass ) { @@ -14400,7 +14400,7 @@ check_double_pin_err(void) result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__PIN_ENTRY_FLAG, 0); + H5C__PIN_ENTRY_FLAG, (size_t)0); if ( result > 0 ) { @@ -14486,7 +14486,7 @@ check_double_unpin_err(void) result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__UNPIN_ENTRY_FLAG, 0); + H5C__UNPIN_ENTRY_FLAG, (size_t)0); if ( result > 0 ) { @@ -14781,7 +14781,7 @@ check_double_unprotect_err(void) result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]), entry_ptr->addr, (void *)entry_ptr, - H5C__NO_FLAGS_SET, 0); + H5C__NO_FLAGS_SET, (size_t)0); if ( result > 0 ) { @@ -14879,7 +14879,7 @@ check_mark_entry_dirty_errs(void) if ( pass ) { result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr, - FALSE, 0); + FALSE, (size_t)0); if ( result > 0 ) { @@ -14896,7 +14896,7 @@ check_mark_entry_dirty_errs(void) if ( pass ) { result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr, - FALSE, 0); + FALSE, (size_t)0); if ( result > 0 ) { @@ -15119,7 +15119,7 @@ check_resize_entry_errs(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, 1); + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)1); if ( result > 0 ) { @@ -15136,7 +15136,7 @@ check_resize_entry_errs(void) if ( pass ) { - result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, 0); + result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)0); if ( result > 0 ) { diff --git a/test/cache_api.c b/test/cache_api.c index e72a903..cc55345f 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -1070,8 +1070,8 @@ check_and_validate_cache_hit_rate(hid_t file_id, { /* const char * fcn_name = "check_and_validate_cache_hit_rate()"; */ herr_t result; - int64_t cache_hits; - int64_t cache_accesses; + int64_t cache_hits = 0; + int64_t cache_accesses = 0; double expected_hit_rate; double hit_rate; H5F_t * file_ptr = NULL; @@ -2113,7 +2113,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = { /* 1 -- bad rpt_fcn_enabled */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, - /* hbool_t rpt_fcn_enabled = */ -1, + /* hbool_t rpt_fcn_enabled = */ (hbool_t)-1, /* hbool_t open_trace_file = */ FALSE, /* hbool_t close_trace_file = */ FALSE, /* char trace_file_name[] = */ "", @@ -2142,7 +2142,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* 2 -- bad open_trace_file */ /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, - /* hbool_t open_trace_file = */ -1, + /* hbool_t open_trace_file = */ (hbool_t)-1, /* hbool_t close_trace_file = */ FALSE, /* char trace_file_name[] = */ "", /* hbool_t set_initial_size = */ TRUE, @@ -2171,7 +2171,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, /* hbool_t rpt_fcn_enabled = */ FALSE, /* hbool_t open_trace_file = */ FALSE, - /* hbool_t close_trace_file = */ -1, + /* hbool_t close_trace_file = */ (hbool_t)-1, /* char trace_file_name[] = */ "", /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), @@ -2630,7 +2630,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] = /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, /* double lower_hr_threshold = */ 0.9, /* double increment = */ 2.0, - /* hbool_t apply_max_increment = */ -1, + /* hbool_t apply_max_increment = */ (hbool_t)-1, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, /* double upper_hr_threshold = */ 0.999, diff --git a/test/dtypes.c b/test/dtypes.c index c9e7143..a7be6e6 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -491,7 +491,6 @@ error: static int test_compound_1(void) { - complex_t tmp; hid_t complex_id; hid_t super; size_t size; @@ -507,7 +506,7 @@ test_compound_1(void) TESTING("compound data types"); /* Create the empty type */ - if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof tmp))<0) goto error; + if ((complex_id = H5Tcreate(H5T_COMPOUND, sizeof(complex_t)))<0) goto error; /* Attempt to add the new compound datatype as a field within itself */ H5E_BEGIN_TRY { diff --git a/test/hyperslab.c b/test/hyperslab.c index cd85c3d..0a46faf 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -194,7 +194,7 @@ test_fill(size_t nx, size_t ny, size_t nz, fflush(stdout); /* Allocate array */ - dst = HDcalloc(1,nx*ny*nz); + dst = HDcalloc((size_t)1, nx * ny * nz); init_full(dst, nx, ny, nz); for (i = 0; i < nx; i += di) { @@ -398,8 +398,8 @@ test_copy(int mode, /* * Allocate arrays */ - src = HDcalloc(1,nx*ny*nz); - dst = HDcalloc(1,nx*ny*nz); + src = HDcalloc((size_t)1, nx * ny * nz); + dst = HDcalloc((size_t)1, nx * ny * nz); init_full(src, nx, ny, nz); for (i=0; i<nx; i+=di) { @@ -733,8 +733,8 @@ test_endian(size_t nx) /* Initialize arrays */ src = HDmalloc(nx * 4); - init_full(src, nx, 4, 1); - dst = HDcalloc(nx , 4); + init_full(src, nx, (size_t)4, (size_t)1); + dst = HDcalloc(nx , (size_t)4); /* Initialize strides */ src_stride[0] = 0; @@ -761,9 +761,9 @@ test_endian(size_t nx) printf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j); printf(" Source array is:\n"); - print_array(src, nx, 4, 1); + print_array(src, nx, (size_t)4, (size_t)1); printf("\n Result is:\n"); - print_array(dst, nx, 4, 1); + print_array(dst, nx, (size_t)4, (size_t)1); } goto error; } @@ -922,9 +922,9 @@ test_sub_super(size_t nx, size_t ny) /* Initialize */ full = HDmalloc(4 * nx * ny); - init_full(full, 2 * nx, 2 * ny, 1); - half = HDcalloc(1,nx*ny); - twice = HDcalloc(4,nx*ny); + init_full(full, 2 * nx, 2 * ny, (size_t)1); + half = HDcalloc((size_t)1, nx * ny); + twice = HDcalloc((size_t)4, nx * ny); /* Setup */ size[0] = nx; @@ -951,9 +951,9 @@ test_sub_super(size_t nx, size_t ny) (unsigned long)i, (unsigned long)j); printf(" full is:\n"); - print_array(full, 2 * nx, 2 * ny, 1); + print_array(full, 2 * nx, 2 * ny, (size_t)1); printf("\n half is:\n"); - print_array(half, nx, ny, 1); + print_array(half, nx, ny, (size_t)1); } goto error; } @@ -1023,9 +1023,9 @@ test_sub_super(size_t nx, size_t ny) if (!isatty(1)) { AT(); printf(" %s\n Half is:\n", s); - print_array(half, nx, ny, 1); + print_array(half, nx, ny, (size_t)1); printf("\n Twice is:\n"); - print_array(twice, 2 * nx, 2 * ny, 1); + print_array(twice, 2 * nx, 2 * ny, (size_t)1); } goto error; } @@ -1245,19 +1245,19 @@ main(int argc, char *argv[]) *------------------------------ */ if (size_of_test & TEST_SMALL) { - status = test_fill(11, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)11, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_fill(11, 10, 0, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)11, (size_t)10, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_fill(3, 5, 5, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)3, (size_t)5, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_fill(113, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)113, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_fill(15, 11, 0, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)15, (size_t)11, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_fill(5, 7, 7, 1, 1, 1, 1, 1, 1); + status = test_fill((size_t)5, (size_t)7, (size_t)7, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } /*------------------------------ @@ -1267,62 +1267,62 @@ main(int argc, char *argv[]) /* exhaustive, one-dimensional test */ if (size_of_test & TEST_SMALL) { - status = test_copy(VARIABLE_SRC, 11, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)11, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 11, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)11, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 11, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)11, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_copy(VARIABLE_SRC, 179, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)179, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 179, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)179, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 179, 0, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)179, (size_t)0, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } /* exhaustive, two-dimensional test */ if (size_of_test & TEST_SMALL) { - status = test_copy(VARIABLE_SRC, 11, 10, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)11, (size_t)10, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 11, 10, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)11, (size_t)10, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 11, 10, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)11, (size_t)10, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_copy(VARIABLE_SRC, 13, 19, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)13, (size_t)19, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 13, 19, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)13, (size_t)19, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 13, 19, 0, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)13, (size_t)19, (size_t)0, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } /* sparse, two-dimensional test */ if (size_of_test & TEST_MEDIUM) { - status = test_copy(VARIABLE_SRC, 73, 67, 0, 7, 11, 1, 13, 11, 1); + status = test_copy(VARIABLE_SRC, (size_t)73, (size_t)67, (size_t)0, (size_t)7, (size_t)11, (size_t)1, (size_t)13, (size_t)11, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 73, 67, 0, 7, 11, 1, 13, 11, 1); + status = test_copy(VARIABLE_DST, (size_t)73, (size_t)67, (size_t)0, (size_t)7, (size_t)11, (size_t)1, (size_t)13, (size_t)11, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 73, 67, 0, 7, 11, 1, 13, 11, 1); + status = test_copy(VARIABLE_BOTH, (size_t)73, (size_t)67, (size_t)0, (size_t)7, (size_t)11, (size_t)1, (size_t)13, (size_t)11, (size_t)1); nerrors += status < 0 ? 1 : 0; } /* exhaustive, three-dimensional test */ if (size_of_test & TEST_SMALL) { - status = test_copy(VARIABLE_SRC, 3, 5, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)3, (size_t)5, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 3, 5, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)3, (size_t)5, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 3, 5, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)3, (size_t)5, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_copy(VARIABLE_SRC, 7, 9, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_SRC, (size_t)7, (size_t)9, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_DST, 7, 9, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_DST, (size_t)7, (size_t)9, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; - status = test_copy(VARIABLE_BOTH, 7, 9, 5, 1, 1, 1, 1, 1, 1); + status = test_copy(VARIABLE_BOTH, (size_t)7, (size_t)9, (size_t)5, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1, (size_t)1); nerrors += status < 0 ? 1 : 0; } /*--------------------- @@ -1331,11 +1331,11 @@ main(int argc, char *argv[]) */ if (size_of_test & TEST_SMALL) { - status = test_multifill(10); + status = test_multifill((size_t)10); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_multifill(500000); + status = test_multifill((size_t)500000); nerrors += status < 0 ? 1 : 0; } /*--------------------------- @@ -1344,19 +1344,19 @@ main(int argc, char *argv[]) */ if (size_of_test & TEST_SMALL) { - status = test_endian(10); + status = test_endian((size_t)10); nerrors += status < 0 ? 1 : 0; - status = test_transpose(9, 9); + status = test_transpose((size_t)9, (size_t)9); nerrors += status < 0 ? 1 : 0; - status = test_transpose(3, 11); + status = test_transpose((size_t)3, (size_t)11); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_endian(800000); + status = test_endian((size_t)800000); nerrors += status < 0 ? 1 : 0; - status = test_transpose(1200, 1200); + status = test_transpose((size_t)1200, (size_t)1200); nerrors += status < 0 ? 1 : 0; - status = test_transpose(800, 1800); + status = test_transpose((size_t)800, (size_t)1800); nerrors += status < 0 ? 1 : 0; } /*------------------------- @@ -1365,11 +1365,11 @@ main(int argc, char *argv[]) */ if (size_of_test & TEST_SMALL) { - status = test_sub_super(5, 10); + status = test_sub_super((size_t)5, (size_t)10); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_sub_super(480, 640); + status = test_sub_super((size_t)480, (size_t)640); nerrors += status < 0 ? 1 : 0; } /*------------------------- @@ -1378,11 +1378,11 @@ main(int argc, char *argv[]) */ if (size_of_test & TEST_SMALL) { - status = test_array_fill(1,9); + status = test_array_fill((size_t)1, (size_t)9); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_array_fill(9,257); + status = test_array_fill((size_t)9, (size_t)257); nerrors += status < 0 ? 1 : 0; } /*------------------------- @@ -1391,11 +1391,11 @@ main(int argc, char *argv[]) */ if (size_of_test & TEST_SMALL) { - status = test_array_offset_n_calc(20,7,11,13); + status = test_array_offset_n_calc((size_t)20, (size_t)7, (size_t)11, (size_t)13); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_array_offset_n_calc(500,71,193,347); + status = test_array_offset_n_calc((size_t)500, (size_t)71, (size_t)193, (size_t)347); nerrors += status < 0 ? 1 : 0; } diff --git a/test/istore.c b/test/istore.c index 2663eeb..2b3fb27 100644 --- a/test/istore.c +++ b/test/istore.c @@ -254,7 +254,7 @@ test_extend(hid_t f, const char *prefix, TESTING(s); buf = HDmalloc(nx * ny * nz); check = HDmalloc(nx * ny * nz); - whole = HDcalloc(1,nx*ny*nz); + whole = HDcalloc((size_t)1, nx * ny * nz); whole_size[0] = nx; whole_size[1] = ny; @@ -612,7 +612,7 @@ main(int argc, char *argv[]) /* Use larger file addresses... */ fcpl = H5Pcreate(H5P_FILE_CREATE); - H5Pset_sizes(fcpl, 8, 0); + H5Pset_sizes(fcpl, (size_t)8, (size_t)0); /* Create the test file */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); @@ -649,39 +649,39 @@ main(int argc, char *argv[]) nerrors += status < 0 ? 1 : 0; if (size_of_test & TEST_SMALL) { - status = test_extend(file, "extend", 10, 0, 0); + status = test_extend(file, "extend", (size_t)10, (size_t)0, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 10, 0); + status = test_extend(file, "extend", (size_t)10, (size_t)10, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 10, 10); + status = test_extend(file, "extend", (size_t)10, (size_t)10, (size_t)10); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_extend(file, "extend", 10000, 0, 0); + status = test_extend(file, "extend", (size_t)10000, (size_t)0, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 2500, 10, 0); + status = test_extend(file, "extend", (size_t)2500, (size_t)10, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_extend(file, "extend", 10, 400, 10); + status = test_extend(file, "extend", (size_t)10, (size_t)400, (size_t)10); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_SMALL) { - status = test_sparse(file, "sparse", 100, 5, 0, 0); + status = test_sparse(file, "sparse", (size_t)100, (size_t)5, (size_t)0, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 100, 3, 4, 0); + status = test_sparse(file, "sparse", (size_t)100, (size_t)3, (size_t)4, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 100, 2, 3, 4); + status = test_sparse(file, "sparse", (size_t)100, (size_t)2, (size_t)3, (size_t)4); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_MEDIUM) { - status = test_sparse(file, "sparse", 1000, 30, 0, 0); + status = test_sparse(file, "sparse", (size_t)1000, (size_t)30, (size_t)0, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 2000, 7, 3, 0); + status = test_sparse(file, "sparse", (size_t)2000, (size_t)7, (size_t)3, (size_t)0); nerrors += status < 0 ? 1 : 0; - status = test_sparse(file, "sparse", 2000, 4, 2, 3); + status = test_sparse(file, "sparse", (size_t)2000, (size_t)4, (size_t)2, (size_t)3); nerrors += status < 0 ? 1 : 0; } if (size_of_test & TEST_LARGE) { - status = test_sparse(file, "sparse", 800, 50, 50, 50); + status = test_sparse(file, "sparse", (size_t)800, (size_t)50, (size_t)50, (size_t)50); nerrors += status < 0 ? 1 : 0; } diff --git a/test/lheap.c b/test/lheap.c index 42d6bce..35b7af1 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -75,17 +75,17 @@ main(void) h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) goto error; - if (NULL==(f=H5I_object(file))) { + if(NULL == (f = H5I_object(file))) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } - if (H5HL_create(f, H5P_DATASET_XFER_DEFAULT, 0, &heap_addr/*out*/)<0) { + if(H5HL_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)0, &heap_addr/*out*/) < 0) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; } - for (i = 0; i < NOBJS; i++) { + for(i = 0; i < NOBJS; i++) { sprintf(buf, "%03d-", i); for (j=4; j<i; j++) buf[j] = '0' + j%10; if (j>4) buf[j] = '\0'; diff --git a/test/links.c b/test/links.c index e8b2e36..e467593 100644 --- a/test/links.c +++ b/test/links.c @@ -76,7 +76,7 @@ const char *FILENAME[] = { #define CORDER_GROUP_NAME "corder_group" #define CORDER_EST_ENTRY_LEN 9 -#ifndef QAK +#ifdef QAK /*------------------------------------------------------------------------- * Function: mklinks @@ -5937,7 +5937,7 @@ main(void) /* Set the "use the latest version of the format" flag for creating objects in the file */ if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR -#ifndef QAK +#ifdef QAK /* Loop over using new group format */ for(new_format = FALSE; new_format <= TRUE; new_format++) { /* General tests... (on both old & new format groups */ @@ -5995,15 +5995,6 @@ main(void) /* Creation order tests */ if(new_format == TRUE) { - nerrors += corder_create_empty(fapl2) < 0 ? 1 : 0; -/* XXX: when creation order indexing is fully working, go back and add checks - * to these tests to make certain that the creation order values are - * correct. - */ - nerrors += corder_create_compact(fapl2) < 0 ? 1 : 0; - nerrors += corder_create_dense(fapl2) < 0 ? 1 : 0; - nerrors += corder_transition(fapl2) < 0 ? 1 : 0; - nerrors += corder_delete(fapl2) < 0 ? 1 : 0; } /* end if */ } /* end for */ #else /* QAK */ diff --git a/test/ohdr.c b/test/ohdr.c index 6dd2b79..6a8bec9 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -84,7 +84,7 @@ main(void) */ TESTING("object header creation"); HDmemset(&oh_loc, 0, sizeof(oh_loc)); - if (H5O_create(f, H5P_DATASET_XFER_DEFAULT, 64, &oh_loc/*out*/)<0) { + if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, &oh_loc/*out*/)<0) { H5_FAILED(); H5Eprint_stack(H5E_DEFAULT, stdout); goto error; diff --git a/test/pool.c b/test/pool.c index 2151385..45dfb15 100644 --- a/test/pool.c +++ b/test/pool.c @@ -68,11 +68,11 @@ test_create(void) TESTING("memory pool creation"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Check free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != 0) TEST_ERROR @@ -126,15 +126,15 @@ test_close_one(void) TESTING("closing pool with blocks still allocated in one page"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ - if (NULL == (spc1 = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc1 = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* Close the memory pool */ - if (H5MP_close(mp) < 0) + if(H5MP_close(mp) < 0) TEST_ERROR PASSED(); @@ -178,15 +178,15 @@ test_allocate_first(void) TESTING("allocating first block in pool"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ - if (NULL == (spc = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != MPOOL_PAGE_SIZE - (H5MP_BLOCK_ALIGN(MPOOL_NORMAL_BLOCK) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t)) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)))) TEST_ERROR @@ -235,15 +235,15 @@ test_allocate_first(void) TESTING("allocating large first block in pool"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ - if (NULL == (spc = H5MP_malloc(mp, MPOOL_LARGE_BLOCK))) + if(NULL == (spc = H5MP_malloc(mp, (size_t)MPOOL_LARGE_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != 0) TEST_ERROR @@ -329,15 +329,15 @@ test_allocate_split(void) TESTING("splitting block in pool"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ - if (NULL == (spc1 = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc1 = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != MPOOL_PAGE_SIZE - (H5MP_BLOCK_ALIGN(MPOOL_NORMAL_BLOCK) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t)) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)))) TEST_ERROR @@ -347,11 +347,11 @@ test_allocate_split(void) TEST_ERROR; /* Allocate more space in pool */ - if (NULL == (spc2 = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc2 = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != MPOOL_PAGE_SIZE - (((H5MP_BLOCK_ALIGN(MPOOL_NORMAL_BLOCK) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t))) * 2) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)))) TEST_ERROR @@ -431,16 +431,16 @@ test_allocate_many_small(void) TESTING("allocating many small blocks"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ - for (i = 0; i < MPOOL_NUM_SMALL_BLOCKS; i++) - if (NULL == (spc[i] = H5MP_malloc(mp, MPOOL_SMALL_BLOCK))) + for(i = 0; i < MPOOL_NUM_SMALL_BLOCKS; i++) + if(NULL == (spc[i] = H5MP_malloc(mp, (size_t)MPOOL_SMALL_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != MPOOL_PAGE_SIZE - (((H5MP_BLOCK_ALIGN(MPOOL_SMALL_BLOCK) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t))) * MPOOL_NUM_SMALL_BLOCKS) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)))) TEST_ERROR @@ -512,16 +512,16 @@ test_allocate_new_page(void) TESTING("allocate normal-sized block in new page"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ for(u = 0; u < MPOOL_NUM_NORMAL_BLOCKS; u++) - if (NULL == (spc[u] = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc[u] = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* Check pool's free space */ - if (H5MP_get_pool_free_size(mp, &free_size) < 0) + if(H5MP_get_pool_free_size(mp, &free_size) < 0) TEST_ERROR; if(free_size != (MPOOL_PAGE_SIZE * 3) - (((H5MP_BLOCK_ALIGN(MPOOL_NORMAL_BLOCK) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t))) * MPOOL_NUM_NORMAL_BLOCKS) + (H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t)) * 3))) TEST_ERROR @@ -556,15 +556,15 @@ test_allocate_new_page(void) TESTING("allocate large-sized block in new page"); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space in pool */ /* (Normal sized block) */ - if (NULL == (spc1 = H5MP_malloc(mp, MPOOL_NORMAL_BLOCK))) + if(NULL == (spc1 = H5MP_malloc(mp, (size_t)MPOOL_NORMAL_BLOCK))) TEST_ERROR /* (Larger sized block) */ - if (NULL == (spc2 = H5MP_malloc(mp, MPOOL_LARGE_BLOCK))) + if(NULL == (spc2 = H5MP_malloc(mp, (size_t)MPOOL_LARGE_BLOCK))) TEST_ERROR /* Check pool's free space */ @@ -648,7 +648,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); HDsrandom((unsigned long)curr_time); /* Create a memory pool */ - if (NULL == (mp = H5MP_create(MPOOL_PAGE_SIZE, MPOOL_FLAGS))) + if(NULL == (mp = H5MP_create((size_t)MPOOL_PAGE_SIZE, MPOOL_FLAGS))) TEST_ERROR /* Allocate space for the block sizes */ @@ -665,11 +665,11 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Allocate space in pool */ for(u = 0; u < MPOOL_NUM_RANDOM; u++) - if (NULL == (spc[u] = H5MP_malloc(mp, blk_size[u]))) + if(NULL == (spc[u] = H5MP_malloc(mp, blk_size[u]))) TEST_ERROR /* Check that free space totals match */ - if (H5MP_pool_is_free_size_correct(mp) <= 0) + if(H5MP_pool_is_free_size_correct(mp) <= 0) TEST_ERROR; /* Shuffle pointers to free */ @@ -695,11 +695,11 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Allocate space in pool (again) */ /* (Leave allocated to test closing pool with many blocks still allocated) */ for(u = 0; u < MPOOL_NUM_RANDOM; u++) - if (NULL == (spc[u] = H5MP_malloc(mp, blk_size[u]))) + if(NULL == (spc[u] = H5MP_malloc(mp, blk_size[u]))) TEST_ERROR /* Check that free space totals match */ - if (H5MP_pool_is_free_size_correct(mp) <= 0) + if(H5MP_pool_is_free_size_correct(mp) <= 0) TEST_ERROR; /* Close the memory pool */ diff --git a/test/stab.c b/test/stab.c index 9fc0565..dcb3f3a 100644 --- a/test/stab.c +++ b/test/stab.c @@ -187,11 +187,11 @@ test_long(hid_t fapl, hbool_t new_format) if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR /* Group names */ - name1 = HDmalloc(LONG_NAME_LEN); + name1 = HDmalloc((size_t)LONG_NAME_LEN); for(i = 0; i < LONG_NAME_LEN; i++) name1[i] = (char)('A' + i%26); name1[LONG_NAME_LEN - 1] = '\0'; - name2 = HDmalloc((2 * LONG_NAME_LEN) + 2); + name2 = HDmalloc((size_t)((2 * LONG_NAME_LEN) + 2)); sprintf(name2, "%s/%s", name1, name1); /* Create groups */ @@ -221,8 +221,8 @@ error: H5Gclose(g1); H5Gclose(g2); H5Fclose(fid); - H5MM_xfree(name2); - H5MM_xfree(name1); + HDfree(name2); + HDfree(name1); } H5E_END_TRY; return 1; } /* end test_long() */ diff --git a/test/titerate.c b/test/titerate.c index df77dea..ecd566b 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -789,7 +789,7 @@ static void test_grp_memb_funcs(hid_t fapl) VERIFY(obj_type, H5G_GROUP, "H5Gget_objname_by_idx"); if(!HDstrcmp(dataset_name, "dtype")) VERIFY(obj_type, H5G_TYPE, "H5Gget_objname_by_idx"); - if(!HDstrncmp(dataset_name, "Dataset", 7)) + if(!HDstrncmp(dataset_name, "Dataset", (size_t)7)) VERIFY(obj_type, H5G_DATASET, "H5Gget_objname_by_idx"); } /* end for */ diff --git a/test/tunicode.c b/test/tunicode.c index 2d318ef..7eaa9ba 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -77,7 +77,7 @@ void test_fl_string(hid_t fid, const char *string) */ dtype_id = H5Tcopy(H5T_C_S1); CHECK(dtype_id, FAIL, "H5Tcopy"); - ret=H5Tset_size(dtype_id, MAX_STRING_LENGTH); + ret = H5Tset_size(dtype_id, (size_t)MAX_STRING_LENGTH); CHECK(ret, FAIL, "H5Tset_size"); cset=H5Tget_cset(dtype_id); VERIFY(cset, H5T_CSET_ASCII, "H5Tget_cset"); @@ -172,7 +172,7 @@ void test_strpad(hid_t UNUSED fid, const char *string) strncpy(buf, new_string, big_len); strncpy(&buf[big_len], new_string, big_len); - ret = H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* After conversion, the buffer should look like @@ -190,11 +190,11 @@ void test_strpad(hid_t UNUSED fid, const char *string) /* Now convert from smaller datatype to bigger datatype. This should * leave our buffer looking like: "abc\0\0\0\0\0abc\0\0\0\0\0" */ - ret = H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* First fill the buffer with NULLs */ - HDmemset(cmpbuf, '\0', LONG_BUF_SIZE); + HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE); /* Copy in the characters */ HDstrncpy(cmpbuf, new_string, small_len -1); HDstrncpy(&cmpbuf[big_len], new_string, small_len -1); @@ -234,7 +234,7 @@ void test_strpad(hid_t UNUSED fid, const char *string) strncpy(buf, new_string, big_len); strncpy(&buf[big_len], new_string, big_len); - ret = H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* After conversion, the buffer should look like @@ -250,11 +250,11 @@ void test_strpad(hid_t UNUSED fid, const char *string) /* Now convert from smaller datatype to bigger datatype. This should * leave our buffer looking like: "abcd\0\0\0\0abcd\0\0\0\0" */ - ret = H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* First fill the buffer with NULLs */ - HDmemset(cmpbuf, '\0', LONG_BUF_SIZE); + HDmemset(cmpbuf, '\0', (size_t)LONG_BUF_SIZE); /* Copy in the characters */ HDstrncpy(cmpbuf, new_string, small_len); HDstrncpy(&cmpbuf[big_len], new_string, small_len); @@ -280,7 +280,7 @@ void test_strpad(hid_t UNUSED fid, const char *string) HDstrcpy(buf, new_string); HDstrcpy(&buf[big_len], new_string); - ret = H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* After conversion, the buffer should look like @@ -296,11 +296,11 @@ void test_strpad(hid_t UNUSED fid, const char *string) /* Now convert from smaller datatype to bigger datatype. This should * leave our buffer looking like: "abcd abcd " */ - ret = H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT); + ret = H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tconvert"); /* First fill the buffer with spaces */ - HDmemset(cmpbuf, ' ', LONG_BUF_SIZE); + HDmemset(cmpbuf, ' ', (size_t)LONG_BUF_SIZE); /* Copy in the characters */ HDstrncpy(cmpbuf, new_string, small_len); HDstrncpy(&cmpbuf[big_len], new_string, small_len); @@ -390,7 +390,7 @@ void test_objnames(hid_t fid, const char* string) herr_t ret; /* Create a group with a UTF-8 name */ - grp_id = H5Gcreate(fid, string, 0); + grp_id = H5Gcreate(fid, string, (size_t)0); CHECK(grp_id, FAIL, "H5Gcreate"); /* Set a comment on the group to test that we can access the group @@ -398,7 +398,7 @@ void test_objnames(hid_t fid, const char* string) */ ret = H5Gset_comment(fid, string, string); CHECK(ret, FAIL, "H5Gset_comment"); - ret = H5Gget_comment(fid, string, MAX_STRING_LENGTH, read_buf); + ret = H5Gget_comment(fid, string, (size_t)MAX_STRING_LENGTH, read_buf); CHECK(ret, FAIL, "H5Gget_comment"); ret = H5Gclose(grp_id); @@ -407,7 +407,7 @@ void test_objnames(hid_t fid, const char* string) VERIFY(strcmp(string, read_buf), 0, "strcmp"); /* Create a new dataset with a UTF-8 name */ - grp1_id = H5Gcreate(fid, GROUP1_NAME, 0); + grp1_id = H5Gcreate(fid, GROUP1_NAME, (size_t)0); CHECK(grp1_id, FAIL, "H5Gcreate"); space_id = H5Screate_simple(RANK, &dims, NULL); @@ -429,10 +429,10 @@ void test_objnames(hid_t fid, const char* string) CHECK(ret, FAIL, "H5Gclose"); /* Do the same for a named datatype */ - grp2_id = H5Gcreate(fid, GROUP2_NAME, 0); + grp2_id = H5Gcreate(fid, GROUP2_NAME, (size_t)0); CHECK(grp2_id, FAIL, "H5Gcreate"); - type_id = H5Tcreate(H5T_OPAQUE, 1); + type_id = H5Tcreate(H5T_OPAQUE, (size_t)1); CHECK(type_id, FAIL, "H5Tcreate"); ret = H5Tcommit(grp2_id, string, type_id); CHECK(type_id, FAIL, "H5Tcommit"); @@ -482,7 +482,7 @@ void test_objnames(hid_t fid, const char* string) * pointing through the hard link to the datatype. Give the soft * link a name in UTF-8. Ensure that the soft link works. */ - grp3_id = H5Gcreate(fid, GROUP3_NAME, 0); + grp3_id = H5Gcreate(fid, GROUP3_NAME, (size_t)0); CHECK(grp3_id, FAIL, "H5Gcreate"); ret = H5Glink2(fid, GROUP2_NAME, H5G_LINK_HARD, grp3_id, GROUP2_NAME); @@ -518,20 +518,20 @@ void test_attrname(hid_t fid, const char * string) /* Create a new group and give it an attribute whose * name and value are UTF-8 strings. */ - group_id = H5Gcreate(fid, GROUP4_NAME, 0); + group_id = H5Gcreate(fid, GROUP4_NAME, (size_t)0); CHECK(group_id, FAIL, "H5Gcreate"); space_id = H5Screate_simple(RANK, &dims, NULL); CHECK(space_id, FAIL, "H5Screate_simple"); dtype_id = H5Tcopy(H5T_C_S1); CHECK(dtype_id, FAIL, "H5Tcopy"); - ret=H5Tset_size(dtype_id, MAX_STRING_LENGTH); + ret = H5Tset_size(dtype_id, (size_t)MAX_STRING_LENGTH); CHECK(ret, FAIL, "H5Tset_size"); /* Create the attribute and check that its name is correct */ attr_id = H5Acreate(group_id, string, dtype_id, space_id, H5P_DEFAULT); CHECK(attr_id, FAIL, "H5Acreate"); - ret = H5Aget_name(attr_id, MAX_STRING_LENGTH, read_buf); + ret = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf); CHECK(ret, FAIL, "H5Aget_name"); ret = strcmp(read_buf, string); VERIFY(ret, 0, "strcmp"); @@ -684,7 +684,7 @@ void test_enum(hid_t UNUSED fid, const char * string) ret = H5Tenum_valueof(type_id, string, &val); CHECK(ret, FAIL, "H5Tenum_valueof"); VERIFY(val, E1_WHITE, "H5Tenum_valueof"); - ret = H5Tenum_nameof(type_id, &val, readbuf, MAX_STRING_LENGTH); + ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH); CHECK(ret, FAIL, "H5Tenum_nameof"); ret = strcmp(readbuf, string); VERIFY(ret, 0, "strcmp"); @@ -705,7 +705,7 @@ void test_opaque(hid_t UNUSED fid, const char * string) herr_t ret; /* Create an opaque type and give it a UTF-8 tag */ - type_id = H5Tcreate(H5T_OPAQUE, 4); + type_id = H5Tcreate(H5T_OPAQUE, (size_t)4); CHECK(type_id, FAIL, "H5Tcreate"); ret = H5Tset_tag(type_id, string); CHECK(ret, FAIL, "H5Tset_tag"); @@ -730,9 +730,9 @@ void test_opaque(hid_t UNUSED fid, const char * string) static hid_t mkstr(size_t len, H5T_str_t strpad) { hid_t t; - if ((t=H5Tcopy(H5T_C_S1))<0) return -1; - if (H5Tset_size(t, len)<0) return -1; - if (H5Tset_strpad(t, strpad)<0) return -1; + if((t = H5Tcopy(H5T_C_S1)) < 0) return -1; + if(H5Tset_size(t, len) < 0) return -1; + if(H5Tset_strpad(t, strpad) < 0) return -1; return t; } diff --git a/test/tvlstr.c b/test/tvlstr.c index 8a8f5cb..39518c5 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -170,8 +170,8 @@ test_vlstrings_basic(void) dataset2=H5Dcreate(fid1,"Dataset2",tid1,dataspace,H5P_DEFAULT); CHECK(dataset, FAIL, "H5Dcreate"); - wdata2 = (char*)HDcalloc(65534, sizeof(char)); - HDmemset(wdata2, 'A', 65533); + wdata2 = (char*)HDcalloc((size_t)65534, sizeof(char)); + HDmemset(wdata2, 'A', (size_t)65533); ret=H5Dwrite(dataset2,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,&wdata2); CHECK(ret, FAIL, "H5Dwrite"); @@ -613,8 +613,8 @@ static void test_write_vl_string_attribute(void) att = H5Acreate(root, "test_scalar_large", type, dataspace, H5P_DEFAULT); CHECK(att, FAIL, "H5Acreate"); - string_att_write = (char*)HDcalloc(8192, sizeof(char)); - HDmemset(string_att_write, 'A', 8191); + string_att_write = (char*)HDcalloc((size_t)8192, sizeof(char)); + HDmemset(string_att_write, 'A', (size_t)8191); ret = H5Awrite(att, type, &string_att_write); CHECK(ret, FAIL, "H5Awrite"); diff --git a/test/tvltypes.c b/test/tvltypes.c index e3a7160..7ebe96c 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -198,17 +198,17 @@ test_vltypes_funcs(void) ret=H5Tset_pad(type, H5T_PAD_ZERO, H5T_PAD_ONE); CHECK(ret, FAIL, "H5Tset_pad"); - inpad=H5Tget_inpad(type); + inpad = H5Tget_inpad(type); CHECK(inpad, FAIL, "H5Tget_inpad"); - norm=H5Tget_norm(type); + norm = H5Tget_norm(type); CHECK(norm, FAIL, "H5Tget_norm"); - ret=H5Tset_offset(type, 16); + ret = H5Tset_offset(type, (size_t)16); CHECK(ret, FAIL, "H5Tset_offset"); H5E_BEGIN_TRY { - cset=H5Tget_cset(type); + cset = H5Tget_cset(type); } H5E_END_TRY; VERIFY(cset, FAIL, "H5Tget_cset"); @@ -797,11 +797,11 @@ test_vltypes_vlen_compound(void) continue; } /* end if */ for(j=0; j<rdata[i].len; j++) { - if( ((s1 *)wdata[i].p)[j].i != ((s1 *)rdata[i].p)[j].i ) { + if(((s1 *)wdata[i].p)[j].i != ((s1 *)rdata[i].p)[j].i ) { TestErrPrintf("VL data values don't match!, wdata[%d].p[%d].i=%d, rdata[%d].p[%d].i=%d\n",(int)i,(int)j, (int)((s1 *)wdata[i].p)[j].i, (int)i,(int)j, (int)((s1 *)rdata[i].p)[j].i); continue; } /* end if */ - if( ((s1 *)wdata[i].p)[j].f != ((s1 *)rdata[i].p)[j].f ) { + if(((s1 *)wdata[i].p)[j].f != ((s1 *)rdata[i].p)[j].f ) { TestErrPrintf("VL data values don't match!, wdata[%d].p[%d].f=%f, rdata[%d].p[%d].f=%f\n",(int)i,(int)j, (double)((s1 *)wdata[i].p)[j].f, (int)i,(int)j, (double)((s1 *)rdata[i].p)[j].f); continue; } /* end if */ @@ -1668,7 +1668,7 @@ test_vltypes_vlen_vlen_atomic(void) /* 10 hvl_t elements allocated = 1 + 2 + 3 + 4 elements for each array position */ /* 20 unsigned int elements allocated = 1 + 3 + 6 + 10 elements */ - VERIFY(size,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func(SPACE1_DIM1)*sizeof(unsigned int),"H5Dvlen_get_buf_size"); + VERIFY(size,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func((unsigned long)SPACE1_DIM1)*sizeof(unsigned int),"H5Dvlen_get_buf_size"); /* Read dataset from disk */ ret=H5Dread(dataset,tid2,H5S_ALL,H5S_ALL,xfer_pid,rdata); @@ -1677,7 +1677,7 @@ test_vltypes_vlen_vlen_atomic(void) /* Make certain the correct amount of memory has been used */ /* 10 hvl_t elements allocated = 1 + 2 + 3 + 4 elements for each array position */ /* 20 unsigned int elements allocated = 1 + 3 + 6 + 10 elements */ - VERIFY(mem_used,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func(SPACE1_DIM1)*sizeof(unsigned int),"H5Dread"); + VERIFY(mem_used,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func((unsigned long)SPACE1_DIM1)*sizeof(unsigned int),"H5Dread"); /* Compare data read in */ for(i=0; i<SPACE1_DIM1; i++) { @@ -2024,7 +2024,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void) /* 10 hvl_t elements allocated = 1 + 2 + 3 + 4 elements for each array position */ /* 20 unsigned int elements allocated = 1 + 3 + 6 + 10 elements */ - VERIFY(size,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func(SPACE1_DIM1)*sizeof(unsigned int),"H5Dvlen_get_buf_size"); + VERIFY(size,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func((unsigned long)SPACE1_DIM1)*sizeof(unsigned int),"H5Dvlen_get_buf_size"); /* Read dataset from disk */ ret=H5Dread(dataset,tid2,H5S_ALL,H5S_ALL,xfer_pid,rdata); @@ -2033,7 +2033,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void) /* Make certain the correct amount of memory has been used */ /* 10 hvl_t elements allocated = 1 + 2 + 3 + 4 elements for each array position */ /* 20 unsigned int elements allocated = 1 + 3 + 6 + 10 elements */ - VERIFY(mem_used,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func(SPACE1_DIM1)*sizeof(unsigned int),"H5Dread"); + VERIFY(mem_used,((SPACE1_DIM1*(SPACE1_DIM1+1))/2)*sizeof(hvl_t)+vlen_size_func((unsigned long)SPACE1_DIM1)*sizeof(unsigned int),"H5Dread"); /* Compare data read in */ for(i=0; i<SPACE1_DIM1; i++) { |