diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-13 18:03:18 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:19:37 (GMT) |
commit | cbd2e29914edbb39a04892432c9aa9883efb838b (patch) | |
tree | 14be9edb868c68cfc182e7101bb3cdb8c54a8496 /test/fillval.c | |
parent | 7638fbb258a51ad1de01a29da87db768f77af364 (diff) | |
download | hdf5-cbd2e29914edbb39a04892432c9aa9883efb838b.zip hdf5-cbd2e29914edbb39a04892432c9aa9883efb838b.tar.gz hdf5-cbd2e29914edbb39a04892432c9aa9883efb838b.tar.bz2 |
GCC isn't smart enough to realize that `fill_c` is always initialized
and exclusively used in `datatype == H5T_COMPOUND` branches, so just
initialize it at its declaration so that GCC doesn't warn.
Diffstat (limited to 'test/fillval.c')
-rw-r--r-- | test/fillval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fillval.c b/test/fillval.c index 47cd53a..5c20e14 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -758,7 +758,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, int fillval=(-1), val_rd, should_be; int i, j, *buf=NULL, odd; unsigned u; - comp_datatype rd_c, fill_c, should_be_c; + comp_datatype rd_c, fill_c = {.a = 0, .x = 0, .y = 0, .z = 0}, + should_be_c; comp_datatype *buf_c=NULL; H5D_space_status_t allocation; |