summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:10:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:10:41 (GMT)
commitc465e18a68f2a77550d93366a5b6c8fac2e24502 (patch)
treebd3649f75f1507040b68d8e15c63333600816360 /src/H5Oattr.c
parent068620ea815d8590982069cfb6374e07d3c8e1e6 (diff)
downloadhdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.zip
hdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.tar.gz
hdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.tar.bz2
[svn-r15609] Description:
Omnibus compiler warning cleanup & some reformatting also. 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.
*/