summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-08-31 20:14:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-08-31 20:14:57 (GMT)
commit2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d (patch)
tree3d69591861803060012eed0be300427f4c261fc8 /tools
parent1d3a7ec6515f26f13cb5d8e5c65fd848fd235d8f (diff)
parent81ca9e4c79a125cfcea9e426e1e91d94cdf6a2aa (diff)
downloadhdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.zip
hdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.tar.gz
hdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.tar.bz2
[svn-r27630] Description:
Bring in changes from the trunk, through r27628. Tested on: MacOSX/64 10.10.5 (amazon) w/serial (h5committest not required on this branch)
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in1
-rw-r--r--tools/h5copy/Makefile.in1
-rw-r--r--tools/h5diff/Makefile.in1
-rw-r--r--tools/h5diff/h5diffgentest.c10
-rw-r--r--tools/h5dump/Makefile.in1
-rw-r--r--tools/h5dump/h5dump.c4
-rw-r--r--tools/h5dump/h5dump.h19
-rw-r--r--tools/h5dump/h5dump_ddl.c17
-rw-r--r--tools/h5dump/h5dump_xml.c245
-rw-r--r--tools/h5import/Makefile.in1
-rw-r--r--tools/h5jam/Makefile.in1
-rw-r--r--tools/h5jam/h5jamgentest.c2
-rw-r--r--tools/h5ls/Makefile.in1
-rw-r--r--tools/h5ls/h5ls.c6
-rw-r--r--tools/h5repack/Makefile.in1
-rw-r--r--tools/h5stat/Makefile.in1
-rw-r--r--tools/lib/Makefile.in1
-rw-r--r--tools/lib/h5diff_array.c40
-rw-r--r--tools/lib/h5diff_dset.c47
-rw-r--r--tools/lib/h5diff_util.c49
-rw-r--r--tools/lib/h5tools.c16
-rw-r--r--tools/lib/h5tools_dump.c10
-rw-r--r--tools/lib/h5tools_ref.c4
-rw-r--r--tools/lib/h5tools_str.c14
-rw-r--r--tools/lib/h5tools_type.c193
-rw-r--r--tools/lib/h5tools_utils.c3
-rw-r--r--tools/lib/io_timer.c12
-rw-r--r--tools/misc/Makefile.in1
-rw-r--r--tools/misc/h5debug.c12
-rw-r--r--tools/misc/h5mkgrp.c2
-rw-r--r--tools/misc/h5repart.c10
-rw-r--r--tools/perform/Makefile.in1
-rw-r--r--tools/perform/chunk.c6
-rw-r--r--tools/perform/overhead.c2
-rw-r--r--tools/perform/sio_engine.c2
-rw-r--r--tools/perform/sio_perf.c20
36 files changed, 450 insertions, 307 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index f7121e6..50153ae 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -459,6 +459,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index 57c0a38..3900396 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -467,6 +467,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 638afd6..ebfb680 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -474,6 +474,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index cfaffe6..a871709 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -5023,10 +5023,10 @@ static void test_data_nocomparables (const char * fname, int make_diffs)
/* attr2 - non-compatible : same rank, different dimention */
- write_attr(did2,1, attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3);
+ write_attr(did2,1,(hsize_t *)attr2_dim_ptr,"attr2", H5T_NATIVE_INT, data3);
/* attr3 - non-compatible : different rank */
- write_attr(did2, rank_attr,attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3);
+ write_attr(did2, rank_attr,(hsize_t *)attr3_dim_ptr,"attr3", H5T_NATIVE_INT, attr_data_ptr3);
/* attr4 - compatible : different data values */
write_attr(did2,1,dims1_1,"attr4", H5T_NATIVE_INT, attr_data_ptr4);
@@ -6551,7 +6551,7 @@ void write_dset_in(hid_t loc_id,
/* allocate and initialize array data to write */
size = ( H5TOOLS_MALLOCSIZE / sizeof(double) + 1 ) * sizeof(double);
- dbuf = HDmalloc( size );
+ dbuf = (double *)HDmalloc( size );
for( j = 0; j < H5TOOLS_MALLOCSIZE / sizeof(double) + 1; j++)
dbuf[j] = j;
@@ -7018,10 +7018,10 @@ void gen_datareg(hid_t fid,
int i;
/* allocate the buffer for write the references */
- rbuf = HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
+ rbuf = (hdset_reg_ref_t *)HDcalloc((size_t)2, sizeof(hdset_reg_ref_t));
/* allocate the buffer for write the data dataset */
- buf = HDmalloc(10 * 10 * sizeof(int));
+ buf = (int *)HDmalloc(10 * 10 * sizeof(int));
for(i = 0; i < 10 * 10; i++)
buf[i] = i;
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 9ac80d7..8c54492 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -474,6 +474,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 3c60bb0..68889c9 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -389,10 +389,10 @@ table_list_add(hid_t oid, unsigned long file_no)
/* Allocate space if necessary */
if(table_list.nused == table_list.nalloc) {
- void *tmp_ptr;
+ h5dump_table_items_t *tmp_ptr;
table_list.nalloc = MAX(1, table_list.nalloc * 2);
- if(NULL == (tmp_ptr = HDrealloc(table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
+ if(NULL == (tmp_ptr = (h5dump_table_items_t *)HDrealloc(table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
return -1;
table_list.tables = tmp_ptr;
} /* end if */
diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h
index 7bfead7..2b1fb04 100644
--- a/tools/h5dump/h5dump.h
+++ b/tools/h5dump/h5dump.h
@@ -38,16 +38,17 @@ typedef struct dump_functions_t {
} dump_functions;
/* List of table structures. There is one table structure for each file */
+typedef struct h5dump_table_items_t {
+ unsigned long fileno; /* File number that these tables refer to */
+ hid_t oid; /* ID of an object in this file, held open so fileno is consistent */
+ table_t *group_table; /* Table of groups */
+ table_t *dset_table; /* Table of datasets */
+ table_t *type_table; /* Table of datatypes */
+} h5dump_table_items_t;
typedef struct h5dump_table_list_t {
- size_t nalloc;
- size_t nused;
- struct {
- unsigned long fileno; /* File number that these tables refer to */
- hid_t oid; /* ID of an object in this file, held open so fileno is consistent */
- table_t *group_table; /* Table of groups */
- table_t *dset_table; /* Table of datasets */
- table_t *type_table; /* Table of datatypes */
- } *tables;
+ size_t nalloc;
+ size_t nused;
+ h5dump_table_items_t *tables;
} h5dump_table_list_t;
h5dump_table_list_t table_list = {0, 0, NULL};
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index 3822251..0cd0847 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -377,6 +377,8 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
}
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
error_msg("unknown object \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
@@ -509,6 +511,11 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
HDfree(targbuf);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ case H5L_TYPE_HARD:
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1054,7 +1061,10 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
+ HDassert(0);
break;
} /* end switch */
} /* for(i=0;i<data_loop;i++) */
@@ -1927,6 +1937,11 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
end_obj(h5tools_dump_header_format->extlinkend, h5tools_dump_header_format->extlinkblockend);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ H5L_TYPE_HARD:
default:
begin_obj(h5tools_dump_header_format->udlinkbegin, links, h5tools_dump_header_format->udlinkblockbegin);
PRINTVALSTREAM(rawoutstream, "\n");
@@ -2094,6 +2109,8 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
case H5O_TYPE_NAMED_DATATYPE:
handle_datatypes(group, linkname, NULL, 0, objname);
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
h5tools_setstatus(EXIT_FAILURE);
}
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 4f8d250..e872114 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -359,6 +359,8 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
}
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
error_msg("unknown object \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
@@ -521,42 +523,48 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
HDfree(targbuf);
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_MAX:
+ HDassert(0);
+ /* fall through */
+ case H5L_TYPE_HARD:
default:
- {
- char linkxid[100];
- char parentxid[100];
- char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/");
- char *t_obj_path = xml_escape_the_name(obj_path);
+ {
+ char linkxid[100];
+ char parentxid[100];
+ char *t_name = xml_escape_the_name(name);
+ char *t_prefix = xml_escape_the_name(HDstrcmp(prefix,"") ? prefix : "/");
+ char *t_obj_path = xml_escape_the_name(obj_path);
- /* Create OBJ-XIDs for the parent and object */
- xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1);
- xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1);
+ /* Create OBJ-XIDs for the parent and object */
+ xml_name_to_XID(t_obj_path, linkxid, (int)sizeof(linkxid), 1);
+ xml_name_to_XID(prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
- h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
+ ctx.need_prefix = TRUE;
+ h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
- /* Render the element */
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "<%sUserDefined LinkName=\"%s\" "
- "OBJ-XID=\"%s\" "
- "H5SourcePath=\"%s\" "
- "LinkClass=\"%d\" "
- "Parents=\"%s\" H5ParentPaths=\"%s\" />",
- xmlnsprefix,
- t_name, /* LinkName */
- linkxid, /* OBJ-XID */
- t_obj_path, /* H5SourcePath */
- linfo->type, /* LinkClass */
- parentxid, /* Parents */
- t_prefix); /* H5ParentPaths */
- h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
-
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_obj_path);
- }
+ /* Render the element */
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "<%sUserDefined LinkName=\"%s\" "
+ "OBJ-XID=\"%s\" "
+ "H5SourcePath=\"%s\" "
+ "LinkClass=\"%d\" "
+ "Parents=\"%s\" H5ParentPaths=\"%s\" />",
+ xmlnsprefix,
+ t_name, /* LinkName */
+ linkxid, /* OBJ-XID */
+ t_obj_path, /* H5SourcePath */
+ linfo->type, /* LinkClass */
+ parentxid, /* Parents */
+ t_prefix); /* H5ParentPaths */
+ h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
+
+ HDfree(t_prefix);
+ HDfree(t_name);
+ HDfree(t_obj_path);
+ }
break;
+
} /* end switch */
} /* end else */
@@ -969,29 +977,36 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "<%sIntegerType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" Sign=\"");
switch (sgn) {
- case H5T_SGN_NONE:
- h5tools_str_append(&buffer, "false");
- break;
- case H5T_SGN_2:
- h5tools_str_append(&buffer, "true");
- break;
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_SGN_NONE:
+ h5tools_str_append(&buffer, "false");
+ break;
+ case H5T_SGN_2:
+ h5tools_str_append(&buffer, "true");
+ break;
+ case H5T_SGN_ERROR:
+ case H5T_NSGN:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" Size=\"");
sz = H5Tget_size(type);
@@ -1033,18 +1048,21 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "<%sFloatType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- h5tools_str_append(&buffer, "VAX");
- break;
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ h5tools_str_append(&buffer, "VAX");
+ break;
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ } /* end switch */
h5tools_str_append(&buffer, "\" Size=\"");
sz = H5Tget_size(type);
@@ -1172,16 +1190,19 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "<%sBitfieldType ByteOrder=\"",xmlnsprefix);
switch (ord) {
- case H5T_ORDER_LE:
- h5tools_str_append(&buffer, "LE");
- break;
- case H5T_ORDER_BE:
- h5tools_str_append(&buffer, "BE");
- break;
- case H5T_ORDER_VAX:
- default:
- h5tools_str_append(&buffer, "ERROR_UNKNOWN");
- }
+ case H5T_ORDER_LE:
+ h5tools_str_append(&buffer, "LE");
+ break;
+ case H5T_ORDER_BE:
+ h5tools_str_append(&buffer, "BE");
+ break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_NONE:
+ case H5T_ORDER_ERROR:
+ default:
+ h5tools_str_append(&buffer, "ERROR_UNKNOWN");
+ } /* end switch */
size = H5Tget_size(type);
h5tools_str_append(&buffer, "\" Size=\"%lu\"/>", (unsigned long)size);
@@ -1516,6 +1537,10 @@ xml_print_datatype(hid_t type, unsigned in_group)
H5Tclose(super);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1813,6 +1838,7 @@ xml_dump_dataspace(hid_t space)
break;
#endif /* TMP */
+ case H5S_NULL:
case H5S_NO_CLASS:
default:
ctx.need_prefix = TRUE;
@@ -2246,6 +2272,10 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL, 0);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -3701,6 +3731,12 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_str_append(&buffer, "<%sNoData />", xmlnsprefix);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
+ case H5T_STRING:
+ case H5T_REFERENCE:
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -4004,37 +4040,43 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s
H5Pget_fill_time(dcpl, &ft);
h5tools_str_append(&buffer, "FillTime=\"");
switch (ft) {
- case H5D_FILL_TIME_ALLOC:
- h5tools_str_append(&buffer, "FillOnAlloc");
- break;
- case H5D_FILL_TIME_NEVER:
- h5tools_str_append(&buffer, "FillNever");
- break;
- case H5D_FILL_TIME_IFSET:
- h5tools_str_append(&buffer, "FillIfSet");
- break;
- default:
- h5tools_str_append(&buffer, "?");
- break;
- }
+ case H5D_FILL_TIME_ALLOC:
+ h5tools_str_append(&buffer, "FillOnAlloc");
+ break;
+ case H5D_FILL_TIME_NEVER:
+ h5tools_str_append(&buffer, "FillNever");
+ break;
+ case H5D_FILL_TIME_IFSET:
+ h5tools_str_append(&buffer, "FillIfSet");
+ break;
+ case H5D_FILL_TIME_ERROR:
+ HDassert(0);
+ /* fall through */
+ default:
+ h5tools_str_append(&buffer, "?");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\" ");
H5Pget_alloc_time(dcpl, &at);
h5tools_str_append(&buffer, "AllocationTime=\"");
switch (at) {
- case H5D_ALLOC_TIME_EARLY:
- h5tools_str_append(&buffer, "Early");
- break;
- case H5D_ALLOC_TIME_INCR:
- h5tools_str_append(&buffer, "Incremental");
- break;
- case H5D_ALLOC_TIME_LATE:
- h5tools_str_append(&buffer, "Late");
- break;
- case H5D_ALLOC_TIME_DEFAULT:
- default:
- h5tools_str_append(&buffer, "?");
- break;
- }
+ case H5D_ALLOC_TIME_EARLY:
+ h5tools_str_append(&buffer, "Early");
+ break;
+ case H5D_ALLOC_TIME_INCR:
+ h5tools_str_append(&buffer, "Incremental");
+ break;
+ case H5D_ALLOC_TIME_LATE:
+ h5tools_str_append(&buffer, "Late");
+ break;
+ case H5D_ALLOC_TIME_DEFAULT:
+ case H5D_ALLOC_TIME_ERROR:
+ HDassert(0);
+ /* fall through */
+ default:
+ h5tools_str_append(&buffer, "?");
+ break;
+ } /* end switch */
h5tools_str_append(&buffer, "\"");
h5tools_str_append(&buffer, ">");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -4255,6 +4297,11 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED * s
ctx.indent_level--;
dump_indent -= COL;
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ HDassert(0);
+ /* fall through */
+
default:
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 3185d72..938f3d9 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -467,6 +467,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 8e5f994..9452a9b 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -479,6 +479,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c
index 5f24566..ef45372 100644
--- a/tools/h5jam/h5jamgentest.c
+++ b/tools/h5jam/h5jamgentest.c
@@ -308,7 +308,7 @@ create_textfile(const char *name, size_t size)
fd = HDcreat(name,0777);
HDassert(fd >= 0);
- buf = HDcalloc(size, (size_t)1);
+ buf = (char *)HDcalloc(size, (size_t)1);
HDassert(buf);
/* fill buf with pattern */
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 1229bae..68c87b5 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -459,6 +459,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 98e3009..592645d 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1759,7 +1759,6 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
size_t cd_nelmts; /* filter client number of values */
size_t cd_num; /* filter client data counter */
char f_name[256]; /* filter/file name */
- char dset_name[256]; /* filter/file name */
char s[64]; /* temporary string buffer */
off_t f_offset; /* offset in external file */
hsize_t f_size; /* bytes used in external file */
@@ -1847,6 +1846,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_str_append(&buffer, "\n");
} /* end if */
break;
+
case H5D_VIRTUAL:
{
size_t vmaps;
@@ -1873,7 +1873,11 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
}
}
break;
+
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
+ HDassert(0);
break;
}
/* Print total raw storage size */
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 6868523..02be99d 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -491,6 +491,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index a03b765..e0d095d 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -469,6 +469,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index ab7940e..ba26950 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -456,6 +456,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 71ada53..d592528 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -102,29 +102,29 @@
static hbool_t not_comparable;
-#define PER(A,B) { \
- per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
- if(0 == (A) && 0 == (B)) \
- both_zero = TRUE; \
- if(0 != (A)) \
- per = (double)ABS((double)((B) - (A)) / (double)(A)); \
- else \
- not_comparable = TRUE; \
+#define PER(A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(H5_DBL_ABS_EQUAL(0,A) && H5_DBL_ABS_EQUAL(0,B)) \
+ both_zero = TRUE; \
+ if(!H5_DBL_ABS_EQUAL(0,A)) \
+ per = (double)ABS((double)((B) - (A)) / (double)(A)); \
+ else \
+ not_comparable = TRUE; \
}
-#define PER_UNSIGN(TYPE,A,B) { \
- per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
- if((A) == 0 && (B) == 0) \
- both_zero = TRUE; \
- if((A) != 0) \
- per = ABS((double)((TYPE)((B) - (A))) / (double)(A)) ; \
- else \
- not_comparable = TRUE; \
+#define PER_UNSIGN(TYPE,A,B) { \
+ per = -1; \
+ not_comparable = FALSE; \
+ both_zero = FALSE; \
+ if(H5_DBL_ABS_EQUAL(0,A) && H5_DBL_ABS_EQUAL(0,B)) \
+ both_zero = TRUE; \
+ if(!H5_DBL_ABS_EQUAL(0,A)) \
+ per = ABS((double)((TYPE)((B) - (A))) / (double)(A)) ; \
+ else \
+ not_comparable = TRUE; \
}
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index d7c5639..b8dd0e8 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -687,31 +687,30 @@ int diff_can_type( hid_t f_tid1, /* file data type */
HDassert(tclass1==tclass2);
switch (tclass1)
{
- case H5T_INTEGER:
- case H5T_FLOAT:
- case H5T_COMPOUND:
- case H5T_STRING:
- case H5T_ARRAY:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_REFERENCE:
-
- break;
-
- default: /*H5T_TIME */
-
+ case H5T_TIME:
+ if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name) {
+ parallel_print("Not comparable: <%s> and <%s> are of class %s\n",
+ obj1_name,obj2_name,get_class(tclass2) );
+ } /* end if */
+ can_compare = 0;
+ options->not_cmp = 1;
+ return can_compare;
- if ( (options->m_verbose||options->m_list_not_cmp) && obj1_name && obj2_name)
- {
- parallel_print("Not comparable: <%s> and <%s> are of class %s\n",
- obj1_name,obj2_name,get_class(tclass2) );
- }
- can_compare = 0;
- options->not_cmp = 1;
- return can_compare;
- }
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_COMPOUND:
+ case H5T_STRING:
+ case H5T_ARRAY:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_REFERENCE:
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ break;
+ } /* end switch */
/*-------------------------------------------------------------------------
* check for equal file datatype; warning only
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index aefd641..14fbcaa 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -78,8 +78,6 @@ void print_type(hid_t type)
{
switch (H5Tget_class(type))
{
- default:
- return;
case H5T_INTEGER:
if (H5Tequal(type, H5T_STD_I8BE)) {
parallel_print("H5T_STD_I8BE");
@@ -160,7 +158,21 @@ void print_type(hid_t type)
}
break;
- }/*switch*/
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ return;
+
+ } /* end switch */
}
/*-------------------------------------------------------------------------
@@ -219,6 +231,7 @@ get_type(h5trav_type_t type)
return("H5G_LINK");
case H5TRAV_TYPE_UDLINK:
return("H5G_UDLINK");
+ case H5TRAV_TYPE_UNKNOWN:
default:
return("unknown type");
}
@@ -242,13 +255,18 @@ get_sign(H5T_sign_t sign)
{
switch (sign)
{
- default:
- return("H5T_SGN_ERROR");
- case H5T_SGN_NONE:
- return("H5T_SGN_NONE");
- case H5T_SGN_2:
- return("H5T_SGN_2");
- }
+ case H5T_SGN_NONE:
+ return "H5T_SGN_NONE";
+ case H5T_SGN_2:
+ return "H5T_SGN_2";
+ case H5T_SGN_ERROR:
+ return "H5T_SGN_ERROR";
+ case H5T_NSGN:
+ return "H5T_NSGN";
+ default:
+ HDassert(0);
+ return "unknown sign value";
+ } /* end switch */
}
@@ -268,8 +286,6 @@ get_class(H5T_class_t tclass)
{
switch (tclass)
{
- default:
- return("Invalid class");
case H5T_TIME:
return("H5T_TIME");
case H5T_INTEGER:
@@ -292,8 +308,13 @@ get_class(H5T_class_t tclass)
return("H5T_VLEN");
case H5T_ARRAY:
return("H5T_ARRAY");
- }
-}
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ return("Invalid class");
+ } /* end switch */
+} /* end get_class() */
/*-------------------------------------------------------------------------
* Function: print_found
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index c820aff..274b398 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1498,14 +1498,24 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
}
}
break;
- default:
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
if (size != HDfwrite(mem, sizeof(char), size, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
- }
+ } /* end for */
break;
- }
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "bad type class");
+ break;
+ } /* end switch */
CATCH
return ret_value;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 3a06d3a..d9418a6 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2496,6 +2496,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
h5tools_str_append(buffer, "unknown datatype");
break;
@@ -2995,7 +2997,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
off_t offset; /* offset of external file */
char f_name[256]; /* filter name */
char name[256]; /* external or virtual file name */
- char dsetname[256]; /* virtual datset name */
hsize_t chsize[64]; /* chunk size in elements */
hsize_t size; /* size of external file */
hsize_t storage_size;
@@ -3185,6 +3186,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
ctx->indent_level--;
}
break;
+
case H5D_VIRTUAL:
{
size_t vmaps;
@@ -3285,6 +3287,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
}
}
break;
+
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", "Unknown layout");
@@ -3508,6 +3513,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
case H5D_FILL_TIME_IFSET:
h5tools_str_append(&buffer, "%s", "H5D_FILL_TIME_IFSET");
break;
+ case H5D_FILL_TIME_ERROR:
default:
HDassert(0);
break;
@@ -3565,6 +3571,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
case H5D_ALLOC_TIME_LATE:
h5tools_str_append(&buffer, "%s", "H5D_ALLOC_TIME_LATE");
break;
+ case H5D_ALLOC_TIME_ERROR:
+ case H5D_ALLOC_TIME_DEFAULT:
default:
HDassert(0);
break;
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 0bb7d77..60666f1 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -218,7 +218,7 @@ ref_path_table_put(const char *path, haddr_t objno)
HDassert(ref_path_table);
HDassert(path);
- if((new_node = HDmalloc(sizeof(ref_path_node_t))) == NULL)
+ if((new_node = (ref_path_node_t *)HDmalloc(sizeof(ref_path_node_t))) == NULL)
return(-1);
new_node->objno = objno;
@@ -300,7 +300,7 @@ lookup_ref_path(haddr_t ref)
if(ref_path_table == NULL)
init_ref_path_table();
- node = H5SL_search(ref_path_table, &ref);
+ node = (ref_path_node_t *)H5SL_search(ref_path_table, &ref);
return(node ? node->path : NULL);
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 249708e..c10f33b 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1122,6 +1122,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, H5_TOOLS_DATATYPE);
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
h5tools_str_append(str, "%u-", (unsigned) oi.type);
break;
@@ -1251,7 +1253,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
break;
- default:
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
{
/* All other types get printed as hexadecimal */
size_t i;
@@ -1264,6 +1268,12 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
}
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ h5tools_str_append(str, "invalid datatype");
+ break;
} /* end switch */
}
return h5tools_str_fmt(str, start, OPT(info->elmt_fmt, "%s"));
@@ -1458,7 +1468,7 @@ h5tools_str_replace ( const char *string, const char *substr, const char *replac
head = newstr;
while ( (tok = HDstrstr ( head, substr ))){
oldstr = newstr;
- newstr = HDmalloc ( HDstrlen ( oldstr ) - HDstrlen ( substr ) + HDstrlen ( replacement ) + 1 );
+ newstr = (char *)HDmalloc( HDstrlen( oldstr ) - HDstrlen( substr ) + HDstrlen( replacement ) + 1 );
if ( newstr == NULL ){
HDfree (oldstr);
diff --git a/tools/lib/h5tools_type.c b/tools/lib/h5tools_type.c
index d68d3c5..8a56d29 100644
--- a/tools/lib/h5tools_type.c
+++ b/tools/lib/h5tools_type.c
@@ -13,6 +13,7 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include "H5private.h"
#include "h5tools.h"
/*-------------------------------------------------------------------------
@@ -75,54 +76,54 @@ h5tools_get_little_endian_type(hid_t tid)
size = H5Tget_size(tid);
sign = H5Tget_sign(tid);
- switch( type_class )
- {
- case H5T_INTEGER:
- {
- if ( size == 1 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I8LE);
- else if ( size == 2 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I16LE);
- else if ( size == 4 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I32LE);
- else if ( size == 8 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I64LE);
- else if ( size == 1 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U8LE);
- else if ( size == 2 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U16LE);
- else if ( size == 4 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U32LE);
- else if ( size == 8 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U64LE);
- }
- break;
-
- case H5T_FLOAT:
- if ( size == 4)
- p_type=H5Tcopy(H5T_IEEE_F32LE);
- else if ( size == 8)
- p_type=H5Tcopy(H5T_IEEE_F64LE);
- break;
-
- case H5T_TIME:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_STRING:
- case H5T_COMPOUND:
- case H5T_REFERENCE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_ARRAY:
- break;
-
- default:
- break;
-
- }
-
- return(p_type);
-}
+ switch(type_class) {
+ case H5T_INTEGER:
+ if ( size == 1 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I8LE);
+ else if ( size == 2 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I16LE);
+ else if ( size == 4 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I32LE);
+ else if ( size == 8 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I64LE);
+ else if ( size == 1 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U8LE);
+ else if ( size == 2 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U16LE);
+ else if ( size == 4 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U32LE);
+ else if ( size == 8 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U64LE);
+ break;
+
+ case H5T_FLOAT:
+ if ( size == 4)
+ p_type=H5Tcopy(H5T_IEEE_F32LE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_IEEE_F64LE);
+ break;
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_STRING:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ break;
+
+ } /* end switch */
+
+ return p_type;
+} /* end h5tools_get_little_endian_type() */
/*-------------------------------------------------------------------------
@@ -152,53 +153,51 @@ h5tools_get_big_endian_type(hid_t tid)
size = H5Tget_size(tid);
sign = H5Tget_sign(tid);
- switch( type_class )
- {
- case H5T_INTEGER:
- {
- if ( size == 1 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I8BE);
- else if ( size == 2 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I16BE);
- else if ( size == 4 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I32BE);
- else if ( size == 8 && sign == H5T_SGN_2)
- p_type=H5Tcopy(H5T_STD_I64BE);
- else if ( size == 1 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U8BE);
- else if ( size == 2 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U16BE);
- else if ( size == 4 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U32BE);
- else if ( size == 8 && sign == H5T_SGN_NONE)
- p_type=H5Tcopy(H5T_STD_U64BE);
- }
- break;
-
- case H5T_FLOAT:
- if ( size == 4)
- p_type=H5Tcopy(H5T_IEEE_F32BE);
- else if ( size == 8)
- p_type=H5Tcopy(H5T_IEEE_F64BE);
- break;
-
- case H5T_TIME:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_STRING:
- case H5T_COMPOUND:
- case H5T_REFERENCE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_ARRAY:
- break;
-
- default:
- break;
-
- }
-
-
- return(p_type);
-}
+ switch(type_class) {
+ case H5T_INTEGER:
+ if ( size == 1 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I8BE);
+ else if ( size == 2 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I16BE);
+ else if ( size == 4 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I32BE);
+ else if ( size == 8 && sign == H5T_SGN_2)
+ p_type=H5Tcopy(H5T_STD_I64BE);
+ else if ( size == 1 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U8BE);
+ else if ( size == 2 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U16BE);
+ else if ( size == 4 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U32BE);
+ else if ( size == 8 && sign == H5T_SGN_NONE)
+ p_type=H5Tcopy(H5T_STD_U64BE);
+ break;
+
+ case H5T_FLOAT:
+ if ( size == 4)
+ p_type=H5Tcopy(H5T_IEEE_F32BE);
+ else if ( size == 8)
+ p_type=H5Tcopy(H5T_IEEE_F64BE);
+ break;
+
+ case H5T_TIME:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_STRING:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ HDassert(0);
+ break;
+ } /* end switch */
+
+ return p_type;
+} /* end h5tools_get_big_endian_type() */
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fc8cf1d..a09a003 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -612,7 +612,10 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
} /* end if */
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
+ HDassert(0);
break;
} /* end switch */
diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c
index b8d44de..b85133d 100644
--- a/tools/lib/io_timer.c
+++ b/tools/lib/io_timer.c
@@ -169,6 +169,10 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS];
}
break;
+#else
+ case MPI_CLOCK:
+ HDfprintf(stderr, "MPI clock set in serial library\n");
+ return NULL;
#endif /* H5_HAVE_PARALLEL */
case SYS_CLOCK:
if (start_stop == TSTART) {
@@ -197,11 +201,11 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
}
break;
+
default:
- HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
- return (NULL);
- break;
- }
+ HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
+ return NULL;
+ } /* end switch */
#if 0
/* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index e114aee..2dac1d4 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -535,6 +535,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index be6d089..3789723 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -121,8 +121,9 @@ get_H5B2_class(const uint8_t *sig)
cls = H5A_BT2_CORDER;
break;
+ case H5B2_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
} /* end switch */
@@ -156,8 +157,9 @@ get_H5EA_class(const uint8_t *sig)
cls = H5EA_CLS_TEST;
break;
+ case H5EA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid));
+ HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
HDexit(4);
} /* end switch */
@@ -191,8 +193,9 @@ get_H5FA_class(const uint8_t *sig)
cls = H5FA_CLS_TEST;
break;
+ case H5FA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid));
+ HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
HDexit(4);
} /* end switch */
@@ -382,8 +385,9 @@ main(int argc, char *argv[])
status = H5D_btree_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims, dim);
break;
+ case H5B_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned)(subtype));
+ HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
HDexit(4);
}
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index 8dee706..1c1bba1 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -181,7 +181,7 @@ parse_command_line(int argc, const char *argv[], param_t *parms)
/* Allocate space for the group name pointers */
parms->ngroups = (argc - opt_ind);
- parms->groups = HDmalloc(parms->ngroups * sizeof(char *));
+ parms->groups = (char **)HDmalloc(parms->ngroups * sizeof(char *));
/* Retrieve the group names */
curr_group = 0;
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index ffd52e8..f58af3a 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -261,13 +261,13 @@ main (int argc, char *argv[])
src_is_family = strcmp (src_name, src_gen_name);
if ((src=HDopen(src_name, O_RDONLY,0))<0) {
- perror (src_name);
- exit (EXIT_FAILURE);
+ perror (src_name);
+ exit (EXIT_FAILURE);
}
if (HDfstat(src, &sb)<0) {
- perror ("fstat");
- exit (EXIT_FAILURE);
+ perror ("fstat");
+ exit (EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
if (verbose) fprintf (stderr, "< %s\n", src_name);
@@ -290,7 +290,7 @@ main (int argc, char *argv[])
if (argno<argc) usage (prog_name);
/* Now the real work, split the file */
- buf = HDmalloc (blk_size);
+ buf = (char *)HDmalloc(blk_size);
while (src_offset<src_size) {
/* Read a block. The amount to read is the minimum of:
diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in
index 292a65b..dbac43e 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -498,6 +498,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c
index 74bcc46..0ea16e8 100644
--- a/tools/perform/chunk.c
+++ b/tools/perform/chunk.c
@@ -163,7 +163,7 @@ create_dataset (void)
assert(dset>=0);
/* The data */
- buf = calloc(1, SQUARE (DS_SIZE*CH_SIZE));
+ buf = (signed char *)calloc(1, SQUARE (DS_SIZE*CH_SIZE));
H5Dwrite(dset, H5T_NATIVE_SCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
free(buf);
@@ -194,7 +194,7 @@ static double
test_rowmaj (int op, size_t cache_size, size_t io_size)
{
hid_t file, dset, mem_space, file_space;
- signed char *buf = calloc (1, (size_t)(SQUARE(io_size)));
+ signed char *buf = (signed char *)calloc (1, (size_t)(SQUARE(io_size)));
hsize_t i, j, hs_size[2];
hsize_t hs_offset[2];
int mdc_nelmts;
@@ -273,7 +273,7 @@ test_diag (int op, size_t cache_size, size_t io_size, size_t offset)
hsize_t i, hs_size[2];
hsize_t nio = 0;
hsize_t hs_offset[2];
- signed char *buf = calloc (1, (size_t)(SQUARE (io_size)));
+ signed char *buf = (signed char *)calloc(1, (size_t)(SQUARE (io_size)));
int mdc_nelmts;
size_t rdcc_nelmts;
double w0;
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index 0288ffa..feabd3a 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -224,7 +224,7 @@ test(fill_t fill_style, const double splits[],
if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error;
if(FILL_RANDOM==fill_style)
- had = calloc((size_t)cur_size[0], sizeof(int));
+ had = (int *)calloc((size_t)cur_size[0], sizeof(int));
for (i=1; i<=cur_size[0]; i++) {
diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c
index 3b28ea7..5622810 100644
--- a/tools/perform/sio_engine.c
+++ b/tools/perform/sio_engine.c
@@ -181,7 +181,7 @@ do_sio(parameters param)
}
/* Allocate transfer buffer */
- if ((buffer = malloc(linear_buf_size)) == NULL){
+ if ((buffer = (char *)malloc(linear_buf_size)) == NULL){
HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
}
diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c
index 7d75a2d..34d8552 100644
--- a/tools/perform/sio_perf.c
+++ b/tools/perform/sio_perf.c
@@ -481,16 +481,16 @@ run_test(iotype iot, parameters parms, struct options *opts)
/* allocate space for tables minmax and that it is sufficient */
/* to initialize all elements to zeros by calloc. */
- write_sys_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- write_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_sys_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_gross_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ write_raw_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
if (!parms.h5_write_only) {
- read_sys_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
- read_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_sys_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_gross_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
+ read_raw_mm_table = (minmax *)calloc((size_t)parms.num_iters , sizeof(minmax));
}
/* Do IO iteration times, collecting statistics each time */
@@ -1443,6 +1443,10 @@ void debug_start_stop_time(io_time_t *pt, timer_type t, int start_stop)
case HDF5_RAW_READ_FIXED_DIMS:
msg = "Raw Read";
break;
+ case HDF5_FILE_READ_OPEN:
+ case HDF5_FILE_READ_CLOSE:
+ case HDF5_FILE_WRITE_OPEN:
+ case HDF5_FILE_WRITE_CLOSE:
default:
msg = "Unknown Timer";
break;