From 825e9ff8ff4eee0373c8a22804d528d6c73d793c Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 15 Nov 2000 12:12:03 -0500 Subject: [svn-r2922] Purpose: Bug fix Description: [Most] SGIs failed on dumping VL data during the daily tests they seem to be initializing variables differently, exposing a bug in dumping datasets with scalar dataspaces. Also, clean up code to get rid of compiler warnings. Solution: Initilialize variable correctly. Platforms tested: SGI IRIX 6.5 (paz) --- tools/h5tools.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/h5tools.c b/tools/h5tools.c index 8d06467..2408470 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -1534,8 +1534,8 @@ h5dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset, return -1; /* Print the data */ - flags = (((elmtno == 0) ? START_OF_DATA : 0) | - (((elmtno + hs_nelmts) >= p_nelmts) ? END_OF_DATA : 0)); + flags = (elmtno == 0) ? START_OF_DATA : 0; + flags |= ((elmtno + hs_nelmts) >= p_nelmts) ? END_OF_DATA : 0; h5dump_simple_data(stream, info, dset, &ctx, flags, hs_nelmts, p_type, sm_buf); @@ -2036,6 +2036,10 @@ recheck: /* Create a simple memory space so that we can read in the hvl_t object */ mem_space = H5Screate_simple(0, NULL, NULL); + /* Fake dims[0] for ndim==0, FIX! */ + if(ndims==0) + dims[0]=1; + for (i = 0; i < dims[0]; i++) { herr_t ret; hvl_t vldata; -- cgit v0.12