summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-16 14:19:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-16 14:19:41 (GMT)
commit448217e7e3f15ed6aee5595a6f8bbe7db0abcb56 (patch)
tree26a96f999946948524a1b93e2e8cffef54b7337b /tools/lib/h5diff.c
parentd5c073d406f8d1e1ac3bcb05883bea406c8e9378 (diff)
downloadhdf5-448217e7e3f15ed6aee5595a6f8bbe7db0abcb56.zip
hdf5-448217e7e3f15ed6aee5595a6f8bbe7db0abcb56.tar.gz
hdf5-448217e7e3f15ed6aee5595a6f8bbe7db0abcb56.tar.bz2
HDFFV-10297 Fix compiler compaliants
Diffstat (limited to 'tools/lib/h5diff.c')
-rw-r--r--tools/lib/h5diff.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 285ec60..a584bf2 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -1061,11 +1061,13 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
/* make full path for obj1 */
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
- if(HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0)
+ if(HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) {
HERROR(FAIL, H5E_tools_min_id_g, "name buffer allocation failed");
+ }
#else /* H5_HAVE_ASPRINTF */
- if((obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL)
+ if((obj1_fullpath = (char*)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) {
HERROR(FAIL, H5E_tools_min_id_g, "name buffer allocation failed");
+ }
else {
HDstrcpy(obj1_fullpath, grp1_path);
HDstrcat(obj1_fullpath, table->objs[i].name);
@@ -1075,11 +1077,13 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1,
/* make full path for obj2 */
#ifdef H5_HAVE_ASPRINTF
/* Use the asprintf() routine, since it does what we're trying to do below */
- if(HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0)
+ if(HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) {
HERROR(FAIL, H5E_tools_min_id_g, "name buffer allocation failed");
+ }
#else /* H5_HAVE_ASPRINTF */
- if((obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL)
+ if((obj2_fullpath = (char*)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) {
HERROR(FAIL, H5E_tools_min_id_g, "name buffer allocation failed");
+ }
else {
HDstrcpy(obj2_fullpath, grp2_path);
HDstrcat(obj2_fullpath, table->objs[i].name);