diff options
author | David Young <dyoung@hdfgroup.org> | 2019-11-25 21:43:56 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-11-25 21:43:56 (GMT) |
commit | f2f8a554e65ee3e3ca501adf80fbdfd0225dac3f (patch) | |
tree | ef83cbaf3c9949a3ee9819a4a231ad3514c43735 /src/H5Fsuper_cache.c | |
parent | edd529714302f9ed218d1e61d5f496fa788d10b4 (diff) | |
download | hdf5-f2f8a554e65ee3e3ca501adf80fbdfd0225dac3f.zip hdf5-f2f8a554e65ee3e3ca501adf80fbdfd0225dac3f.tar.gz hdf5-f2f8a554e65ee3e3ca501adf80fbdfd0225dac3f.tar.bz2 |
Don't use C99 designated initializers, they're not compatible with
Visual Studio 2010.
Diffstat (limited to 'src/H5Fsuper_cache.c')
-rw-r--r-- | src/H5Fsuper_cache.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index b5e4255..b7c1dad 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -349,11 +349,7 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len, { const uint8_t *image = _image; /* Pointer into raw data buffer */ H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */ - /* Temporary file superblock, initialized because GCC 5.5 does not - * realize that H5F__superblock_prefix_decode() initializes it. - * TBD condition on compiler version. - */ - H5F_super_t sblock = {.super_vers = 0, .sizeof_addr = 0, .sizeof_size = 0}; + H5F_super_t sblock; /* Temporary file superblock */ htri_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -365,6 +361,15 @@ H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len, HDassert(*actual_len == image_len); HDassert(image_len >= H5F_SUPERBLOCK_FIXED_SIZE + 6); + /* Initialize because GCC 5.5 does not realize that + * H5F__superblock_prefix_decode() initializes it. + * + * TBD condition on compiler version. + */ + sblock.super_vers = 0; + sblock.sizeof_addr = 0; + sblock.sizeof_size = 0; + /* Deserialize the file superblock's prefix */ if(H5F__superblock_prefix_decode(&sblock, &image, udata, TRUE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, "can't decode file superblock prefix") |