summaryrefslogtreecommitdiffstats
path: root/tools/src/h5dump
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-16 16:42:24 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-16 16:42:24 (GMT)
commit7e93acd94f20c73d27bb2eb4f7b4389d88cfb299 (patch)
treecc3e04bdcb987e194bb481540fca17a2e2ea914a /tools/src/h5dump
parent7366709e4000a96a9942934da0d13474213567f3 (diff)
parent024f7ba09250110c19b070c9699cfbc0f9dc2b96 (diff)
downloadhdf5-7e93acd94f20c73d27bb2eb4f7b4389d88cfb299.zip
hdf5-7e93acd94f20c73d27bb2eb4f7b4389d88cfb299.tar.gz
hdf5-7e93acd94f20c73d27bb2eb4f7b4389d88cfb299.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into develop
Diffstat (limited to 'tools/src/h5dump')
-rw-r--r--tools/src/h5dump/h5dump.c4
-rw-r--r--tools/src/h5dump/h5dump_ddl.c8
-rw-r--r--tools/src/h5dump/h5dump_xml.c24
3 files changed, 18 insertions, 18 deletions
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 0222c8b..731fcd7 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1393,8 +1393,8 @@ error:
int
main(int argc, const char *argv[])
{
- hid_t fid = -1;
- hid_t gid = -1;
+ hid_t fid = H5I_INVALID_HID;
+ hid_t gid = H5I_INVALID_HID;
hid_t fapl_id = H5P_DEFAULT;
H5E_auto2_t func;
H5E_auto2_t tools_func;
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index bc426f2..2eb11fd 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -614,7 +614,7 @@ dump_named_datatype(hid_t tid, const char *name)
{
H5O_info_t oinfo;
unsigned attr_crt_order_flags;
- hid_t tcpl_id = -1; /* datatype creation property list ID */
+ hid_t tcpl_id = H5I_INVALID_HID; /* datatype creation property list ID */
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
@@ -1415,7 +1415,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data)
void
handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
{
- hid_t gid = -1;
+ hid_t gid = H5I_INVALID_HID;
if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) {
error_msg("unable to open root group\n");
@@ -1469,8 +1469,8 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
void
handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5_ATTR_UNUSED pe, const char H5_ATTR_UNUSED *display_name)
{
- hid_t oid = -1;
- hid_t attr_id = -1;
+ hid_t oid = H5I_INVALID_HID;
+ hid_t attr_id = H5I_INVALID_HID;
char *obj_name = NULL;
char *attr_name = NULL;
int j;
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index b78cf00..c116da8 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -610,7 +610,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen)
HDsprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno);
- return(0);
+ return 0;
}
static const char *quote = "&quot;";
@@ -1783,9 +1783,9 @@ xml_dump_dataspace(hid_t space)
void
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, int H5_ATTR_UNUSED pindex)
{
- hid_t space = -1;
- hid_t type = -1;
- hid_t p_type = -1;
+ hid_t space = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t p_type = H5I_INVALID_HID;
hsize_t size[64];
hsize_t nelmts = 1;
int ndims;
@@ -1950,9 +1950,9 @@ herr_t
xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *info,
void H5_ATTR_UNUSED * op_data)
{
- hid_t attr_id = -1;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t attr_id = H5I_INVALID_HID;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
H5S_class_t space_type;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
@@ -2787,8 +2787,8 @@ static int
xml_print_refs(hid_t did, int source)
{
herr_t e;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
hsize_t i;
size_t tsiz;
@@ -2936,8 +2936,8 @@ static int
xml_print_strs(hid_t did, int source)
{
herr_t e;
- hid_t type = -1;
- hid_t space = -1;
+ hid_t type = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
htri_t is_vlstr = FALSE;
size_t tsiz = 0;
@@ -4121,7 +4121,7 @@ xml_print_enum(hid_t type)
unsigned char *value = NULL; /*value array */
unsigned nmembs; /*number of members */
hid_t super; /*enum base integer type */
- hid_t native = -1; /*native integer datatype */
+ hid_t native = H5I_INVALID_HID; /*native integer datatype */
size_t dst_size; /*destination value type size */
unsigned i; /*miscellaneous counters */
size_t j;