summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2003-10-26 04:26:55 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2003-10-26 04:26:55 (GMT)
commit28c2e442dd04b456383420c6eebfadbdb6234ec5 (patch)
treedff6c45614afc79971ae5ccb35ff19a79ca60469
parent73afb8ce3eb7297000fe165f9cea2493118d64ea (diff)
downloadhdf5-28c2e442dd04b456383420c6eebfadbdb6234ec5.zip
hdf5-28c2e442dd04b456383420c6eebfadbdb6234ec5.tar.gz
hdf5-28c2e442dd04b456383420c6eebfadbdb6234ec5.tar.bz2
[svn-r7738] Purpose:
Fix example Description: On Solaris 64 (Sol), the output has garbage for a dataset when fill value is not set. Solution: Added setting fill value to the dataset first. Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) SunOS sol 5.8 (sol)
-rw-r--r--c++/examples/extend_ds.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index 34a50c3..4c4476a 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -72,6 +72,12 @@ int main (void)
cparms.setChunk( RANK, chunk_dims );
/*
+ * Set fill value for the dataset
+ */
+ int fill_val = 0;
+ cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
+
+ /*
* Create a new dataset within the file using cparms
* creation properties.
*/