summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-08-31 20:14:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-08-31 20:14:57 (GMT)
commit2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d (patch)
tree3d69591861803060012eed0be300427f4c261fc8 /src
parent1d3a7ec6515f26f13cb5d8e5c65fd848fd235d8f (diff)
parent81ca9e4c79a125cfcea9e426e1e91d94cdf6a2aa (diff)
downloadhdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.zip
hdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.tar.gz
hdf5-2c91cbecc6460d1a319bfb2303e228ea6f6d6e4d.tar.bz2
[svn-r27630] Description:
Bring in changes from the trunk, through r27628. Tested on: MacOSX/64 10.10.5 (amazon) w/serial (h5committest not required on this branch)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c10
-rw-r--r--src/H5Dcontig.c76
-rw-r--r--src/H5Dint.c103
-rw-r--r--src/H5Dlayout.c49
-rw-r--r--src/H5Dpkg.h3
-rw-r--r--src/H5FDstdio.c42
-rw-r--r--src/H5Fsuper.c10
-rw-r--r--src/H5Ocache.c22
-rw-r--r--src/H5Olayout.c48
-rw-r--r--src/H5PL.c2
-rw-r--r--src/H5Tfixed.c16
-rw-r--r--src/H5Topaque.c20
-rw-r--r--src/H5Tpad.c18
-rw-r--r--src/H5Tprecis.c32
-rw-r--r--src/H5Tstrpad.c16
-rw-r--r--src/H5Tvisit.c13
-rw-r--r--src/H5Tvlen.c26
-rw-r--r--src/H5Znbit.c123
-rw-r--r--src/H5Zscaleoffset.c2
-rw-r--r--src/H5Ztrans.c201
-rw-r--r--src/H5config.h.in3
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in3
23 files changed, 533 insertions, 309 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index af5123c..8584d0a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -192,6 +192,8 @@ typedef struct H5D_chunk_coll_info_t {
/* Chunked layout operation callbacks */
static herr_t H5D__chunk_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
+ hid_t dapl_id);
static herr_t H5D__chunk_io_init(const H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
const H5S_t *mem_space, H5D_chunk_map_t *fm);
@@ -585,7 +587,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
{
H5D_chk_idx_info_t idx_info; /* Chunked index info */
@@ -593,7 +595,7 @@ H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
H5P_genplist_t *dapl; /* Data access property list object pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
@@ -2118,10 +2120,6 @@ H5D__chunk_flush(H5D_t *dset, hid_t dxpl_id)
/* Sanity check */
HDassert(dset);
- /* Flush any data caught in sieve buffer */
- if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
-
/* Fill the DXPL cache values for later use */
if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 29ab1ff..fb3ac85 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -96,6 +96,8 @@ typedef struct H5D_contig_writevv_ud_t {
/* Layout operation callbacks */
static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
+static herr_t H5D__contig_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
+ hid_t dapl_id);
static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t *cm);
@@ -119,7 +121,7 @@ static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
/* Contiguous storage layout I/O ops */
const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
H5D__contig_construct,
- NULL,
+ H5D__contig_init,
H5D__contig_is_space_alloc,
H5D__contig_io_init,
H5D__contig_read,
@@ -451,6 +453,78 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D__contig_init
+ *
+ * Purpose: Initialize the contiguous info for a dataset. This is
+ * called when the dataset is initialized.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Friday, August 28, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D__contig_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id)
+{
+ hsize_t tmp_size; /* Temporary holder for raw data size */
+ size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(dset);
+
+ /* Compute the size of the contiguous storage for versions of the
+ * layout message less than version 3 because versions 1 & 2 would
+ * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
+ */
+ if(dset->shared->layout.version < 3) {
+ hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
+ hsize_t nelmts; /* Number of elements in dataspace */
+ size_t dt_size; /* Size of datatype */
+
+ /* Retrieve the number of elements in the dataspace */
+ if((snelmts = H5S_GET_EXTENT_NPOINTS(dset->shared->space)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
+ nelmts = (hsize_t)snelmts;
+
+ /* Get the datatype's size */
+ if(0 == (dt_size = H5T_GET_SIZE(dset->shared->type)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
+
+ /* Compute the size of the dataset's contiguous storage */
+ tmp_size = nelmts * dt_size;
+
+ /* Check for overflow during multiplication */
+ if(nelmts != (tmp_size / dt_size))
+ HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
+
+ /* Assign the dataset's contiguous storage size */
+ dset->shared->layout.storage.u.contig.size = tmp_size;
+ } /* end if */
+ else
+ tmp_size = dset->shared->layout.storage.u.contig.size;
+
+ /* Get the sieve buffer size for the file */
+ tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dset->oloc.file);
+
+ /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
+ * from the file access property. (SLU - 2012/3/30) */
+ if(tmp_size < tmp_sieve_buf_size)
+ dset->shared->cache.contig.sieve_buf_size = tmp_size;
+ else
+ dset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__contig_init() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__contig_is_space_alloc
*
* Purpose: Query if space is allocated for layout
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 97f4fc5..6de8da9 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1048,12 +1048,14 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
layout = &new_dset->shared->layout;
if(H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, layout) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve layout")
- if(pline->nused > 0 && H5D_CHUNKED != layout->type)
- HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
fill = &new_dset->shared->dcpl_cache.fill;
if(H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, fill) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't retrieve fill value info")
+ /* Check that chunked layout is used if filters are enabled */
+ if(pline->nused > 0 && H5D_CHUNKED != layout->type)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "filters can only be used with chunked layout")
+
/* Check if the alloc_time is the default and error out */
if(fill->alloc_time == H5D_ALLOC_TIME_DEFAULT)
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, NULL, "invalid space allocation state")
@@ -1491,7 +1493,7 @@ done:
herr_t
H5D_close(H5D_t *dataset)
{
- unsigned free_failed = FALSE;
+ hbool_t free_failed = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1511,16 +1513,18 @@ H5D_close(H5D_t *dataset)
if(H5D__flush_real(dataset, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
- /* Free the data sieve buffer, if it's been allocated */
- if(dataset->shared->cache.contig.sieve_buf) {
- HDassert(dataset->shared->layout.type != H5D_COMPACT); /* We should never have a sieve buffer for compact storage */
-
- dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
- } /* end if */
+ /* Set a flag to indicate the dataset is closing, before we start freeing things */
+ /* (Avoids problems with flushing datasets twice, when one is holding
+ * the file open and it iterates through dataset to flush them -QAK)
+ */
+ dataset->shared->closing = TRUE;
/* Free cached information for each kind of dataset */
switch(dataset->shared->layout.type) {
case H5D_CONTIGUOUS:
+ /* Free the data sieve buffer, if it's been allocated */
+ if(dataset->shared->cache.contig.sieve_buf)
+ dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf);
break;
case H5D_CHUNKED:
@@ -1591,6 +1595,14 @@ H5D_close(H5D_t *dataset)
#endif /* NDEBUG */
} /* end switch */ /*lint !e788 All appropriate cases are covered */
+ /*
+ * Release datatype, dataspace and creation property list -- there isn't
+ * much we can do if one of these fails, so we just continue.
+ */
+ free_failed = (H5I_dec_ref(dataset->shared->type_id) < 0) ||
+ (H5S_close(dataset->shared->space) < 0) ||
+ (H5I_dec_ref(dataset->shared->dcpl_id) < 0);
+
/* Remove the dataset from the list of opened objects in the file */
if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
@@ -1603,13 +1615,6 @@ H5D_close(H5D_t *dataset)
HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release object header")
/*
- * Release datatype, dataspace and creation property list -- there isn't
- * much we can do if one of these fails, so we just continue.
- */
- free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 ||
- H5I_dec_ref(dataset->shared->dcpl_id) < 0);
-
- /*
* Free memory. Before freeing the memory set the file pointer to NULL.
* We always check for a null file pointer in other H5D functions to be
* sure we're not accessing an already freed dataset (see the HDassert()
@@ -2535,44 +2540,48 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
/* Check args */
HDassert(dataset);
+ HDassert(dataset->shared);
+
+ /* Avoid flushing the dataset (again) if it's closing */
+ if(!dataset->shared->closing) {
+ /* Check for metadata changes that will require updating the object's modification time */
+ if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
+ unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
+
+ /* Pin the object header */
+ if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
+
+ /* Update the layout on disk, if it's been changed */
+ if(dataset->shared->layout_dirty) {
+ if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
+ dataset->shared->layout_dirty = FALSE;
+
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
- /* Check for metadata changes that will require updating the object's modification time */
- if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
- unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
-
- /* Pin the object header */
- if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
-
- /* Update the layout on disk, if it's been changed */
- if(dataset->shared->layout_dirty) {
- if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
- dataset->shared->layout_dirty = FALSE;
-
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
- } /* end if */
+ /* Update the dataspace on disk, if it's been changed */
+ if(dataset->shared->space_dirty) {
+ if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
+ dataset->shared->space_dirty = FALSE;
- /* Update the dataspace on disk, if it's been changed */
- if(dataset->shared->space_dirty) {
- if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
- dataset->shared->space_dirty = FALSE;
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
+ /* _Somebody_ should have update the modification time! */
+ HDassert(update_flags == 0);
} /* end if */
- /* _Somebody_ should have update the modification time! */
- HDassert(update_flags == 0);
+ /* Flush cached raw data for each kind of dataset layout */
+ if(dataset->shared->layout.ops->flush &&
+ (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
} /* end if */
- /* Flush cached raw data for each kind of dataset layout */
- if(dataset->shared->layout.ops->flush &&
- (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
-
done:
/* Release pointer to object header */
if(oh != NULL)
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 85882fe..15ea92a 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -391,56 +391,9 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
if(H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims++;
- if(H5D_CONTIGUOUS == dataset->shared->layout.type) {
- hsize_t tmp_size; /* Temporary holder for raw data size */
- size_t tmp_sieve_buf_size; /* Temporary holder for sieve buffer size */
-
- /* Compute the size of the contiguous storage for versions of the
- * layout message less than version 3 because versions 1 & 2 would
- * truncate the dimension sizes to 32-bits of information. - QAK 5/26/04
- */
- if(dataset->shared->layout.version < 3) {
- hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
- hsize_t nelmts; /* Number of elements in dataspace */
- size_t dt_size; /* Size of datatype */
-
- /* Retrieve the number of elements in the dataspace */
- if((snelmts = H5S_GET_EXTENT_NPOINTS(dataset->shared->space)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve number of elements in dataspace")
- nelmts = (hsize_t)snelmts;
-
- /* Get the datatype's size */
- if(0 == (dt_size = H5T_GET_SIZE(dataset->shared->type)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to retrieve size of datatype")
-
- /* Compute the size of the dataset's contiguous storage */
- tmp_size = nelmts * dt_size;
-
- /* Check for overflow during multiplication */
- if(nelmts != (tmp_size / dt_size))
- HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed")
-
- /* Assign the dataset's contiguous storage size */
- dataset->shared->layout.storage.u.contig.size = tmp_size;
- } /* end if */
- else
- tmp_size = dataset->shared->layout.storage.u.contig.size;
-
- /* Get the sieve buffer size for the file */
- tmp_sieve_buf_size = H5F_SIEVE_BUF_SIZE(dataset->oloc.file);
-
- /* Adjust the sieve buffer size to the smaller one between the dataset size and the buffer size
- * from the file access property. (SLU - 2012/3/30) */
- if(tmp_size < tmp_sieve_buf_size)
- dataset->shared->cache.contig.sieve_buf_size = tmp_size;
- else
- dataset->shared->cache.contig.sieve_buf_size = tmp_sieve_buf_size;
- } /* end if */
-
- /* Initialize the layout information for the new dataset */
+ /* Initialize the layout information for the dataset */
if(dataset->shared->layout.ops->init && (dataset->shared->layout.ops->init)(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize layout information")
-
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_read() */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 44e119c..7f591b4 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -408,6 +408,7 @@ typedef struct H5D_rdcdc_t {
*/
typedef struct H5D_shared_t {
size_t fo_count; /* Reference count */
+ hbool_t closing; /* Flag to indicate dataset is closing */
hid_t type_id; /* ID for dataset's datatype */
H5T_t *type; /* Datatype for this dataset */
H5S_t *space; /* Dataspace of this dataset */
@@ -616,8 +617,6 @@ H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
hbool_t write_op);
H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/, hid_t dxpl_id);
H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
-H5_DLL herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
- hid_t dapl_id);
H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id,
const hsize_t *scaled, H5D_chunk_ud_t *udata);
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 65b75a3..686e1fc 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -43,17 +43,7 @@
#include <windows.h>
#include <io.h>
-/* This is not defined in the Windows header files */
-#ifndef F_OK
-#define F_OK 00
-#endif
-
-#endif
-
-#ifdef MAX
-#undef MAX
-#endif /* MAX */
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
+#endif /* H5_HAVE_WIN32_API */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_STDIO_g = 0;
@@ -331,7 +321,7 @@ H5Pset_fapl_stdio(hid_t fapl_id)
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
+H5FD_stdio_open( const char *name, unsigned flags, hid_t /*UNUSED*/ fapl_id,
haddr_t maxaddr)
{
FILE *f = NULL;
@@ -556,7 +546,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
+H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags)
{
/* Quiet the compiler */
_f=_f;
@@ -593,7 +583,7 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_ATTR_UNUSED*/ dxpl_id, hsize_t size)
+H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id, hsize_t size)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
haddr_t addr;
@@ -638,7 +628,7 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, hid_t /*H5_A
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
+H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type)
{
const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
@@ -669,7 +659,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t addr)
+H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, haddr_t addr)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
@@ -704,10 +694,13 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type, haddr_t ad
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
+H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type)
{
const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
+ /* Quiet the compiler */
+ type = type;
+
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -728,7 +721,7 @@ H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*H5_ATTR_UNUSED*/ type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD_stdio_get_handle(H5FD_t *_file, hid_t /*UNUSED*/ fapl, void **file_handle)
{
H5FD_stdio_t *file = (H5FD_stdio_t *)_file;
static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */
@@ -766,8 +759,8 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *buf/*out*/)
+H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id,
+ haddr_t addr, size_t size, void /*OUT*/ *buf)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */
@@ -871,8 +864,8 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl_id,
+ haddr_t addr, size_t size, const void *buf)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */
@@ -961,7 +954,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
+H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, unsigned closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */
@@ -1006,7 +999,8 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id,
+ hbool_t /*UNUSED*/ closing)
{
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index e83330d..ce3f2ea 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -914,20 +914,20 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id)
/* Check for driver info to store */
if(driver_size > 0) {
- H5O_drvinfo_t drvinfo; /* Driver info */
+ H5O_drvinfo_t info; /* Driver info */
uint8_t dbuf[H5F_MAX_DRVINFOBLOCK_SIZE]; /* Driver info block encoding buffer */
/* Sanity check */
HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
- if(H5FD_sb_encode(f->shared->lf, drvinfo.name, dbuf) < 0)
+ if(H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
/* Write driver info information to the superblock extension */
- drvinfo.len = driver_size;
- drvinfo.buf = dbuf;
- if(H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &drvinfo, dxpl_id) < 0)
+ info.len = driver_size;
+ info.buf = dbuf;
+ if(H5O_msg_create(&ext_loc, H5O_DRVINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &info, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
} /* end if */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 203d0fc..3c64131 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -636,13 +636,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
+#ifdef H5_HAVE_PARALLEL
+H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#else
+H5O__cache_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#endif /* H5_HAVE_PARALLEL */
{
H5O_t *oh = (H5O_t *)_thing; /* Object header to reset */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
+#ifdef H5_HAVE_PARALLEL
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif /* H5_HAVE_PARALLEL */
/* Check arguments */
HDassert(oh);
@@ -673,7 +681,9 @@ H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
oh->ndecode_dirtied = 0;
#endif /* NDEBUG */
+#ifdef H5_HAVE_PARALLEL
done:
+#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_clear() */
@@ -942,14 +952,22 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
+#ifdef H5_HAVE_PARALLEL
H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
+#else
+H5O__cache_chk_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy)
+#endif /* H5_HAVE_PARALLEL */
{
H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to reset */
H5O_t *oh; /* Object header for chunk */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
+#ifdef H5_HAVE_PARALLEL
FUNC_ENTER_STATIC
+#else
+ FUNC_ENTER_STATIC_NOERR
+#endif /* H5_HAVE_PARALLEL */
/* Check arguments */
HDassert(chk_proxy);
@@ -971,7 +989,9 @@ H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy)
if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno)
chk_proxy->oh->mesg[u].dirty = FALSE;
+#ifdef H5_HAVE_PARALLEL
done:
+#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__cache_chk_clear() */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 6018539..dae43f3 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -632,24 +632,40 @@ H5O_layout_copy(const void *_mesg, void *_dest)
/* copy */
*dest = *mesg;
- /* Deep copy the buffer for compact datasets also */
- if(mesg->type == H5D_COMPACT && mesg->storage.u.compact.size > 0) {
- /* Allocate memory for the raw data */
- if(NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
- HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
-
- /* Copy over the raw data */
- HDmemcpy(dest->storage.u.compact.buf, mesg->storage.u.compact.buf, dest->storage.u.compact.size);
- } /* end if */
+ /* Special actions for each type of layout */
+ switch(mesg->type) {
+ case H5D_COMPACT:
+ /* Deep copy the buffer for compact datasets also */
+ if(mesg->storage.u.compact.size > 0) {
+ /* Allocate memory for the raw data */
+ if(NULL == (dest->storage.u.compact.buf = H5MM_malloc(dest->storage.u.compact.size)))
+ HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
+
+ /* Copy over the raw data */
+ HDmemcpy(dest->storage.u.compact.buf, mesg->storage.u.compact.buf, dest->storage.u.compact.size);
+ } /* end if */
+ break;
+
+ case H5D_CONTIGUOUS:
+ /* Nothing required */
+ break;
- /* Reset the pointer of the chunked storage index but not the address */
- if(dest->type == H5D_CHUNKED && dest->storage.u.chunk.ops)
- H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ case H5D_CHUNKED:
+ /* Reset the pointer of the chunked storage index but not the address */
+ if(dest->storage.u.chunk.ops)
+ H5D_chunk_idx_reset(&dest->storage.u.chunk, FALSE);
+ break;
+
+ case H5D_VIRTUAL:
+ if(H5D__virtual_copy_layout(dest) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout")
+ break;
- /* Deep copy the entry list for virtual datasets */
- if(mesg->type == H5D_VIRTUAL)
- if(H5D__virtual_copy_layout(dest) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy virtual layout")
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
+ default:
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, NULL, "Invalid layout class")
+ } /* end switch */
/* Set return value */
ret_value = dest;
diff --git a/src/H5PL.c b/src/H5PL.c
index f4cd3e7..bfe79aa 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -329,6 +329,8 @@ H5PL_load(H5PL_type_t type, int id)
if((H5PL_plugin_g & H5PL_FILTER_PLUGIN) == 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin filter '%d' is not available", id)
break;
+ case H5PL_TYPE_ERROR:
+ case H5PL_TYPE_NONE:
default:
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, NULL, "required dynamically loaded plugin '%d' is not valid", id)
}
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index b2401d4..daa7886 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -79,8 +79,8 @@ H5Tget_sign(hid_t type_id)
H5TRACE1("Ts", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
ret_value = H5T_get_sign(dt);
@@ -158,18 +158,18 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
H5TRACE2("e", "iTs", type_id, sign);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (sign < H5T_SGN_NONE || sign >= H5T_NSGN)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_INTEGER!=dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
/* Commit */
dt->shared->u.atomic.u.i.sign = sign;
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index e93bf65..f37d14b 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -77,18 +77,18 @@ H5Tset_tag(hid_t type_id, const char *tag)
H5TRACE2("e", "i*s", type_id, tag);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE!=dt->shared->type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type")
if (!tag)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag")
if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long")
/* Commit */
H5MM_xfree(dt->shared->u.opaque.tag);
@@ -124,16 +124,16 @@ H5Tget_tag(hid_t type_id)
H5TRACE1("*s", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_OPAQUE != dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class")
/* result */
if (NULL==(ret_value=H5MM_strdup(dt->shared->u.opaque.tag)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index 88a5e13..38de494 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -80,12 +80,12 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/)
H5TRACE3("e", "ixx", type_id, lsb, msb);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Get values */
if (lsb)
@@ -124,18 +124,18 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
H5TRACE3("e", "iTpTp", type_id, lsb, msb);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
if (lsb < H5T_PAD_ZERO || lsb >= H5T_NPAD || msb < H5T_PAD_ZERO || msb >= H5T_NPAD)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_ATOMIC(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type")
/* Commit */
dt->shared->u.atomic.lsb_pad = lsb;
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index b3975af..73a4e32 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -87,12 +87,12 @@ H5Tget_precision(hid_t type_id)
H5TRACE1("z", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
/* Get precision */
if((ret_value = H5T_get_precision(dt)) == 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "cant't get precision for specified datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, 0, "cant't get precision for specified datatype")
done:
FUNC_LEAVE_API(ret_value)
@@ -176,22 +176,22 @@ H5Tset_precision(hid_t type_id, size_t prec)
H5TRACE2("e", "iz", type_id, prec);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "datatype is read-only")
if (prec == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "precision must be positive")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after members are defined")
if (H5T_STRING==dt->shared->type)
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "precision for this type is read-only")
if (H5T_COMPOUND==dt->shared->type || H5T_OPAQUE==dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
/* Do the work */
if (H5T_set_precision(dt, prec)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
done:
FUNC_LEAVE_API(ret_value)
@@ -283,9 +283,19 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
dt->shared->u.atomic.u.f.mpos + dt->shared->u.atomic.u.f.msize > prec+offset)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "adjust sign, mantissa, and exponent fields first")
break;
+
+ case H5T_NO_CLASS:
+ case H5T_STRING:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ case H5T_NCLASSES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
- } /* end switch */ /*lint !e788 All appropriate cases are covered */
+ } /* end switch */
/* Commit */
dt->shared->size = size;
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index e8ac4f5..c71827b 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -83,12 +83,12 @@ H5Tget_strpad(hid_t type_id)
H5TRACE1("Tz", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_STR_ERROR, "not a datatype")
while (dt->shared->parent && !H5T_IS_STRING(dt->shared))
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_STR_ERROR, "operation not defined for datatype class")
/* result */
if(H5T_IS_FIXED_STRING(dt->shared))
@@ -140,16 +140,16 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad)
H5TRACE2("e", "iTz", type_id, strpad);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (strpad < H5T_STR_NULLTERM || strpad >= H5T_NSTR)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type")
while (dt->shared->parent && !H5T_IS_STRING(dt->shared))
dt = dt->shared->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt->shared))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
/* Commit */
if(H5T_IS_FIXED_STRING(dt->shared))
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index 68cabda..4ede3f3 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -136,6 +136,19 @@ H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype")
break;
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ /* Not real values */
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "operation not defined for datatype class")
+ break;
+
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
default:
/* Visit "simple" datatypes here */
if(visit_flags & H5T_VISIT_SIMPLE)
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 4ee3d0d..64337b8 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -113,7 +113,7 @@ H5Tvlen_create(hid_t base_id)
H5TRACE1("i", "i", base_id);
/* Check args */
- if(NULL == (base = H5I_object_verify(base_id, H5I_DATATYPE)))
+ if(NULL == (base = (H5T_t *)H5I_object_verify(base_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
/* Create up VL datatype */
@@ -288,6 +288,8 @@ H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
*/
break;
+ case H5T_LOC_MAXLOC:
+ /* MAXLOC is invalid */
default:
HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype location")
} /* end switch */ /*lint !e788 All appropriate cases are covered */
@@ -716,11 +718,11 @@ H5T_vlen_str_mem_write(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, co
/* Use the user's memory allocation routine if one is defined */
if(vl_alloc_info->alloc_func!=NULL) {
- if(NULL==(t=(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info)))
+ if(NULL==(t = (char *)(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end if */
else { /* Default to system malloc */
- if(NULL==(t=H5MM_malloc((seq_len+1)*base_size)))
+ if(NULL==(t = (char *)H5MM_malloc((seq_len+1)*base_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end else */
@@ -1119,8 +1121,24 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
} /* end else */
break;
+ /* Don't do anything for simple types */
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ break;
+
+ /* Should never have these values */
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
default:
+ HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "invalid VL datatype class")
break;
+
} /* end switch */ /*lint !e788 All appropriate cases are covered */
done:
@@ -1167,7 +1185,7 @@ H5T_vlen_reclaim(void *elem, hid_t type_id, unsigned H5_ATTR_UNUSED ndim, const
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
/* Check args */
- if(NULL == (dt = H5I_object_verify(type_id, H5I_DATATYPE)))
+ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Pull the free function and free info pointer out of the op_data and call the recurse datatype free function */
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 38610b6..479cd6c 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -266,9 +266,23 @@ H5Z_calc_parms_array(const H5T_t *type)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* Other datatype class: nbit does no compression */
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* Other datatype classes: nbit does no compression */
H5Z_calc_parms_nooptype();
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
done:
@@ -351,9 +365,23 @@ H5Z_calc_parms_compound(const H5T_t *type)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* Other datatype class: nbit does no compression */
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* Other datatype classes: nbit does no compression */
H5Z_calc_parms_nooptype();
break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Close member datatype */
@@ -444,7 +472,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[])
/* Get datatype's size */
if((dtype_size = H5T_get_size(type)) == 0)
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size")
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size")
/* Set "local" parameter for datatype size */
cd_values[cd_values_index++] = dtype_size;
@@ -463,6 +491,10 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[])
cd_values[cd_values_index++] = H5Z_NBIT_ORDER_BE;
break;
+ case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
+ case H5T_ORDER_ERROR:
+ case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order")
} /* end switch */
@@ -561,7 +593,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned cd_values[])
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* other datatype that nbit does no compression */
+ case H5T_VLEN:
/* Check if base datatype is a variable-length string */
if((is_vlstring = H5T_is_variable_str(dtype_base)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot determine if datatype is a variable-length string")
@@ -573,6 +605,23 @@ H5Z_set_parms_array(const H5T_t *type, unsigned cd_values[])
if(H5Z_set_parms_nooptype(dtype_base, cd_values) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
+
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ if(H5Z_set_parms_nooptype(dtype_base, cd_values) == FAIL)
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
done:
@@ -666,16 +715,16 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned cd_values[])
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* other datatype that nbit does no compression */
+ case H5T_VLEN:
/* Check if datatype is a variable-length string */
if((is_vlstring = H5T_is_variable_str(dtype_member)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot determine if datatype is a variable-length string")
/* Because for some no-op datatype (VL datatype and VL string datatype), its
- * size can not be retrieved correctly by using function call H5T_get_size,
- * special handling is needed for getting the size. Here the difference between
+ * size can not be retrieved correctly by using function call H5T_get_size,
+ * special handling is needed for getting the size. Here the difference between
* adjacent member offset is used (if alignment is present, the result can be
- * larger, but it does not affect the nbit filter's correctness).
+ * larger, but it does not affect the nbit filter's correctness).
*/
if(dtype_member_class == H5T_VLEN || is_vlstring) {
/* Set datatype class code */
@@ -688,9 +737,25 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned cd_values[])
/* Set "local" parameter for datatype size */
cd_values[cd_values_index++] = dtype_next_member_offset - dtype_member_offset;
- } else
- if(H5Z_set_parms_nooptype(dtype_member, cd_values)==FAIL)
- HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ }
+ break;
+
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ /* other datatype that nbit does no compression */
+ if(H5Z_set_parms_nooptype(dtype_member, cd_values) == FAIL)
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit was passed bad datatype")
break;
} /* end switch */
@@ -770,8 +835,22 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
- default: /* no need to calculate other datatypes at top level */
- break;
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* No need to calculate other datatypes at top level */
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Check if the number of parameters exceed what cd_values[] can store */
@@ -826,8 +905,22 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
- default: /* no need to set parameters for other datatypes at top level */
- break;
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ /* No need to set parameters for other datatypes at top level */
+ break;
+
+ case H5T_NO_CLASS:
+ case H5T_NCLASSES:
+ default:
+ /* Badness */
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit received bad datatype")
+ break;
} /* end switch */
/* Check if calculation of parameters matches with setting of parameters */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 673b9e0..46dd3c1 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -977,6 +977,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
case H5T_ORDER_ERROR:
case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype endianness order")
@@ -1075,6 +1076,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
case H5T_ORDER_ERROR:
case H5T_ORDER_VAX:
+ case H5T_ORDER_MIXED:
case H5T_ORDER_NONE:
default:
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "bad H5T_NATIVE_INT endianness order")
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 7a94487..db61cc5 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -731,11 +731,20 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_END:
HGOTO_DONE(term)
- default:
+ case H5Z_XFORM_INTEGER:
+ case H5Z_XFORM_FLOAT:
+ case H5Z_XFORM_SYMBOL:
+ case H5Z_XFORM_PLUS:
+ case H5Z_XFORM_MINUS:
+ case H5Z_XFORM_LPAREN:
H5Z_unget_token(current);
HGOTO_DONE(term)
- }
- }
+
+ case H5Z_XFORM_ERROR:
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad transform type passed to data transform expression")
+ } /* end switch */
+ } /* end for */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -773,112 +782,115 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
current = H5Z_get_token(current);
switch (current->tok_type) {
- case H5Z_XFORM_INTEGER:
- factor = H5Z_new_node(H5Z_XFORM_INTEGER);
-
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- sscanf(current->tok_begin, "%ld", &factor->value.int_val);
- break;
+ case H5Z_XFORM_INTEGER:
+ factor = H5Z_new_node(H5Z_XFORM_INTEGER);
- case H5Z_XFORM_FLOAT:
- factor = H5Z_new_node(H5Z_XFORM_FLOAT);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ sscanf(current->tok_begin, "%ld", &factor->value.int_val);
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- sscanf(current->tok_begin, "%lf", &factor->value.float_val);
- break;
+ case H5Z_XFORM_FLOAT:
+ factor = H5Z_new_node(H5Z_XFORM_FLOAT);
- case H5Z_XFORM_SYMBOL:
- factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ sscanf(current->tok_begin, "%lf", &factor->value.float_val);
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ case H5Z_XFORM_SYMBOL:
+ factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
- factor->value.dat_val = &(dat_val_pointers->ptr_dat_val[dat_val_pointers->num_ptrs]);
- dat_val_pointers->num_ptrs++;
- break;
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- case H5Z_XFORM_LPAREN:
- factor = H5Z_parse_expression(current, dat_val_pointers);
+ factor->value.dat_val = &(dat_val_pointers->ptr_dat_val[dat_val_pointers->num_ptrs]);
+ dat_val_pointers->num_ptrs++;
+ break;
- if (!factor)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
+ case H5Z_XFORM_LPAREN:
+ factor = H5Z_parse_expression(current, dat_val_pointers);
- current = H5Z_get_token(current);
+ if (!factor)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- if (current->tok_type != H5Z_XFORM_RPAREN) {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
- }
- break;
+ current = H5Z_get_token(current);
- case H5Z_XFORM_RPAREN:
- /* We shouldn't see a ) right now */
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
+ if (current->tok_type != H5Z_XFORM_RPAREN) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
+ }
+ break;
- case H5Z_XFORM_PLUS:
- /* unary + */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ case H5Z_XFORM_RPAREN:
+ /* We shouldn't see a ) right now */
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
+
+ case H5Z_XFORM_PLUS:
+ /* unary + */
+ new_node = H5Z_parse_factor(current, dat_val_pointers);
+
+ if (new_node) {
+ if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
+ new_node->type != H5Z_XFORM_SYMBOL) {
+ H5Z_xform_destroy_parse_tree(new_node);
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (new_node) {
- if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
- new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
+ factor = new_node;
+ new_node = H5Z_new_node(H5Z_XFORM_PLUS);
- factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ if (!new_node) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (!new_node) {
+ new_node->rchild = factor;
+ factor = new_node;
+ } else {
H5Z_xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
+ break;
- new_node->rchild = factor;
- factor = new_node;
- } else {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
- break;
+ case H5Z_XFORM_MINUS:
+ /* unary - */
+ new_node = H5Z_parse_factor(current, dat_val_pointers);
- case H5Z_XFORM_MINUS:
- /* unary - */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ if (new_node) {
+ if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
+ new_node->type != H5Z_XFORM_SYMBOL) {
+ H5Z_xform_destroy_parse_tree(new_node);
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (new_node) {
- if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
- new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
+ factor = new_node;
+ new_node = H5Z_new_node(H5Z_XFORM_MINUS);
- factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ if (!new_node) {
+ H5Z_xform_destroy_parse_tree(factor);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
+ }
- if (!new_node) {
+ new_node->rchild = factor;
+ factor = new_node;
+ } else {
H5Z_xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
+ break;
- new_node->rchild = factor;
- factor = new_node;
- } else {
- H5Z_xform_destroy_parse_tree(factor);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
- }
- break;
-
- case H5Z_XFORM_END:
- break;
+ case H5Z_XFORM_END:
+ break;
- default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Invalid token while parsing data transform expression")
+ case H5Z_XFORM_MULT:
+ case H5Z_XFORM_DIVIDE:
+ case H5Z_XFORM_ERROR:
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Invalid token while parsing data transform expression")
}
@@ -1091,23 +1103,30 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
switch (tree->type) {
case H5Z_XFORM_PLUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, +, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, +, array_size)
+ break;
case H5Z_XFORM_MINUS:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, -, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, -, array_size)
+ break;
case H5Z_XFORM_MULT:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, *, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, *, array_size)
+ break;
case H5Z_XFORM_DIVIDE:
- H5Z_XFORM_TYPE_OP(resl, resr, array_type, /, array_size)
- break;
+ H5Z_XFORM_TYPE_OP(resl, resr, array_type, /, array_size)
+ break;
+ case H5Z_XFORM_ERROR:
+ case H5Z_XFORM_INTEGER:
+ case H5Z_XFORM_FLOAT:
+ case H5Z_XFORM_SYMBOL:
+ case H5Z_XFORM_LPAREN:
+ case H5Z_XFORM_RPAREN:
+ case H5Z_XFORM_END:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid expression tree")
} /* end switch */
/* The result stores a pointer to the new data */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index ad8dcf9..252ec04 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -48,6 +48,9 @@
/* Determine the size of C long double */
#undef FORTRAN_SIZEOF_LONG_DOUBLE
+/* Define Fortran compiler ID */
+#undef Fortran_COMPILER_ID
+
/* Define valid Fortran INTEGER KINDs */
#undef H5CONFIG_F_IKIND
diff --git a/src/H5public.h b/src/H5public.h
index 603c187..5a2cb5c 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -94,10 +94,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 229 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 230 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.229" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.230" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index 08662f7..6cef273 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -522,6 +522,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
GREP = @GREP@
H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
@@ -741,7 +742,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 219
+LT_VERS_REVISION = 220
LT_VERS_AGE = 0
# Our main target, the HDF5 library