summaryrefslogtreecommitdiffstats
path: root/test/vds_swmr_reader.c
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-23 21:12:00 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:52 (GMT)
commit30e61cf0904697c256fb3236fab118d49e2722cf (patch)
tree187e1fc7c2f58121c2d94fc1543fb2a38e6049b1 /test/vds_swmr_reader.c
parentcfd8856288232b1cd1e495ddfd4aba79d1f60422 (diff)
downloadhdf5-30e61cf0904697c256fb3236fab118d49e2722cf.zip
hdf5-30e61cf0904697c256fb3236fab118d49e2722cf.tar.gz
hdf5-30e61cf0904697c256fb3236fab118d49e2722cf.tar.bz2
squash cast warning fix
Diffstat (limited to 'test/vds_swmr_reader.c')
-rw-r--r--test/vds_swmr_reader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index eb9a82b..1ee65a0 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -45,8 +45,10 @@ main(void)
TEST_ERROR
/* Create the read buffer */
- n_elements = VDS_PLANE[1] * VDS_PLANE[2];
- size = n_elements * sizeof(int);
+ if(VDS_PLANE[1] * VDS_PLANE[2] > INT_MAX)
+ TEST_ERROR
+ n_elements = (int)(VDS_PLANE[1] * VDS_PLANE[2]);
+ size = (size_t)n_elements * sizeof(int);
if(NULL == (buffer = (int *)HDmalloc(size)))
TEST_ERROR