summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2012-08-15 16:04:26 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2012-08-15 16:04:26 (GMT)
commit231fc4d7818c037844aa8adb9f514da8e6c37fa9 (patch)
treee92f8eb7e6f2217c1808bd9dd00f1da9adfa1a2c /tools/lib/h5diff_attr.c
parentd27ec1d3bd4740d7d962f26da9b2a19a27592273 (diff)
downloadhdf5-231fc4d7818c037844aa8adb9f514da8e6c37fa9.zip
hdf5-231fc4d7818c037844aa8adb9f514da8e6c37fa9.tar.gz
hdf5-231fc4d7818c037844aa8adb9f514da8e6c37fa9.tar.bz2
[svn-r22684] Purpose:
Address HDFFV-7942 - h5diff: incorrect result for comparing attribute data with different type size in same class Description: When comparing attribute data values with same type class but different size, the result was incorrect. It was due to the size difference and got truncated. Fixed to match up the smaller type size to big type size like what dataset does. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE cmake), cmake (jam)
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 85cd01f..144159a 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -405,6 +405,14 @@ hsize_t diff_attr(hid_t loc1_id,
continue;
}
+ /*-----------------------------------------------------------------
+ * "upgrade" the smaller memory size
+ *------------------------------------------------------------------
+ */
+ if (FAIL == match_up_memsize (ftype1_id, ftype2_id,
+ &mtype1_id, &mtype2_id,
+ &msize1, &msize2))
+ goto error;
/*---------------------------------------------------------------------
* read