summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_array.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-09-13 21:11:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-09-13 21:11:30 (GMT)
commita8c63e28d570c1eea5a23b9ed684efb4cd24e3ba (patch)
treea501ac6a79670c132cad11386a819ffaea570945 /tools/lib/h5diff_array.c
parent3c021d3a7775df18247de19cee3805178cd2666c (diff)
downloadhdf5-a8c63e28d570c1eea5a23b9ed684efb4cd24e3ba.zip
hdf5-a8c63e28d570c1eea5a23b9ed684efb4cd24e3ba.tar.gz
hdf5-a8c63e28d570c1eea5a23b9ed684efb4cd24e3ba.tar.bz2
[svn-r24138] Cast constants to specified type.
Cast smaller vars to larger type. Cast calculation result to correct type. Changed int member to hbool_t Tested: local linux
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r--tools/lib/h5diff_array.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 7dba0e5..d08c23f 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -5792,14 +5792,14 @@ int ull2float(unsigned long long ull_value, float *f_value)
src_size = H5Tget_size(H5T_NATIVE_ULLONG);
dst_size = H5Tget_size(H5T_NATIVE_FLOAT);
- buf = (unsigned char*)HDcalloc(1, MAX(src_size, dst_size));
+ buf = (unsigned char*)HDcalloc((size_t)1, MAX(src_size, dst_size));
if(!buf)
goto error;
HDmemcpy(buf, &ull_value, src_size);
/* do conversion */
- if(H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, 1, buf, NULL, dxpl_id)<0)
+ if(H5Tconvert(H5T_NATIVE_ULLONG, H5T_NATIVE_FLOAT, (size_t)1, buf, NULL, dxpl_id)<0)
goto error;
HDmemcpy(f_value, buf, dst_size);
@@ -6358,9 +6358,9 @@ static void get_member_types(hid_t tid, mcomp_t *members)
return;
members->n = (unsigned)nmembs;
- members->ids = (hid_t *)HDcalloc(members->n, sizeof(hid_t));
- members->offsets = (size_t *)HDcalloc(members->n, sizeof(size_t));
- members->m = (mcomp_t **)HDcalloc(members->n, sizeof(mcomp_t *));
+ members->ids = (hid_t *)HDcalloc((size_t)members->n, sizeof(hid_t));
+ members->offsets = (size_t *)HDcalloc((size_t)members->n, sizeof(size_t));
+ members->m = (mcomp_t **)HDcalloc((size_t)members->n, sizeof(mcomp_t *));
for(u = 0; u < members->n; u++)
{