summaryrefslogtreecommitdiffstats
path: root/src/H5EA.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-30 21:25:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-30 21:25:51 (GMT)
commitee1e49e8f665fb37359aa194f8cfd0847b46e2ff (patch)
treeaebed75776f1266cab113b5d255ff44ad6e0f43c /src/H5EA.c
parent393100b2b64ff6180119649599926ca7f22682f8 (diff)
downloadhdf5-ee1e49e8f665fb37359aa194f8cfd0847b46e2ff.zip
hdf5-ee1e49e8f665fb37359aa194f8cfd0847b46e2ff.tar.gz
hdf5-ee1e49e8f665fb37359aa194f8cfd0847b46e2ff.tar.bz2
[svn-r15738] Description:
Correct a couple of minor bugs for handling data blocks from index block and extend tests further. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) 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 production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5EA.c')
-rw-r--r--src/H5EA.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5EA.c b/src/H5EA.c
index 8db42c4..6f28238 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -380,9 +380,12 @@ HDfprintf(stderr, "%s: Index block address is: %a\n", FUNC, hdr->idx_blk_addr);
/* Get super block index where element is located */
sblk_idx = H5EA__dblock_sblk_idx(hdr, idx);
+#ifdef QAK
+HDfprintf(stderr, "%s: sblk_idx = %u, iblock->nsblks = %Zu\n", FUNC, sblk_idx, iblock->nsblks);
+#endif /* QAK */
/* Adjust index to offset in super block */
- elmt_idx = idx - hdr->cparam.idx_blk_elmts + hdr->sblk_info[sblk_idx].start_idx;
+ elmt_idx = idx - (hdr->cparam.idx_blk_elmts + hdr->sblk_info[sblk_idx].start_idx);
#ifdef QAK
HDfprintf(stderr, "%s: after adjusting for super block elements, elmt_idx = %Hu\n", FUNC, elmt_idx);
#endif /* QAK */
@@ -397,7 +400,7 @@ HDfprintf(stderr, "%s: Element in data block pointed to by address in index bloc
/* Compute the data block index in index block */
dblk_idx = (size_t)(hdr->sblk_info[sblk_idx].start_dblk + (elmt_idx / hdr->sblk_info[sblk_idx].dblk_nelmts));
#ifdef QAK
-HDfprintf(stderr, "%s: dblk_idx = %u\n", FUNC, dblk_idx);
+HDfprintf(stderr, "%s: dblk_idx = %u, iblock->ndblk_addrs = %Zu\n", FUNC, dblk_idx, iblock->ndblk_addrs);
#endif /* QAK */
HDassert(dblk_idx < iblock->ndblk_addrs);
@@ -528,7 +531,7 @@ HDfprintf(stderr, "%s: Index block address is: %a\n", FUNC, hdr->idx_blk_addr);
sblk_idx = H5EA__dblock_sblk_idx(hdr, idx);
/* Adjust index to offset in super block */
- elmt_idx = idx - hdr->cparam.idx_blk_elmts + hdr->sblk_info[sblk_idx].start_idx;
+ elmt_idx = idx - (hdr->cparam.idx_blk_elmts + hdr->sblk_info[sblk_idx].start_idx);
#ifdef QAK
HDfprintf(stderr, "%s: after adjusting for super block elements, elmt_idx = %Hu\n", FUNC, elmt_idx);
#endif /* QAK */