summaryrefslogtreecommitdiffstats
path: root/c++/test/dsets.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-12 04:02:26 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-12 04:02:26 (GMT)
commita791213860bee1a2990a9b502819f17abf7ff8a0 (patch)
treeeb6a0fb329cf263a781901e4ecfad41809f76fbe /c++/test/dsets.cpp
parent170b9d0eed23d84bfad64f216b8759b1dc40586c (diff)
downloadhdf5-a791213860bee1a2990a9b502819f17abf7ff8a0.zip
hdf5-a791213860bee1a2990a9b502819f17abf7ff8a0.tar.gz
hdf5-a791213860bee1a2990a9b502819f17abf7ff8a0.tar.bz2
[svn-r25030] Purpose: Fix HDFFV-8658
Description: Turned on warnings and removed some of those. (merged from trunk-r24994) Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++/test/dsets.cpp')
-rw-r--r--c++/test/dsets.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 6824403..d1ced1d 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -312,10 +312,14 @@ test_datasize(FileAccPropList &fapl)
// Get the dimension sizes.
hsize_t dims[2];
int n_dims = space.getSimpleExtentDims(dims);
+ if (n_dims < 0)
+ {
+ throw Exception("test_compression", "DataSpace::getSimpleExtentDims() failed");
+ }
// Calculate the supposed size. Size of each value is int (4), from
// test_simple_io.
- int expected_size = 4 * dims[0] * dims[1];
+ size_t expected_size = 4 * dims[0] * dims[1];
// getInMemDataSize() returns the in memory size of the data.
size_t ds_size = dset.getInMemDataSize();