summaryrefslogtreecommitdiffstats
path: root/src/H5Gdense.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-12-14 01:22:33 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-12-14 01:22:33 (GMT)
commitabf03a6c650928881a6c929312d1e4f50101d50e (patch)
tree29a88ab0bff52265c2ca0f80a0ae0aeeeccb1c00 /src/H5Gdense.c
parente78db67c621a2ce04d95c1c6b2b4b3c23682abfb (diff)
downloadhdf5-abf03a6c650928881a6c929312d1e4f50101d50e.zip
hdf5-abf03a6c650928881a6c929312d1e4f50101d50e.tar.gz
hdf5-abf03a6c650928881a6c929312d1e4f50101d50e.tar.bz2
[svn-r28612] Normalization of H5G package with revise_chunks.
Mostly minor fixes like warnings, etc. Tested on: Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only (these changes have been in revise_chunks for a long time)
Diffstat (limited to 'src/H5Gdense.c')
-rw-r--r--src/H5Gdense.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index ab0547b..e8fa237 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -322,8 +322,9 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_NAME;
bt2_cparam.node_size = (size_t)H5G_NAME_BT2_NODE_SIZE;
+ H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
bt2_cparam.rrec_size = 4 + /* Name's hash value */
- fheap_id_len; /* Fractal heap ID */
+ (uint32_t)fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_NAME_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_NAME_BT2_MERGE_PERC;
if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
@@ -342,8 +343,9 @@ HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr)
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
bt2_cparam.cls = H5G_BT2_CORDER;
bt2_cparam.node_size = (size_t)H5G_CORDER_BT2_NODE_SIZE;
- bt2_cparam.rrec_size = 8 + /* Creation order value */
- fheap_id_len; /* Fractal heap ID */
+ H5_CHECK_OVERFLOW(fheap_id_len, /* From: */ hsize_t, /* To: */ uint32_t);
+ bt2_cparam.rrec_size = 8 + /* Creation order value */
+ (uint32_t)fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_CORDER_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_CORDER_BT2_MERGE_PERC;
if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))