mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
[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)
This commit is contained in:
parent
a7028fb006
commit
d48558126d
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -16,7 +16,7 @@
|
||||
4. Get some information about the dataset from the file.
|
||||
*/
|
||||
#include "h5test.h"
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef H5_HAVE_GASS
|
||||
int main(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user