summaryrefslogtreecommitdiffstats
path: root/test/file_image.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-25 21:11:52 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-25 21:11:52 (GMT)
commitaa08db839e6aea89487be985704d57a0e424b21b (patch)
tree51dbbee3efa3bc1a3f1bb2314202a5934d6f021c /test/file_image.c
parentcdc4b8a0fb55af4cf1a7bb4da5d8c4d454a0b8b6 (diff)
parent571a5e9250ca69adb54ef956361a5cf77059f67c (diff)
downloadhdf5-aa08db839e6aea89487be985704d57a0e424b21b.zip
hdf5-aa08db839e6aea89487be985704d57a0e424b21b.tar.gz
hdf5-aa08db839e6aea89487be985704d57a0e424b21b.tar.bz2
Merge pull request #2882 in HDFFV/hdf5 from ~BYRN/hdf5_adb:feature/cmakeV2-clang-format to develop
* commit '571a5e9250ca69adb54ef956361a5cf77059f67c': Add h5ls test plugin format target Fix manifest Add code owners file Update actions - split push/pull-request commits Change to executable Change to based on LLVM format Fix comment formatting due to tabs conversion Disable formatting for file File changes to affect formatting CMake and script changes for clang-format
Diffstat (limited to 'test/file_image.c')
-rw-r--r--test/file_image.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/test/file_image.c b/test/file_image.c
index 0d4873a..d784df2 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -67,7 +67,7 @@ typedef struct {
H5FD_file_image_op_t free_src;
} udata_t;
-
+
/******************************************************************************
* Function: test_properties
*
@@ -162,7 +162,7 @@ error:
return retval;
} /* end test_properties() */
-
+
/******************************************************************************
* Function: malloc_cb
*
@@ -185,7 +185,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata)
return HDmalloc(size);
}
-
+
/******************************************************************************
* Function: memcpy_cb
*
@@ -208,7 +208,7 @@ memcpy_cb(void *dest, const void *src, size_t size, H5FD_file_image_op_t op, voi
return HDmemcpy(dest, src, size);
}
-
+
/******************************************************************************
* Function: realloc_cb
*
@@ -231,7 +231,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata)
return HDrealloc(ptr,size);
}
-
+
/******************************************************************************
* Function: free_cb
*
@@ -253,7 +253,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata)
return(SUCCEED);
}
-
+
/******************************************************************************
* Function: udata_copy_cb
*
@@ -277,7 +277,7 @@ udata_copy_cb(void *udata)
return udata;
}
-
+
/******************************************************************************
* Function: udata_free_cb
*
@@ -301,7 +301,7 @@ udata_free_cb(void *udata)
return(SUCCEED);
}
-
+
/******************************************************************************
* Function: reset_udata
*
@@ -320,7 +320,7 @@ reset_udata(udata_t *u)
u->malloc_src = u->memcpy_src = u->realloc_src = u->free_src = H5FD_FILE_IMAGE_OP_NO_OP;
}
-
+
/******************************************************************************
* Function: test_callbacks
*
@@ -509,7 +509,7 @@ error:
return 1;
} /* test_callbacks() */
-
+
/******************************************************************************
* Function: test_core
*
@@ -657,7 +657,7 @@ error:
return 1;
} /* end test_core() */
-
+
/******************************************************************************
* Function: test_get_file_image
*
@@ -678,11 +678,11 @@ error:
* 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
test_get_file_image(const char * test_banner,
const int file_name_num,
- hid_t fapl,
+ hid_t fapl,
hbool_t user)
{
char file_name[1024] = "\0";
@@ -783,7 +783,7 @@ test_get_file_image(const char * test_banner,
ssize_t member_size;
ssize_t size_remaining;
- /*
+ /*
* Modifications need to be made to accommodate userblock when
* H5Fget_file_image() works for family driver
*/
@@ -855,7 +855,7 @@ test_get_file_image(const char * test_banner,
* the remainder of the file is all '\0's.
*/
file_size = (ssize_t)stat_buf.st_size;
- if(user) {
+ if(user) {
VERIFY(file_size > USERBLOCK_SIZE, "file size !> userblock size.");
file_size -= USERBLOCK_SIZE;
}
@@ -873,7 +873,7 @@ test_get_file_image(const char * test_banner,
fd = HDopen(file_name, O_RDONLY);
VERIFY(fd >= 0, "HDopen() failed.");
- if(user) {
+ if(user) {
HDoff_t off;
/* Position at userblock */
@@ -945,9 +945,9 @@ test_get_file_image(const char * test_banner,
error:
return 1;
} /* end test_get_file_image() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/******************************************************************************
* Function: test_get_file_image_error_rejection
*
@@ -1335,28 +1335,28 @@ main(void)
/* Perform tests with/without user block */
for(user = FALSE; user <= TRUE; user++) {
- /* test H5Fget_file_image() with sec2 driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_sec2(fapl) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with sec2 driver",
+ /* test H5Fget_file_image() with sec2 driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_sec2(fapl) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with sec2 driver",
0, fapl, user);
- /* test H5Fget_file_image() with stdio driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_stdio(fapl) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with stdio driver",
+ /* test H5Fget_file_image() with stdio driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_stdio(fapl) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with stdio driver",
1, fapl, user);
- /* test H5Fget_file_image() with core driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with core driver",
+ /* test H5Fget_file_image() with core driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with core driver",
2, fapl, user);
} /* end for */