diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-09-24 21:54:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-09-24 21:54:09 (GMT) |
commit | a2a61197aa18fcafef35ecc4aaef268b2e4731d5 (patch) | |
tree | de3dd1fa0a25e3551e7d70cd0b6bf2c725a2ba07 /src/H5FA.c | |
parent | f1360e4d06c6e75a3ee51f5e79973aaed9b53800 (diff) | |
download | hdf5-a2a61197aa18fcafef35ecc4aaef268b2e4731d5.zip hdf5-a2a61197aa18fcafef35ecc4aaef268b2e4731d5.tar.gz hdf5-a2a61197aa18fcafef35ecc4aaef268b2e4731d5.tar.bz2 |
[svn-r17521] Description:
Bring r17514:17518 from trunk to revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5FA.c')
-rw-r--r-- | src/H5FA.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -361,16 +361,16 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx else { /* paging */ size_t page_idx; /* Index of page within data block */ size_t dblk_page_nelmts; /* # of elements in a data block page */ - hsize_t elmt_idx; /* Element index within the page */ + size_t elmt_idx; /* Element index within the page */ haddr_t dblk_page_addr; /* Address of data block page */ /* Compute the page & element index */ - page_idx = (size_t)idx / dblock->dblk_page_nelmts; - elmt_idx = (size_t)idx % dblock->dblk_page_nelmts; + page_idx = (size_t)(idx / dblock->dblk_page_nelmts); + elmt_idx = (size_t)(idx % dblock->dblk_page_nelmts); /* Get the address of the data block page */ dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock) + - (page_idx * dblock->dblk_page_size); + ((hsize_t)page_idx * dblock->dblk_page_size); /* Check for using last page, to set the number of elements on the page */ if((page_idx + 1) == dblock->npages) @@ -378,7 +378,7 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx else dblk_page_nelmts = dblock->dblk_page_nelmts; - /* Check if the page has been create yet */ + /* Check if the page has been created yet */ if(!H5V_bit_get(dblock->dblk_page_init, page_idx)) { /* Create the data block page */ if(H5FA__dblk_page_create(hdr, dxpl_id, dblk_page_addr, dblk_page_nelmts) < 0) @@ -468,7 +468,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); size_t page_idx; /* Index of page within data block */ /* Compute the page index */ - page_idx = (size_t)idx / dblock->dblk_page_nelmts; + page_idx = (size_t)(idx / dblock->dblk_page_nelmts); /* Check if the page is defined yet */ if(!H5V_bit_get(dblock->dblk_page_init, page_idx)) { @@ -480,15 +480,15 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx); H5_LEAVE(SUCCEED) } /* end if */ else { /* get the page */ - hsize_t elmt_idx; /* Element index within the page */ - haddr_t dblk_page_addr; /* Address of data block page */ - size_t dblk_page_nelmts; /* # of elements in a data block page */ + size_t dblk_page_nelmts; /* # of elements in a data block page */ + size_t elmt_idx; /* Element index within the page */ + haddr_t dblk_page_addr; /* Address of data block page */ /* Compute the element index */ - elmt_idx = (size_t)idx % dblock->dblk_page_nelmts; + elmt_idx = (size_t)(idx % dblock->dblk_page_nelmts); /* Compute the address of the data block */ - dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock) + (page_idx * dblock->dblk_page_size); + dblk_page_addr = dblock->addr + H5FA_DBLOCK_PREFIX_SIZE(dblock) + ((hsize_t)page_idx * dblock->dblk_page_size); /* Check for using last page, to set the number of elements on the page */ if((page_idx + 1) == dblock->npages) |