diff options
author | Quincey Koziol <koziol@koziol.gov> | 2020-06-26 23:57:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2020-06-26 23:57:38 (GMT) |
commit | e767f44e953047297fece364218147c908e8b585 (patch) | |
tree | d4b6909f14b78bb732b6947adc46ac3cd3ca54f6 /src/H5Oginfo.c | |
parent | 949649a2b6e00297cbdc49437e70a27e455e92d2 (diff) | |
parent | a08ab621febde7b09e4d86eab80cb029c123e9f6 (diff) | |
download | hdf5-e767f44e953047297fece364218147c908e8b585.zip hdf5-e767f44e953047297fece364218147c908e8b585.tar.gz hdf5-e767f44e953047297fece364218147c908e8b585.tar.bz2 |
Merge remote-tracking branch 'origin/develop' into monotonic_timer
Diffstat (limited to 'src/H5Oginfo.c')
-rw-r--r-- | src/H5Oginfo.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index 468e07a..d6190c6 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -32,14 +32,14 @@ /* PRIVATE PROTOTYPES */ -static void *H5O_ginfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); +static void *H5O_ginfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, + unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_ginfo_copy(const void *_mesg, void *_dest); static size_t H5O_ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); -static herr_t H5O_ginfo_free(void *_mesg); -static herr_t H5O_ginfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, - FILE * stream, int indent, int fwidth); +static herr_t H5O__ginfo_free(void *_mesg); +static herr_t H5O__ginfo_debug(H5F_t *f, const void *_mesg, FILE * stream, + int indent, int fwidth); /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_GINFO[1] = {{ @@ -52,7 +52,7 @@ const H5O_msg_class_t H5O_MSG_GINFO[1] = {{ H5O_ginfo_copy, /*copy the native value */ H5O_ginfo_size, /*size of symbol table entry */ NULL, /*default reset method */ - H5O_ginfo_free, /* free method */ + H5O__ginfo_free, /* free method */ NULL, /* file delete method */ NULL, /* link method */ NULL, /*set share method */ @@ -62,7 +62,7 @@ const H5O_msg_class_t H5O_MSG_GINFO[1] = {{ NULL, /* post copy native value to file */ NULL, /* get creation index */ NULL, /* set creation index */ - H5O_ginfo_debug /*debug the message */ + H5O__ginfo_debug /*debug the message */ }}; /* Current version of group info information */ @@ -94,8 +94,9 @@ H5FL_DEFINE_STATIC(H5O_ginfo_t); *------------------------------------------------------------------------- */ static void * -H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) +H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_ginfo_t *ginfo = NULL; /* Pointer to group information message */ unsigned char flags; /* Flags for encoding group info */ @@ -112,7 +113,7 @@ H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5 /* Allocate space for message */ if(NULL == (ginfo = H5FL_CALLOC(H5O_ginfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Get the flags for the group */ flags = *p++; @@ -170,7 +171,7 @@ static herr_t H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg; - unsigned char flags; /* Flags for encoding group info */ + unsigned char flags = 0; /* Flags for encoding group info */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -182,7 +183,7 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, *p++ = H5O_GINFO_VERSION; /* The flags for the group info */ - flags = ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0; + flags = (unsigned char)(ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0); flags = (unsigned char)(flags | (ginfo->store_est_entry_info ? H5O_GINFO_STORE_EST_ENTRY_INFO : 0)); *p++ = flags; @@ -230,7 +231,7 @@ H5O_ginfo_copy(const void *_mesg, void *_dest) /* check args */ HDassert(ginfo); if(!dest && NULL == (dest = H5FL_MALLOC(H5O_ginfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* copy */ *dest = *ginfo; @@ -285,9 +286,9 @@ H5O_ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha /*------------------------------------------------------------------------- - * Function: H5O_ginfo_free + * Function: H5O__ginfo_free * - * Purpose: Free's the message + * Purpose: Frees the message * * Return: Non-negative on success/Negative on failure * @@ -297,7 +298,7 @@ H5O_ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha *------------------------------------------------------------------------- */ static herr_t -H5O_ginfo_free(void *mesg) +H5O__ginfo_free(void *mesg) { FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -306,11 +307,11 @@ H5O_ginfo_free(void *mesg) mesg = H5FL_FREE(H5O_ginfo_t, mesg); FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5O_ginfo_free() */ +} /* end H5O__ginfo_free() */ /*------------------------------------------------------------------------- - * Function: H5O_ginfo_debug + * Function: H5O__ginfo_debug * * Purpose: Prints debugging info for a message. * @@ -323,12 +324,12 @@ H5O_ginfo_free(void *mesg) *------------------------------------------------------------------------- */ static herr_t -H5O_ginfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE * stream, - int indent, int fwidth) +H5O__ginfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, + int indent, int fwidth) { const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR /* check args */ HDassert(f); @@ -347,5 +348,5 @@ H5O_ginfo_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi "Estimated length of object in group's name:", ginfo->est_name_len); FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5O_ginfo_debug() */ +} /* end H5O__ginfo_debug() */ |