diff options
author | David Young <dyoung@hdfgroup.org> | 2020-01-29 19:51:10 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-01-29 19:51:10 (GMT) |
commit | 1b49ccd7faaf3285ac736ac260f15fe3e6cb69f8 (patch) | |
tree | c5f4f7b06142b328c247ecc9eb233e4a6344bb12 /test/vfd.c | |
parent | 20c09524ea348f4009555a1cba2731842b9af80e (diff) | |
parent | f19e06b59ee53f17465a7b5974c25c3245a40d9a (diff) | |
download | hdf5-1b49ccd7faaf3285ac736ac260f15fe3e6cb69f8.zip hdf5-1b49ccd7faaf3285ac736ac260f15fe3e6cb69f8.tar.gz hdf5-1b49ccd7faaf3285ac736ac260f15fe3e6cb69f8.tar.bz2 |
Merge pull request #2321 in HDFFV/hdf5 from ~DYOUNG/werror:reduce-werror-diffs-3 to develop
* commit 'f19e06b59ee53f17465a7b5974c25c3245a40d9a':
testpar/t_2Gio.c: Fix a typo that I think was introduced by a previous warnings PR. An array element was assigned to itself---shape[2]Â =Â shape[2];---instead of being assigned to chunk[2].
Diffstat (limited to 'test/vfd.c')
-rw-r--r-- | test/vfd.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -562,6 +562,7 @@ test_direct(void) size_t mbound; size_t fbsize; size_t cbsize; + void *proto_points = NULL, *proto_check = NULL; int *points = NULL, *check = NULL, *p1 = NULL, *p2 = NULL; int wdata2[DSET2_DIM] = {11,12,13,14}; int rdata2[DSET2_DIM]; @@ -633,10 +634,12 @@ test_direct(void) /* Allocate aligned memory for data set 1. For data set 1, everything is aligned including * memory address, size of data, and file address. */ - if(0 != HDposix_memalign(&points, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int)))) + if(0 != HDposix_memalign(&proto_points, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int)))) TEST_ERROR; - if(0 != HDposix_memalign(&check, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int)))) + points = proto_points; + if(0 != HDposix_memalign(&proto_check, (size_t)FBSIZE, (size_t)(DSET1_DIM1 * DSET1_DIM2 * sizeof(int)))) TEST_ERROR; + check = proto_check; /* Initialize the dset1 */ p1 = points; @@ -746,10 +749,10 @@ error: H5Fclose(file); } H5E_END_TRY; - if(points) - HDfree(points); - if(check) - HDfree(check); + if(proto_points) + HDfree(proto_points); + if(proto_check) + HDfree(proto_check); return -1; #endif /*H5_HAVE_DIRECT*/ |