summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2015-06-01 15:41:33 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2015-06-01 15:41:33 (GMT)
commit9ff455820324f2f39f69a12c9bb0be38b011a688 (patch)
tree23ebea7c67e7d2f19bc99f29fc36c8a4cb4fd803 /src
parent78c4a8f4c66aed5792dc858cfb1b59cb1b425475 (diff)
downloadhdf5-9ff455820324f2f39f69a12c9bb0be38b011a688.zip
hdf5-9ff455820324f2f39f69a12c9bb0be38b011a688.tar.gz
hdf5-9ff455820324f2f39f69a12c9bb0be38b011a688.tar.bz2
[svn-r27128] Fix warnings in H5Tdbg
Diffstat (limited to 'src')
-rw-r--r--src/H5Tdbg.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c
index fe204d8..18e0f2a 100644
--- a/src/H5Tdbg.c
+++ b/src/H5Tdbg.c
@@ -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() */