diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-11-09 14:13:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-11-09 14:13:07 (GMT) |
commit | 4da93e9d6f9ee0fc7462ee66645c5ad0fa9a9e35 (patch) | |
tree | ad6d5f412a8f1af0a2121bb0fb7fa3073462c713 /tools/h5diff | |
parent | f97de01d36cde2b66042ffac3debcfab72de0c1d (diff) | |
download | hdf5-4da93e9d6f9ee0fc7462ee66645c5ad0fa9a9e35.zip hdf5-4da93e9d6f9ee0fc7462ee66645c5ad0fa9a9e35.tar.gz hdf5-4da93e9d6f9ee0fc7462ee66645c5ad0fa9a9e35.tar.bz2 |
TRILABS-81 coverity tools fixes
Diffstat (limited to 'tools/h5diff')
-rw-r--r-- | tools/h5diff/h5diff_common.c | 6 | ||||
-rw-r--r-- | tools/h5diff/h5diffgentest.c | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 6221843..de6a51d 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -350,7 +350,7 @@ check_n_input( const char *str ) unsigned i; char c; - for (i = 0; i < strlen(str); i++) { + for (i = 0; i < HDstrlen(str); i++) { c = str[i]; if (i == 0) { if (c < 49 || c > 57) /* ascii values between 1 and 9 */ @@ -387,7 +387,7 @@ check_p_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') + if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; x = atof(str); @@ -421,7 +421,7 @@ check_d_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') + if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; x = atof(str); diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 2955d2c..233baa9 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -114,6 +114,7 @@ static hid_t UD_traverse(H5_ATTR_UNUSED const char * link_name, H5_ATTR_UNUSED size_t udata_size, H5_ATTR_UNUSED hid_t lapl_id) { return -1; } + const H5L_class_t UD_link_class[1] = { { H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ (H5L_type_t) MY_LINKCLASS, /* Link type id number */ @@ -4810,10 +4811,8 @@ static void test_objs_nocomparables(const char *fname1, const char *fname2) hid_t topgid1 = -1; hid_t topgid2 = -1; hid_t gid1 = -1; - hid_t did1 = -1; hid_t tid1 = -1; hid_t gid2 = -1; - hid_t did2 = -1; hid_t tid2 = -1; hsize_t dims[1] = { DIM_ARRY }; int data1[DIM_ARRY] = { 1, 1, 1 }; @@ -4918,10 +4917,6 @@ out: H5Gclose(topgid1); if (topgid2) H5Gclose(topgid2); - if (did1) - H5Dclose(did1); - if (did2) - H5Dclose(did2); if (gid1) H5Gclose(gid1); if (gid2) |