diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-25 23:30:08 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:19:38 (GMT) |
commit | 10911a11767aee10c5bc1def143dad1a5f5576cc (patch) | |
tree | f4bb11ec822884b1fb4be69dfd248080940d9f62 | |
parent | dffa21d2fb817ab59c180d54acde876567beb78d (diff) | |
download | hdf5-10911a11767aee10c5bc1def143dad1a5f5576cc.zip hdf5-10911a11767aee10c5bc1def143dad1a5f5576cc.tar.gz hdf5-10911a11767aee10c5bc1def143dad1a5f5576cc.tar.bz2 |
Oops, remove more C99 designated initializers for VS 2010 compatibility.
-rw-r--r-- | hl/src/H5DS.c | 6 | ||||
-rw-r--r-- | src/H5Fsuper_cache.c | 3 | ||||
-rw-r--r-- | src/H5HGcache.c | 2 | ||||
-rw-r--r-- | test/fillval.c | 8 |
4 files changed, 14 insertions, 5 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 44e0ecf9..ce61028 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -1433,7 +1433,11 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label) union { /* union is needed to eliminate compiler warnings about */ char ** buf; /* discarding the 'const' qualifier in the free */ char const ** const_buf; /* buf calls */ - } u = {.buf = NULL, .const_buf = NULL}; + } u; + + u.buf = NULL; + u.const_buf = NULL; + /*------------------------------------------------------------------------- * parameter checking *------------------------------------------------------------------------- diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 6ec3507..460a732 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -885,7 +885,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, { const uint8_t *image = _image; /* Pointer into raw data buffer */ H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */ - H5O_drvinfo_t drvrinfo = {.len = 0}; /* Driver info */ + H5O_drvinfo_t drvrinfo; /* Driver info */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -897,6 +897,7 @@ H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, HDassert(*actual_len == image_len); HDassert(image_len == H5F_DRVINFOBLOCK_HDR_SIZE); + drvrinfo.len = 0; /* Deserialize the file driver info's prefix */ if(H5F__drvrinfo_prefix_decode(&drvrinfo, NULL, &image, udata, TRUE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file driver info prefix") diff --git a/src/H5HGcache.c b/src/H5HGcache.c index 751bbcc..c52118f 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -206,7 +206,7 @@ static herr_t H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void *udata, size_t *actual_len) { - H5HG_heap_t heap = {.size = 0}; /* Global heap */ + H5HG_heap_t heap; /* Global heap */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC diff --git a/test/fillval.c b/test/fillval.c index 5c20e14..dd0ca7f 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -758,11 +758,15 @@ 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 = {.a = 0, .x = 0, .y = 0, .z = 0}, - should_be_c; + comp_datatype rd_c, fill_c, should_be_c; comp_datatype *buf_c=NULL; H5D_space_status_t allocation; + fill_c.a = 0; + fill_c.x = 0; + fill_c.y = 0; + fill_c.z = 0; + if(datatype == H5T_INTEGER) { fillval = *(int*)_fillval; } |