summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-09 20:23:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-09 20:23:28 (GMT)
commitd48558126d9c19fe3b418a22086a015bd56997f9 (patch)
treefc50bbeaf501c08c356a572558654d1c065abd15 /src
parenta7028fb006be7d91626650f22748d22a1a74f6ee (diff)
downloadhdf5-d48558126d9c19fe3b418a22086a015bd56997f9.zip
hdf5-d48558126d9c19fe3b418a22086a015bd56997f9.tar.gz
hdf5-d48558126d9c19fe3b418a22086a015bd56997f9.tar.bz2
[svn-r5866] Purpose:
Code cleanup Description: Cleaned up a few warnings from compiling with --disable-hsizet on Linux Platforms tested: Linux 2.2.x (eirene)
Diffstat (limited to 'src')
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5Dseq.c6
-rw-r--r--src/H5F.c8
-rw-r--r--src/H5FDfamily.c8
-rw-r--r--src/H5Fseq.c6
5 files changed, 18 insertions, 12 deletions
diff --git a/src/H5D.c b/src/H5D.c
index d8a618a..5e6765d 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -3191,7 +3191,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
size_t ptsperbuf; /* Maximum # of points which fit in the buffer */
size_t bufsize=64*1024; /* Size of buffer to write */
size_t size; /* Current # of points to write */
- haddr_t addr; /* Offset in dataset */
+ hsize_t addr; /* Offset in dataset */
void *buf = NULL; /* Buffer for fill value writing */
H5O_fill_t fill; /* Fill value information */
H5P_genplist_t *plist; /* Property list */
diff --git a/src/H5Dseq.c b/src/H5Dseq.c
index d753dba..ce11c8d 100644
--- a/src/H5Dseq.c
+++ b/src/H5Dseq.c
@@ -258,7 +258,8 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* all datasets in external files would alias to the same set of
* file offsets, totally mixing up the data sieve buffer information. -QAK
*/
- if (H5O_efl_read(f, &efl, file_offset_arr[v], seq_len_arr[v], real_buf)<0)
+ H5_CHECK_OVERFLOW(file_offset_arr[v],hsize_t,haddr_t);
+ if (H5O_efl_read(f, &efl, (haddr_t)file_offset_arr[v], seq_len_arr[v], real_buf)<0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "external data read failed");
/* Increment offset in buffer */
@@ -641,7 +642,8 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* all datasets in external files would alias to the same set of
* file offsets, totally mixing up the data sieve buffer information. -QAK
*/
- if (H5O_efl_write(f, &efl, file_offset_arr[v], seq_len_arr[v], real_buf)<0)
+ H5_CHECK_OVERFLOW(file_offset_arr[v],hsize_t,haddr_t);
+ if (H5O_efl_write(f, &efl, (haddr_t)file_offset_arr[v], seq_len_arr[v], real_buf)<0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "external data write failed");
/* Increment offset in buffer */
diff --git a/src/H5F.c b/src/H5F.c
index 5f70972..1977033 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2460,6 +2460,7 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate,
} /* end if */
if (alloc_only) {
+ haddr_t addr;
/*
* Allocate space for the userblock, superblock, and driver info
* block. We do it with one allocation request because the userblock
@@ -2467,10 +2468,9 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate,
* the first allocation request is required to return memory at
* format address zero.
*/
- haddr_t addr = H5FD_alloc(f->shared->lf, H5FD_MEM_SUPER,
- (f->shared->base_addr +
- superblock_size +
- driver_size));
+ H5_CHECK_OVERFLOW(f->shared->base_addr,haddr_t,hsize_t);
+ addr = H5FD_alloc(f->shared->lf, H5FD_MEM_SUPER,
+ ((hsize_t)f->shared->base_addr + superblock_size + driver_size));
if (HADDR_UNDEF==addr)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to allocate file space for userblock and/or superblock");
if (0!=addr)
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index bd7e621..db43cae 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -794,16 +794,18 @@ H5FD_family_set_eoa(H5FD_t *_file, haddr_t eoa)
file->nmembs = MAX(file->nmembs, i+1);
sprintf(memb_name, file->name, i);
H5E_BEGIN_TRY {
+ H5_CHECK_OVERFLOW(file->memb_size,hsize_t,haddr_t);
file->memb[i] = H5FDopen(memb_name, file->flags|H5F_ACC_CREAT,
- file->memb_fapl_id, file->memb_size);
+ file->memb_fapl_id, (haddr_t)file->memb_size);
} H5E_END_TRY;
if (NULL==file->memb[i])
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open member file");
}
/* Set the EOA marker for the member */
- if (addr>file->memb_size) {
- H5FDset_eoa(file->memb[i], file->memb_size);
+ H5_CHECK_OVERFLOW(file->memb_size,hsize_t,haddr_t);
+ if (addr>(haddr_t)file->memb_size) {
+ H5FDset_eoa(file->memb[i], (haddr_t)file->memb_size);
addr -= file->memb_size;
} else {
H5FDset_eoa(file->memb[i], addr);
diff --git a/src/H5Fseq.c b/src/H5Fseq.c
index d753dba..ce11c8d 100644
--- a/src/H5Fseq.c
+++ b/src/H5Fseq.c
@@ -258,7 +258,8 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* all datasets in external files would alias to the same set of
* file offsets, totally mixing up the data sieve buffer information. -QAK
*/
- if (H5O_efl_read(f, &efl, file_offset_arr[v], seq_len_arr[v], real_buf)<0)
+ H5_CHECK_OVERFLOW(file_offset_arr[v],hsize_t,haddr_t);
+ if (H5O_efl_read(f, &efl, (haddr_t)file_offset_arr[v], seq_len_arr[v], real_buf)<0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "external data read failed");
/* Increment offset in buffer */
@@ -641,7 +642,8 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* all datasets in external files would alias to the same set of
* file offsets, totally mixing up the data sieve buffer information. -QAK
*/
- if (H5O_efl_write(f, &efl, file_offset_arr[v], seq_len_arr[v], real_buf)<0)
+ H5_CHECK_OVERFLOW(file_offset_arr[v],hsize_t,haddr_t);
+ if (H5O_efl_write(f, &efl, (haddr_t)file_offset_arr[v], seq_len_arr[v], real_buf)<0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "external data write failed");
/* Increment offset in buffer */