summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-01 21:18:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-01 21:18:37 (GMT)
commit85594d2856141652ddca2261986ad2d53eee3cf2 (patch)
tree907d037e24c12064edceedccbc91d2da71f61691 /tools
parent6783ce354ca8910a160beccb2aa56e15cc81fc60 (diff)
downloadhdf5-85594d2856141652ddca2261986ad2d53eee3cf2.zip
hdf5-85594d2856141652ddca2261986ad2d53eee3cf2.tar.gz
hdf5-85594d2856141652ddca2261986ad2d53eee3cf2.tar.bz2
[svn-r22224] Description:
Clean up a few warnings and use constant values for free-space parameters for the metadata block size test. Tested on: Linux/64 2.6.18 (koala) w/production & szip (h5committested also)
Diffstat (limited to 'tools')
-rw-r--r--tools/h5repack/h5repack_copy.c4
-rw-r--r--tools/h5repack/h5repacktst.c29
2 files changed, 19 insertions, 14 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 15df639..d38a15c 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -42,7 +42,7 @@
int _err_num = 0; \
char _msg[80]; \
H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, &_err_num); \
- H5Eget_msg(_err_num, NULL, _msg, 80); \
+ H5Eget_msg(_err_num, NULL, _msg, (size_t)80); \
error_msg("%s %s -- %s\n", #_fun, "failed", _msg); \
goto error; \
} \
@@ -311,7 +311,7 @@ int copy_objects(const char* fnamein,
* set metadata block size option
*-------------------------------------------------------------------------
*/
- if ( options->meta_block_size > 0 )
+ if ( options->meta_block_size > 0 )
{
/* either use the FAPL already created or create a new one */
if (fapl == H5P_DEFAULT)
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index fe8f847..ae272ab 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -1568,26 +1568,31 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" metadata block size option");
- if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
- GOERROR;
/* First run without metadata option. No need to verify the correctness */
/* since this has been verified by earlier tests. Just record the file */
/* size of the output file. */
- if(h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
+ if(h5repack_init(&pack_options, 0, H5F_FILE_SPACE_DEFAULT, (hsize_t)0) < 0)
GOERROR;
- if(HDstat(FNAME1OUT, &file_stat) < 0)
+ if(h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
+ GOERROR;
+ if(HDstat(FNAME4OUT, &file_stat) < 0)
GOERROR;
fsize1 = file_stat.st_size;
+ if(h5repack_end(&pack_options) < 0)
+ GOERROR;
+
/* run it again with metadata option */
+ if(h5repack_init(&pack_options, 0, H5F_FILE_SPACE_DEFAULT, (hsize_t)0) < 0)
+ GOERROR;
pack_options.meta_block_size = 8192;
- if(h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
+ if(h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
- if(h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0)
+ if(h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
/* record the file size of the output file */
- if(HDstat(FNAME1OUT, &file_stat) < 0)
+ if(HDstat(FNAME4OUT, &file_stat) < 0)
GOERROR;
fsize2 = file_stat.st_size;
/* verify second file size is larger than the first one */
@@ -5857,7 +5862,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id)
}
/* select elements space for reference */
- status = H5Sselect_elements (sid_regrefed_dset, H5S_SELECT_SET, 3, coords_regrefed_dset[0]);
+ status = H5Sselect_elements (sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
@@ -6179,7 +6184,7 @@ static herr_t gen_region_ref(hid_t loc_id)
}
/* select elements space for reference */
- status = H5Sselect_elements (sid_trg, H5S_SELECT_SET, 4, coords[0]);
+ status = H5Sselect_elements (sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
@@ -6546,7 +6551,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
/*
* create the region reference
*/
- status = H5Sselect_elements (objsid, H5S_SELECT_SET, 4, coords[0]);
+ status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
@@ -6657,7 +6662,7 @@ static herr_t make_complex_attr_references(hid_t loc_id)
/*
* create region reference
*/
- status = H5Sselect_elements(objsid, H5S_SELECT_SET, 4, coords[0]);
+ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0)
{
fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);