diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-06-02 14:46:51 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-06-02 14:46:51 (GMT) |
commit | f486fe1a495840b0da77a7642a7e572fac3a64b0 (patch) | |
tree | f1e361fa03bb72509736917c7f3ad71cd1f056ce /src/H5Tdbg.c | |
parent | 17a9efa359e335542f84dcedf5d30c87420cbd9d (diff) | |
parent | fc45d5fcb05fbf1b9ee05a46a25afc6fd6c40503 (diff) | |
download | hdf5-f486fe1a495840b0da77a7642a7e572fac3a64b0.zip hdf5-f486fe1a495840b0da77a7642a7e572fac3a64b0.tar.gz hdf5-f486fe1a495840b0da77a7642a7e572fac3a64b0.tar.bz2 |
[svn-r27137] svn merge -r27115:27135 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
Diffstat (limited to 'src/H5Tdbg.c')
-rw-r--r-- | src/H5Tdbg.c | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index fe204d8..717fc17 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -102,7 +102,7 @@ *------------------------------------------------------------------------- */ herr_t -H5T__print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/) +H5T__print_stats(H5T_path_t H5_ATTR_UNUSED * path, int H5_ATTR_UNUSED * nprint/*in,out*/) { #ifdef H5T_DEBUG hsize_t nbytes; @@ -165,14 +165,19 @@ H5T_debug(const H5T_t *dt, FILE *stream) { const char *s1 = "", *s2 = ""; unsigned i; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_NOAPI_NOINIT /* Check args */ HDassert(dt); HDassert(stream); switch(dt->shared->type) { + case H5T_NO_CLASS: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "no class"); + break; + case H5T_INTEGER: s1 = "int"; break; @@ -212,6 +217,9 @@ H5T_debug(const H5T_t *dt, FILE *stream) s1 = "vlen"; break; + case H5T_REFERENCE: + case H5T_ARRAY: + case H5T_NCLASSES: default: s1 = ""; break; @@ -247,6 +255,10 @@ H5T_debug(const H5T_t *dt, FILE *stream) uint64_t tmp; switch(dt->shared->u.atomic.order) { + case H5T_ORDER_ERROR: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "order error"); + break; + case H5T_ORDER_BE: s1 = "BE"; break; @@ -263,6 +275,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) s1 = "NONE"; break; + case H5T_ORDER_MIXED: default: s1 = "order?"; break; @@ -277,8 +290,16 @@ H5T_debug(const H5T_t *dt, FILE *stream) fprintf(stream, ", prec=%lu", (unsigned long) (dt->shared->u.atomic.prec)); switch(dt->shared->type) { + case H5T_NO_CLASS: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "no class"); + break; + case H5T_INTEGER: switch(dt->shared->u.atomic.u.i.sign) { + case H5T_SGN_ERROR: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "sign error"); + break; + case H5T_SGN_NONE: s1 = "unsigned"; break; @@ -287,6 +308,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) s1 = NULL; break; + case H5T_NSGN: default: s1 = "sign?"; break; @@ -298,6 +320,10 @@ H5T_debug(const H5T_t *dt, FILE *stream) case H5T_FLOAT: switch(dt->shared->u.atomic.u.f.norm) { + case H5T_NORM_ERROR: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "norm error"); + break; + case H5T_NORM_IMPLIED: s1 = "implied"; break; @@ -335,6 +361,16 @@ H5T_debug(const H5T_t *dt, FILE *stream) } break; + case H5T_TIME: + case H5T_STRING: + case H5T_BITFIELD: + case H5T_OPAQUE: + case H5T_COMPOUND: + case H5T_REFERENCE: + case H5T_ENUM: + case H5T_VLEN: + case H5T_ARRAY: + case H5T_NCLASSES: default: /* No additional info */ break; @@ -351,6 +387,10 @@ H5T_debug(const H5T_t *dt, FILE *stream) fprintf(stream, "\n"); } else if(H5T_VLEN == dt->shared->type) { switch(dt->shared->u.vlen.loc) { + case H5T_LOC_BADLOC: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype location"); + break; + case H5T_LOC_MEMORY: fprintf(stream, ", loc=memory"); break; @@ -359,6 +399,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) fprintf(stream, ", loc=disk"); break; + case H5T_LOC_MAXLOC: default: fprintf(stream, ", loc=UNKNOWN"); break; @@ -397,6 +438,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) } fprintf(stream, "}"); - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_debug() */ |