summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
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/lib/h5tools_str.c
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/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c14
1 files changed, 12 insertions, 2 deletions
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);