diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-13 19:29:59 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:20:19 (GMT) |
commit | 7bbe57d309a28a2aa16661ca437070b646326c82 (patch) | |
tree | 99002c8f56bb49a394b6f1bc1c069be200ecae54 /test/objcopy_ref.c | |
parent | d00c5685b608fbb951f9398495951ee072375232 (diff) | |
download | hdf5-7bbe57d309a28a2aa16661ca437070b646326c82.zip hdf5-7bbe57d309a28a2aa16661ca437070b646326c82.tar.gz hdf5-7bbe57d309a28a2aa16661ca437070b646326c82.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.c | 8 |
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:"); |