summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-11 20:28:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-02-11 20:28:56 (GMT)
commit4ec2df9ac08f0c28eb32211c3cb0139a73f82981 (patch)
tree5fd3daa9f8168cfb46902bd62ad070c6639796de /tools/src
parentbd5d6e4e772fe557ab52f881df17f73a4028184b (diff)
downloadhdf5-4ec2df9ac08f0c28eb32211c3cb0139a73f82981.zip
hdf5-4ec2df9ac08f0c28eb32211c3cb0139a73f82981.tar.gz
hdf5-4ec2df9ac08f0c28eb32211c3cb0139a73f82981.tar.bz2
Merge from dev, sanitizer, fortran, warnings and tools ids
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5format_convert/h5format_convert.c6
-rw-r--r--tools/src/h5import/h5import.c12
-rw-r--r--tools/src/h5jam/h5jam.c4
-rw-r--r--tools/src/h5jam/h5unjam.c4
-rw-r--r--tools/src/misc/h5clear.c4
5 files changed, 15 insertions, 15 deletions
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 257a047..f5234f4 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -219,8 +219,8 @@ leave(int ret)
static int
convert(hid_t fid, const char *dname)
{
- hid_t dcpl = -1;
- hid_t did = -1;
+ hid_t dcpl = H5I_INVALID_HID;
+ hid_t did = H5I_INVALID_HID;
H5D_layout_t layout_type;
H5D_chunk_index_t idx_type;
@@ -399,7 +399,7 @@ main(int argc, const char *argv[])
{
H5E_auto2_t func;
void *edata;
- hid_t fid = -1;
+ hid_t fid = H5I_INVALID_HID;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index bd1689f..81f9a32 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -1086,12 +1086,12 @@ out:
*/
static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
{
- hid_t group_id = -1;
- hid_t dset_id = -1;
- hid_t space_id = -1;
- hid_t mspace_id = -1;
- hid_t type_id = -1;
- hid_t handle = -1;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t space_id = H5I_INVALID_HID;
+ hid_t mspace_id = H5I_INVALID_HID;
+ hid_t type_id = H5I_INVALID_HID;
+ hid_t handle = H5I_INVALID_HID;
char *str1 = NULL;
char *str2 = NULL;
char *str3 = NULL;
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 4f3e7a4..de316c3 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -197,8 +197,8 @@ main (int argc, const char *argv[])
int ofid = -1;
void *edata;
H5E_auto2_t func;
- hid_t ifile = -1;
- hid_t plist = -1;
+ hid_t ifile = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
herr_t status;
htri_t testval;
hsize_t usize;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index ffe2aca..33c5a1b 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -199,8 +199,8 @@ main(int argc, const char *argv[])
{
void *edata;
H5E_auto2_t func;
- hid_t ifile = -1;
- hid_t plist = -1;
+ hid_t ifile = H5I_INVALID_HID;
+ hid_t plist = H5I_INVALID_HID;
off_t fsize;
hsize_t usize;
htri_t testval;
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index ae57031..927167b 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -252,8 +252,8 @@ int
main (int argc, const char *argv[])
{
char *fname = NULL; /* File name */
- hid_t fapl = -1; /* File access property list */
- hid_t fid = -1; /* File ID */
+ hid_t fapl = H5I_INVALID_HID; /* File access property list */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
haddr_t image_addr;
hsize_t image_len;
unsigned flags = H5F_ACC_RDWR; /* file access flags */