From 0cdd1ec176836157015ff5bb2f8536e89071fb2e Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Tue, 20 Nov 2007 15:39:39 -0500 Subject: [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 --- tools/lib/h5diff_attr.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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)); -- cgit v0.12