diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
commit | feb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch) | |
tree | e15d7e751af4e3c42e77ea955d91db4cf27a71cf /src/H5Topaque.c | |
parent | bdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff) | |
download | hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2 |
Formats the source and updates the gcc warning pragmas
Diffstat (limited to 'src/H5Topaque.c')
-rw-r--r-- | src/H5Topaque.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c index 4e8f1d4..8d18abe 100644 --- a/src/H5Topaque.c +++ b/src/H5Topaque.c @@ -16,17 +16,14 @@ * datatypes in the H5T interface. */ -#include "H5Tmodule.h" /* This source code file is part of the H5T module */ +#include "H5Tmodule.h" /* This source code file is part of the H5T module */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Tpkg.h" /* Datatypes */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Tpkg.h" /* Datatypes */ - - - /*------------------------------------------------------------------------- * Function: H5Tset_tag * @@ -44,20 +41,20 @@ herr_t H5Tset_tag(hid_t type_id, const char *tag) { - H5T_t *dt=NULL; - herr_t ret_value=SUCCEED; /* Return value */ + H5T_t *dt = NULL; + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*s", type_id, tag); /* Check args */ - if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE))) + if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") - if (H5T_STATE_TRANSIENT!=dt->shared->state) + if (H5T_STATE_TRANSIENT != dt->shared->state) HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ - if (H5T_OPAQUE!=dt->shared->type) + if (H5T_OPAQUE != dt->shared->type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type") if (!tag) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag") @@ -72,7 +69,6 @@ done: FUNC_LEAVE_API(ret_value) } - /*------------------------------------------------------------------------- * Function: H5Tget_tag * @@ -91,14 +87,14 @@ done: char * H5Tget_tag(hid_t type_id) { - H5T_t *dt=NULL; - char *ret_value; + H5T_t *dt = NULL; + char * ret_value; FUNC_ENTER_API(NULL) H5TRACE1("*s", "i", type_id); /* Check args */ - if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE))) + if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") while (dt->shared->parent) dt = dt->shared->parent; /*defer to parent*/ @@ -106,10 +102,9 @@ H5Tget_tag(hid_t type_id) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class") /* result */ - if (NULL==(ret_value=H5MM_strdup(dt->shared->u.opaque.tag))) + if (NULL == (ret_value = H5MM_strdup(dt->shared->u.opaque.tag))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") done: FUNC_LEAVE_API(ret_value) } - |