summaryrefslogtreecommitdiffstats
path: root/test/vfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/vfd.c')
-rw-r--r--test/vfd.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 4fc61da..a960c3c 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -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*/
@@ -776,8 +779,7 @@ error:
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -834,7 +836,7 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -1043,8 +1045,7 @@ error:
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_family_compat(void)
{
@@ -1128,7 +1129,7 @@ error:
return -1;
} /* end test_family_compat() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
@@ -1282,8 +1283,7 @@ error:
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
test_multi_opens(char *fname)
{
@@ -1301,7 +1301,7 @@ test_multi_opens(char *fname)
return(fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
-#pragma GCC diagnostic pop
+H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------