summaryrefslogtreecommitdiffstats
path: root/src/H5B2cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-13 04:52:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-13 04:52:22 (GMT)
commit97b6832023ceb7665750de6a0adb3e67c5961df2 (patch)
treef8894636f01d284a508925d3f165a6b246606295 /src/H5B2cache.c
parent97e6dc5d876d4e772fd65727f6b9b2c4367cb080 (diff)
downloadhdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.zip
hdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.tar.gz
hdf5-97b6832023ceb7665750de6a0adb3e67c5961df2.tar.bz2
[svn-r15211] Description:
Update the gcc flags for version 4.3 Clean up warnings Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (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/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 Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.3 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r--src/H5B2cache.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index d8679aa..686bea6 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -177,7 +177,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, vo
size = H5B2_HEADER_SIZE(f);
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (hdr = H5WB_actual(wb, size)))
+ if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, NULL, "can't get actual buffer")
/* Read header from disk */
@@ -300,7 +300,7 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B
size = H5B2_HEADER_SIZE(f);
/* Get a pointer to a buffer that's large enough for header */
- if(NULL == (hdr = H5WB_actual(wb, size)))
+ if(NULL == (hdr = (uint8_t *)H5WB_actual(wb, size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "can't get actual buffer")
/* Get temporary pointer to serialized header */
@@ -326,8 +326,10 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B
UINT16ENCODE(p, shared->depth);
/* Split & merge %s */
- *p++ = shared->split_percent;
- *p++ = shared->merge_percent;
+ H5_CHECK_OVERFLOW(shared->split_percent, /* From: */ unsigned, /* To: */ uint8_t);
+ *p++ = (uint8_t)shared->split_percent;
+ H5_CHECK_OVERFLOW(shared->merge_percent, /* From: */ unsigned, /* To: */ uint8_t);
+ *p++ = (uint8_t)shared->merge_percent;
/* Root node pointer */
H5F_addr_encode(f, &p, bt2->root.addr);