summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 6eafeec..6ff85c0 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1185,7 +1185,7 @@ H5D_update_entry_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, H5P_genplist_t *p
/* fill value variables */
H5D_fill_time_t fill_time;
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
- H5O_fill_new_t fill = { NULL, 0, NULL, H5D_ALLOC_TIME_LATE, H5D_FILL_TIME_ALLOC, TRUE };
+ H5O_fill_new_t fill;
H5D_fill_value_t fill_status;
struct H5O_t *oh = NULL; /* Pointer to dataset's object header */
@@ -1209,6 +1209,12 @@ H5D_update_entry_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, H5P_genplist_t *p
/* Get the file's 'use the latest version of the format' flag */
use_latest_format = H5F_USE_LATEST_FORMAT(file);
+ /* Initialize the fill value message */
+ HDmemset(&fill,0,sizeof(H5O_fill_new_t));
+ fill.alloc_time = H5D_ALLOC_TIME_LATE;
+ fill.fill_time = H5D_FILL_TIME_ALLOC;
+ fill.fill_defined = TRUE;
+
/* Point at dataset's copy, to cache it for later */
fill_prop = &dset->shared->fill;
fill_time = dset->shared->fill_time;
@@ -1845,7 +1851,7 @@ done:
static herr_t
H5D_open_oid(H5D_t *dataset, hid_t dxpl_id)
{
- H5O_fill_new_t fill = {NULL, 0, NULL, H5D_ALLOC_TIME_LATE, H5D_FILL_TIME_IFSET, TRUE};
+ H5O_fill_new_t fill;
unsigned alloc_time_state; /* Allocation time state */
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value area */
H5O_pline_t pline; /* I/O pipeline information */
@@ -1861,6 +1867,12 @@ H5D_open_oid(H5D_t *dataset, hid_t dxpl_id)
if(NULL == (dataset->shared = H5D_new(H5P_DATASET_CREATE_DEFAULT, FALSE, FALSE)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ /* Initialize the fill value message JAMES: initialize above instead? */
+ HDmemset(&fill,0,sizeof(H5O_fill_new_t));
+ fill.alloc_time = H5D_ALLOC_TIME_LATE;
+ fill.fill_time = H5D_FILL_TIME_IFSET;
+ fill.fill_defined = TRUE;
+
/* Open the dataset object */
if(H5O_open(&(dataset->oloc)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open")