[svn-r27128] Fix warnings in H5Tdbg

This commit is contained in:
Jerome Soumagne 2015-06-01 10:41:33 -05:00
parent 78c4a8f4c6
commit 9ff4558203

View File

@ -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() */