diff options
author | kmu <kmu@hdfgroup.org> | 2020-01-23 21:12:00 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2020-01-23 21:12:00 (GMT) |
commit | 838d4ec56bfc82266a2110635e14d36e075075cc (patch) | |
tree | 0da94266f7a4f65b4f2f9045c2913dce9ec89863 /test/vds_swmr_reader.c | |
parent | a9aaad9be317ed92150ccc6b4e8574e596447dba (diff) | |
download | hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.zip hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.gz hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.bz2 |
squash cast warning fix
Diffstat (limited to 'test/vds_swmr_reader.c')
-rw-r--r-- | test/vds_swmr_reader.c | 6 |
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 |