diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-14 23:07:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-14 23:07:03 (GMT) |
commit | d3396a79532601bf22e385f94b12e55dfb2c3bd0 (patch) | |
tree | dedf3566ea2ebf40c2d7475e8a50a3f2f0d57774 /hl/test/test_ds.c | |
parent | 7a9e13afdb134bafc070cf8bd2087a84fd0d2334 (diff) | |
download | hdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.zip hdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.tar.gz hdf5-d3396a79532601bf22e385f94b12e55dfb2c3bd0.tar.bz2 |
[svn-r30075] Description:
Bring object/dataset/group/named datatype features from revise_chunks
branch to trunk. Also CMake support for h5format_convert and a bunch of
misc. cleanups.
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'hl/test/test_ds.c')
-rw-r--r-- | hl/test/test_ds.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 7b6fb82..47929e6 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -4870,8 +4870,16 @@ static int read_data( const char* fname, } for(i=0, nelms=1; i < ndims; i++) { - fscanf( f, "%s %u", str, &j); - fscanf( f, "%d",&n ); + if(fscanf( f, "%s %u", str, &j) && HDferror(f)) { + printf( "fscanf error in file %s\n", data_file ); + HDfclose(f); + return -1; + } /* end if */ + if(fscanf( f, "%d",&n ) < 0 && HDferror(f)) { + printf( "fscanf error in file %s\n", data_file ); + HDfclose(f); + return -1; + } /* end if */ dims[i] = (hsize_t)n; nelms *= (size_t)n; } @@ -4885,7 +4893,11 @@ static int read_data( const char* fname, } for(j = 0; j < nelms; j++) { - fscanf( f, "%f",&val ); + if(fscanf( f, "%f",&val ) < 0 && HDferror(f)) { + printf( "fscanf error in file %s\n", data_file ); + HDfclose(f); + return -1; + } /* end if */ (*buf)[j] = val; } HDfclose(f); |