diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-14 12:10:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-14 12:10:53 (GMT) |
commit | e0bb475838f0c31743018e5c1c770b30b9373440 (patch) | |
tree | 295663cfdc5d032aa77e0f32e387adca39013183 /src/H5HFman.c | |
parent | 2ac77da499ca7e4dc5df553f7bf7d2ac279eb2de (diff) | |
download | hdf5-e0bb475838f0c31743018e5c1c770b30b9373440.zip hdf5-e0bb475838f0c31743018e5c1c770b30b9373440.tar.gz hdf5-e0bb475838f0c31743018e5c1c770b30b9373440.tar.bz2 |
[svn-r16305] Description:
Add detection of C99 "designated initializers" to configure script and
use new H5_HAVE_C99_DESIGNATED_INITIALIZER macro to conditionally compile
default layout variables in src/H5Pdcpl.c
Also, minor code cleanups, etc.
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
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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r-- | src/H5HFman.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c index e069e82..5bdc769 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -174,7 +174,8 @@ HDfprintf(stderr, "%s: sec_node->u.single.par_entry = %u\n", FUNC, sec_node->u.s /* Insert object into block */ /* Get the offset of the object within the block */ - blk_off = sec_node->sect_info.addr - dblock->block_off; + H5_CHECK_OVERFLOW((sec_node->sect_info.addr - dblock->block_off), hsize_t, size_t); + blk_off = (size_t)(sec_node->sect_info.addr - dblock->block_off); #ifdef QAK HDfprintf(stderr, "%s: blk_off = %Zu\n", FUNC, blk_off); HDfprintf(stderr, "%s: dblock->block_off = %Hu\n", FUNC, dblock->block_off); @@ -328,7 +329,8 @@ HDfprintf(stderr, "%s: entry address = %a\n", FUNC, iblock->ents[entry].addr); /* Set direct block info */ dblock_addr = iblock->ents[entry].addr; - dblock_size = hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width]; + H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width]), hsize_t, size_t); + dblock_size = (size_t)hdr->man_dtable.row_block_size[entry / hdr->man_dtable.cparam.width]; /* Check for offset of invalid direct block */ if(!H5F_addr_defined(dblock_addr)) { @@ -582,7 +584,8 @@ HDfprintf(stderr, "%s: entry address = %a\n", FUNC, iblock->ents[dblock_entry].a HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap ID not in allocated direct block") /* Set direct block info */ - dblock_size = hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]; + H5_CHECK_OVERFLOW((hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]), hsize_t, size_t); + dblock_size = (size_t)(hdr->man_dtable.row_block_size[dblock_entry / hdr->man_dtable.cparam.width]); /* Compute the direct block's offset in the heap's address space */ /* (based on parent indirect block's block offset) */ |