summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-11 11:36:41 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-11 11:36:41 (GMT)
commit4083be1ff20b66ee75b32df141fea5e36d771ced (patch)
treeb8d59f8bf79a4228367fe9d6b34a581268d5ee34 /src/H5Oattr.c
parent98c184e1306196e47e4bacdca5ac54c808c565bc (diff)
parent1008afc457e288d4f7186225d859c5a8fe361d9f (diff)
downloadhdf5-4083be1ff20b66ee75b32df141fea5e36d771ced.zip
hdf5-4083be1ff20b66ee75b32df141fea5e36d771ced.tar.gz
hdf5-4083be1ff20b66ee75b32df141fea5e36d771ced.tar.bz2
Merge remote-tracking branch 'origin/develop' into namespace_cleanup_01
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r--src/H5Oattr.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 7fa4cad..8b02724 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -108,8 +108,11 @@ H5FL_EXTERN(H5S_extent_t);
with the decoded information
USAGE
void *H5O__attr_decode(f, mesg_flags, p)
- H5F_t *f; IN: pointer to the HDF5 file struct
- unsigned mesg_flags; IN: Message flags to influence decoding
+ H5F_t *f; IN: pointer to the HDF5 file struct
+ H5O_t *open_oh; IN: pointer to the object header
+ unsigned mesg_flags; IN: message flags to influence decoding
+ unsigned *ioflags; IN/OUT: flags for decoding
+ size_t p_size; IN: size of buffer *p
const uint8_t *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
@@ -120,16 +123,16 @@ H5FL_EXTERN(H5S_extent_t);
--------------------------------------------------------------------------*/
static void *
H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
- unsigned *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
+ unsigned *ioflags, size_t p_size, const uint8_t *p)
{
- H5A_t *attr = NULL;
- H5S_extent_t *extent; /*extent dimensionality information */
- size_t name_len; /*attribute name length */
- size_t dt_size; /* Datatype size */
- hssize_t sds_size; /* Signed Dataspace size */
- hsize_t ds_size; /* Dataspace size */
- unsigned flags = 0; /* Attribute flags */
- H5A_t *ret_value = NULL; /* Return value */
+ H5A_t *attr = NULL;
+ H5S_extent_t *extent; /*extent dimensionality information */
+ size_t name_len; /*attribute name length */
+ size_t dt_size; /* Datatype size */
+ hssize_t sds_size; /* Signed Dataspace size */
+ hsize_t ds_size; /* Dataspace size */
+ unsigned flags = 0; /* Attribute flags */
+ H5A_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -138,7 +141,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
HDassert(p);
if(NULL == (attr = H5FL_CALLOC(H5A_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (attr->shared = H5FL_CALLOC(H5A_shared_t)))
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, NULL, "can't allocate shared attr structure")
@@ -146,7 +149,7 @@ H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
/* Version number */
attr->shared->version = *p++;
if(attr->shared->version < H5O_ATTR_VERSION_1 || attr->shared->version > H5O_ATTR_VERSION_LATEST)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message")
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, NULL, "bad version number for attribute message")
/* Get the flags byte if we have a later version of the attribute */
if(attr->shared->version >= H5O_ATTR_VERSION_2) {