summaryrefslogtreecommitdiffstats
path: root/test/trefer_deprec.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-05 20:41:45 (GMT)
commit60756183d9fddba95c7e91ef537d4b351016773f (patch)
tree5b2a520507f99837c8b806ea6acde3f225f3ab40 /test/trefer_deprec.c
parentc7b3d6d6a5c1d376812e17c0ddb26f55334a2c59 (diff)
downloadhdf5-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/trefer_deprec.c')
-rw-r--r--test/trefer_deprec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 194f27e..272b866 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -517,7 +517,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t high[SPACE2_RANK]; /* Selection bounds */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
- hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */
+ hdset_reg_ref_t nvrbuf[3]={{{0}},{{101}},{{255}}}; /* buffer with non-valid refs */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
*drbuf; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */