summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:53:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:53:38 (GMT)
commitd517c77bc0fe9c9dbfd013d720e1533289decd9f (patch)
tree97f369888eccbb8455ebbc2fd6de9f6834f6b433 /src/H5Oattr.c
parentfc7993a9f068319ed35f13fd153feeb5da3d86a7 (diff)
downloadhdf5-d517c77bc0fe9c9dbfd013d720e1533289decd9f.zip
hdf5-d517c77bc0fe9c9dbfd013d720e1533289decd9f.tar.gz
hdf5-d517c77bc0fe9c9dbfd013d720e1533289decd9f.tar.bz2
[svn-r15610] Description:
Bring r15609 back from trunk: Omnibus compiler warning cleanup & some formatting happiness. Tested on: Mac OS X/32 10.5.4 (amazon) Too minor to require h5committest
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r--src/H5Oattr.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 0d62d9e..b77c241 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -185,7 +185,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, unsigned UNUSED mesg_flags,
p += name_len; /* advance the memory pointer */
/* Decode the attribute's datatype */
- if((attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)(f, dxpl_id, ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, p)) == NULL)
+ if(NULL == (attr->shared->dt = (H5T_t *)(H5O_MSG_DTYPE->decode)(f, dxpl_id, ((flags & H5O_ATTR_FLAG_TYPE_SHARED) ? H5O_MSG_FLAG_SHARED : 0), ioflags, p)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype")
if(attr->shared->version < H5O_ATTR_VERSION_2)
p += H5O_ALIGN_OLD(attr->shared->dt_size);
@@ -206,7 +206,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, unsigned UNUSED mesg_flags,
HDmemcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t));
/* Release temporary extent information */
- H5FL_FREE(H5S_extent_t, extent);
+ (void)H5FL_FREE(H5S_extent_t, extent);
/* Default to entire dataspace being selected */
if(H5S_select_all(attr->shared->ds, FALSE) < 0)
@@ -467,7 +467,7 @@ H5O_attr_size(const H5F_t UNUSED *f, const void *_mesg)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_attr_reset(void *_mesg)
+H5O_attr_reset(void UNUSED *_mesg)
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_reset)
@@ -686,8 +686,8 @@ H5O_attr_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t UNUSED *mesg_ty
/* Copy attribute's datatype */
/* (Start destination datatype as transient, even if source is named) */
- attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL);
- HDassert(attr_dst->shared->dt);
+ if(NULL == (attr_dst->shared->dt = H5T_copy(attr_src->shared->dt, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "cannot copy datatype")
/* Set the location of the destination datatype */
if(H5T_set_loc(attr_dst->shared->dt, file_dst, H5T_LOC_DISK) < 0)
@@ -931,7 +931,6 @@ H5O_attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src,
HDassert(attr_dst);
HDassert(file_dst);
-
/* Only need to fix reference attribute with real data being copied to
* another file.
*/