summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-20 20:39:39 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-20 20:39:39 (GMT)
commit0cdd1ec176836157015ff5bb2f8536e89071fb2e (patch)
treef4d43692160d4820cb9ac347655ad0c0ae91381c /tools/lib/h5diff_attr.c
parenta0c93eb2ed0e9c4e68480a90f76164ef6ef92549 (diff)
downloadhdf5-0cdd1ec176836157015ff5bb2f8536e89071fb2e.zip
hdf5-0cdd1ec176836157015ff5bb2f8536e89071fb2e.tar.gz
hdf5-0cdd1ec176836157015ff5bb2f8536e89071fb2e.tar.bz2
[svn-r14276] bug fix: avoid an assertion when string type sizes are different
instead print a warning message on verbose mode saying that the comparison is not possible note: partial fix, the next step is to compare strings that have different type sizes tested: windows
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index d3d6a66..9917df7 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -168,7 +168,18 @@ hsize_t diff_attr(hid_t loc1_id,
if ((msize2=H5Tget_size(mtype2_id))==0)
goto error;
- assert(msize1==msize2);
+ /*assert(msize1==msize2);*/
+
+ if ( msize1 != msize2)
+ {
+
+ if (options->m_verbose)
+ printf("Comparison not possible: different string sizes for attribute <%s>\n",
+ name1);
+ continue;
+
+
+ }
buf1=(void *) HDmalloc((unsigned)(nelmts1*msize1));
buf2=(void *) HDmalloc((unsigned)(nelmts1*msize2));