summaryrefslogtreecommitdiffstats
path: root/test/objcopy_ref.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-13 19:29:59 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-12-09 20:58:22 (GMT)
commit94de95266ac13503fdb48146da5bd646b89c2ffb (patch)
tree20ea9f6d3264855b3effdc933b97f3d80fb3c77c /test/objcopy_ref.c
parent33f2948a613d28873b8adca32e712fcf3c898c95 (diff)
downloadhdf5-94de95266ac13503fdb48146da5bd646b89c2ffb.zip
hdf5-94de95266ac13503fdb48146da5bd646b89c2ffb.tar.gz
hdf5-94de95266ac13503fdb48146da5bd646b89c2ffb.tar.bz2
Change hdset_reg_ref_t and H5R_ref_t from arrays of unsigned char to
structs containing those arrays. Encapsulating the arrays in this way makes it easier to write and think about pointers to these types, casts to/from these types, etc. An interesting side-effect that we probably should *not* rely on is that the struct-encapsulation changes the alignment so that some GCC warnings about casts that increase the alignment requirement of the operand go away. Warnings like that have to be taken seriously: I will add -Werror=cast-align to the default compiler flags so that they stop the build quickly. GCC warnings led me to some surprising casts in test/trefer.c. I found that it was possible to make many simplifications after introducing the struct-encapsulation that I described, above. In test objcopy_ref `same_file` is assigned but never used. Delete it.
Diffstat (limited to 'test/objcopy_ref.c')
-rw-r--r--test/objcopy_ref.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index a73e569..b539b8a 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -1587,7 +1587,6 @@ main(void)
unsigned max_compact, min_dense;
int configuration; /* Configuration of tests. */
int ExpressMode;
- hbool_t same_file; /* Whether to run tests that only use one file */
/* Setup */
h5_reset();
@@ -1620,11 +1619,6 @@ main(void)
hid_t fcpl_src;
hid_t fcpl_dst;
- /* Start with same_file == TRUE. Use source file settings for these
- * tests. Don't run with a non-default destination file setting, as
- * destination settings have no effect. */
- same_file = TRUE;
-
/* No need to test dense attributes with old format */
if(!(configuration & CONFIG_SRC_NEW_FORMAT) && (configuration & CONFIG_DENSE))
continue;
@@ -1646,7 +1640,6 @@ main(void)
if(configuration & CONFIG_SHARE_DST) {
HDputs("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
- same_file = FALSE;
}
else {
HDputs("Testing without shared dst messages:");
@@ -1678,7 +1671,6 @@ main(void)
if(configuration & CONFIG_DST_NEW_FORMAT) {
HDputs("Testing with latest format for destination file:");
dst_fapl = fapl2;
- same_file = FALSE;
} /* end if */
else {
HDputs("Testing with oldest file format for destination file:");