summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 470620f..88308ed 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -860,11 +860,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else
tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
}
- #ifdef H5_VMS
- h5tools_str_append(str, OPT(info->fmt_schar, "%hd"), tempchar);
- #else
h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
- #endif
}
} /* end if (sizeof(char) == nsize) */
else if (sizeof(int) == nsize) {
@@ -1062,6 +1058,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;
@@ -1191,7 +1189,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;
@@ -1204,6 +1204,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"));
@@ -1398,7 +1404,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);