diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-13 19:29:59 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2019-12-05 20:41:45 (GMT) |
commit | 60756183d9fddba95c7e91ef537d4b351016773f (patch) | |
tree | 5b2a520507f99837c8b806ea6acde3f225f3ab40 /test/tattr.c | |
parent | c7b3d6d6a5c1d376812e17c0ddb26f55334a2c59 (diff) | |
download | hdf5-60756183d9fddba95c7e91ef537d4b351016773f.zip hdf5-60756183d9fddba95c7e91ef537d4b351016773f.tar.gz hdf5-60756183d9fddba95c7e91ef537d4b351016773f.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/tattr.c')
0 files changed, 0 insertions, 0 deletions