diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-08-31 19:04:23 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-08-31 19:04:23 (GMT) |
commit | c226e58005f54b29dc9fc5f762f7aa6382e790ff (patch) | |
tree | fa288e15e01237434f2193d99bc21bb50963b12f /tools/lib/h5tools_str.c | |
parent | e6f9fc5f7f58e4c0a9a8541bc5674b440abd658c (diff) | |
download | hdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.zip hdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.tar.gz hdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.tar.bz2 |
[svn-r27626] Various minor warning fixes before major SWMR and VDS merges.
gcc 4.9.2 was used to create the warning list
- implicit casts
- shadowed variables
- various enum issues
- other minor fixes (comments, unused macros, etc.)
Tested on: h5committest
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index b61ed34..88308ed 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1058,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; @@ -1187,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; @@ -1200,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")); @@ -1394,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); |