diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-19 20:15:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-04-19 20:15:21 (GMT) |
commit | 099b37d073e633b0cb4d8c3f41ddf5788e63e6ee (patch) | |
tree | 3316f03ab81dbbab9160aac62fefe3f78b50c1d4 /src/H5Aint.c | |
parent | 94cf912176257c753eaddde0acabc9a11be2e48d (diff) | |
download | hdf5-099b37d073e633b0cb4d8c3f41ddf5788e63e6ee.zip hdf5-099b37d073e633b0cb4d8c3f41ddf5788e63e6ee.tar.gz hdf5-099b37d073e633b0cb4d8c3f41ddf5788e63e6ee.tar.bz2 |
[svn-r20559] Description:
Bring r20407:20557 from trunk to revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (ember) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r-- | src/H5Aint.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index 3ffc6d3..4e610e4 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -232,9 +232,12 @@ H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_index_t idx_type, /* Correct # of attributes in table */ atable->nattrs = udata.curr_attr; - /* Sort attribute table in correct iteration order */ - if(H5A_attr_sort_table(atable, idx_type, order) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") + /* Don't sort an empty table. */ + if(atable->nattrs > 0) { + /* Sort attribute table in correct iteration order */ + if(H5A_attr_sort_table(atable, idx_type, order) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTSORT, FAIL, "error sorting attribute table") + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -888,8 +891,9 @@ H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_si HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to reset datatype sharing") } /* end else */ - /* Copy the dataspace for the attribute */ - attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, FALSE); + /* Copy the dataspace for the attribute. Make sure the maximal dimension is also copied. + * Otherwise the comparison in the test may complain about it. SLU 2011/4/12 */ + attr_dst->shared->ds = H5S_copy(attr_src->shared->ds, FALSE, TRUE); HDassert(attr_dst->shared->ds); /* Reset the dataspace's sharing in the source file before trying to share |