diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-10-19 16:46:12 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-10-19 16:46:12 (GMT) |
commit | c997f29d608d71d39ad61ddb241f1459f2670983 (patch) | |
tree | a077ab791caceead29368edcb86d5ae50ee11ac8 /tools/lib | |
parent | f18867f1db6371da295f695f5d8712024b18c59e (diff) | |
download | hdf5-c997f29d608d71d39ad61ddb241f1459f2670983.zip hdf5-c997f29d608d71d39ad61ddb241f1459f2670983.tar.gz hdf5-c997f29d608d71d39ad61ddb241f1459f2670983.tar.bz2 |
[svn-r11584] Purpose:
bug fix
Description:
an assertion after the search for objects was saying that the number of
objects in file should be > 0
removed it, since there can be a case where the number of objects is 0.
in this case this was found by a case where zlib was not present and the output file
was not written any objects to
note: this was only detected on the windows batch files, that do not have a conditional
condition to not run tests when a filter is not present
Solution:
Platforms tested:
linux
Misc. update:
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 3 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 17 |
2 files changed, 14 insertions, 6 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 8066e5e..7a25d4f 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -256,8 +256,7 @@ h5diff (const char *fname1, goto out; } - assert (nobjects1 > 0); - assert (nobjects2 > 0); + /*------------------------------------------------------------------------- * get the list of objects in the files diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 0eba02b..9556fe7 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -529,6 +529,12 @@ h5tools_simple_prefix(FILE *stream, const h5dump_t *info, * Do not dereference the memory for a variable-length string here. * Deref in h5tools_str_sprint() instead so recursive types are * handled correctly. + * + * Pedro Vicente Nunes, THG, 2005-10-19 + * pass to the prefix in h5tools_simple_prefix the total position + * instead of the current stripmine position i; this is necessary + * to print the array indices + * new field sm_pos in h5tools_context_t, the current stripmine element position *------------------------------------------------------------------------- */ void @@ -663,9 +669,12 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container, if (secnum) multiline++; - /* pass to the prefix the total position instead of the current - stripmine position i; this is necessary to print the array - indices */ + /* pass to the prefix in h5tools_simple_prefix the total position + instead of the current stripmine position i; this is necessary + to print the array indices */ + + /* pass to the prefix in h5tools_simple_prefix the total position + this is necessary to print the array indices */ curr_pos = ctx->sm_pos + i; h5tools_simple_prefix(stream, info, ctx, curr_pos, secnum); @@ -1004,7 +1013,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset, flags = (elmtno == 0) ? START_OF_DATA : 0; flags |= ((elmtno + hs_nelmts) >= p_nelmts) ? END_OF_DATA : 0; - /* initialize the current stripmine position i; this is necessary to print the array + /* initialize the current stripmine position; this is necessary to print the array indices */ ctx.sm_pos = elmtno; |