summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/misc/h5repart.c9
-rw-r--r--tools/misc/repart_test.c14
2 files changed, 14 insertions, 9 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index 6803aae..b3a463b 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -229,7 +229,8 @@ main (int argc, char *argv[])
#endif
hid_t fapl; /*file access property list */
hid_t file;
-
+ hsize_t hdsize; /*destination logical memb size */
+
/*
* Get the program name from argv[0]. Use only the last component.
*/
@@ -460,8 +461,10 @@ main (int argc, char *argv[])
perror ("H5Pset_fapl_family");
exit (1);
}
-
- if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &dst_size) < 0) {
+
+ /* Set the property as hsize_t */
+ hdsize = dst_size;
+ if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
perror ("H5Pset_family_newsize");
exit (1);
}
diff --git a/tools/misc/repart_test.c b/tools/misc/repart_test.c
index 042c858..7b81cf4 100644
--- a/tools/misc/repart_test.c
+++ b/tools/misc/repart_test.c
@@ -33,6 +33,9 @@ const char *FILENAME[] = {
NULL
};
+herr_t
+test_family_h5repart_opens(void);
+
/*-------------------------------------------------------------------------
* Function: test_family_h5repart_opens
@@ -49,19 +52,18 @@ const char *FILENAME[] = {
* Modifications:
*-------------------------------------------------------------------------
*/
-static herr_t
+herr_t
test_family_h5repart_opens(void)
{
hid_t file=(-1), fapl=(-1);
- char filename[1024];
-
+
/* open 1st file(single member file) with correct family size(20000 byte) */
if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
goto error;
-
+
if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0)
goto error;
-
+
if((file=H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl))<0)
goto error;
@@ -108,7 +110,7 @@ int
main(void)
{
int nerrors=0;
-
+
nerrors += test_family_h5repart_opens()<0 ?1:0;
if (nerrors) goto error;