summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-02-09 19:37:40 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-02-09 19:37:40 (GMT)
commit7e8e3eec42254a6988b2739b621b1412963d590c (patch)
treecc7d01adda3675d67d35c8cb2edaf7a1dc469f40 /src/H5D.c
parent35e7a062e26c1a65e571202a6fda0b475e42da00 (diff)
downloadhdf5-7e8e3eec42254a6988b2739b621b1412963d590c.zip
hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.gz
hdf5-7e8e3eec42254a6988b2739b621b1412963d590c.tar.bz2
[svn-r230] Changes were actually made by Robb. I am commiting them for him
while he is visiting LLNL. I changed the default creation template offset and length to 4. Will fix the problem later. Changes since 19980205 ---------------------- ./src/H5H.c ./src/H5Hprivate.h ./src/H5O.c ./src/H5Ocont.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c ./src/H5Oname.c ./src/H5Onull.c ./src/H5Oprivate.h ./src/H5Odspace.c ./src/H5Ostab.c ./src/debug.c ./html/H5.format.html Added an extra 4-byte field after the heap magic number for alignment on the DEC alpha. Changed object header message alignment to 8-bytes. ./src/H5F.c ./src/H5Farray.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fprivate.h ./src/H5Fsec2.c ./src/H5Fstdio.c ./src/H5Gnode.c ./src/H5O.c ./src/H5Odtype.c ./src/H5P.c ./src/H5Pprivate.h ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tpublic.h ./src/H5V.c ./src/H5detect.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/hyperslab.c ./test/istore.c ./test/th5p.c ./test/theap.c Fixed a few irix64 warnings regarding size_t vs. int, variables set but not used, printf formats ./config/irix64 Added `-woff 1196' to get rid of errors about __vfork() being implicitly defined in a system header file. ./src/H5B.c Fixed a stack alignment problem.
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 70d512c..28a3d2e 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -742,7 +742,6 @@ H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space,
{
H5D_t *new_dset = NULL;
H5D_t *ret_value = NULL;
- size_t nbytes;
intn i;
FUNC_ENTER(H5D_create, NULL);
@@ -776,7 +775,6 @@ H5D_create(H5F_t *f, const char *name, const H5T_t *type, const H5P_t *space,
}
/* Total raw data size */
- nbytes = H5T_get_size(type) * H5P_get_npoints(space);
new_dset->layout.type = new_dset->create_parms.layout;
new_dset->layout.ndims = H5P_get_ndims(space) + 1;
assert(new_dset->layout.ndims <= NELMTS(new_dset->layout.dim));
@@ -1037,7 +1035,6 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space,
assert(buf);
if (!file_space) file_space = dataset->space;
if (!mem_space) mem_space = file_space;
- assert (H5P_get_npoints (mem_space)==H5P_get_npoints (file_space));
/*
* Convert data types to atoms because the conversion functions are
@@ -1069,6 +1066,10 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space,
} else {
HDmemset (&numbering, 0, sizeof numbering);
}
+ if (H5P_get_npoints (mem_space)!=H5P_get_npoints (file_space)) {
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
+ "src and dest data spaces have different sizes");
+ }
/*
* Compute the size of the request and allocate scratch buffers.
@@ -1177,7 +1178,6 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space,
assert(buf);
if (!file_space) file_space = dataset->space;
if (!mem_space) mem_space = file_space;
- assert (H5P_get_npoints (mem_space)==H5P_get_npoints (file_space));
/*
* Convert data types to atoms because the conversion functions are
@@ -1209,6 +1209,10 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5P_t *mem_space,
} else {
HDmemset (&numbering, 0, sizeof numbering);
}
+ if (H5P_get_npoints (mem_space)!=H5P_get_npoints (file_space)) {
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
+ "src and dest data spaces have different sizes");
+ }
/*
* Compute the size of the request and allocate scratch buffers.