summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5B2.c7
-rw-r--r--src/H5B2test.c2
-rw-r--r--src/H5Dmpio.c4
-rw-r--r--src/H5FD.c4
-rw-r--r--src/H5FDcore.c12
-rw-r--r--src/H5FDfamily.c12
-rw-r--r--src/H5FDfphdf5.c16
-rw-r--r--src/H5FDfphdf5.h2
-rw-r--r--src/H5FDlog.c12
-rw-r--r--src/H5FDmpio.c12
-rw-r--r--src/H5FDmpiposix.c12
-rw-r--r--src/H5FDmulti.c31
-rw-r--r--src/H5FDprivate.h4
-rw-r--r--src/H5FDpublic.h4
-rw-r--r--src/H5FDsec2.c12
-rw-r--r--src/H5FDstdio.c12
-rw-r--r--src/H5FDstream.c12
-rw-r--r--src/H5FPclient.c2
-rw-r--r--src/H5FPprivate.h2
-rw-r--r--src/H5Pdcpl.c1
-rw-r--r--src/H5S.c6
-rw-r--r--src/H5SL.c2
-rw-r--r--src/H5Zshuffle.c5
23 files changed, 94 insertions, 94 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index 34eb96b..0692b90 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -320,7 +320,8 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
bt2->cache_info.is_dirty = TRUE;
bt2->depth = 0;
bt2->root.addr = HADDR_UNDEF;
- bt2->root.node_nrec = bt2->root.all_nrec = 0;
+ bt2->root.node_nrec = 0;
+ bt2->root.all_nrec = 0;
/* Initialize shared B-tree info */
if(H5B2_shared_init(f, bt2, type, node_size, rrec_size, split_percent, merge_percent)<0)
@@ -532,8 +533,8 @@ H5B2_split_root(H5F_t *f, hid_t dxpl_id, H5B2_t *bt2, H5RC_t *bt2_shared)
/* Determine total number of records in new child nodes */
if(bt2->depth>0) {
unsigned u; /* Local index variable */
- unsigned new_left_all_nrec; /* New total number of records in left child */
- unsigned new_right_all_nrec; /* New total number of records in right child */
+ hsize_t new_left_all_nrec; /* New total number of records in left child */
+ hsize_t new_right_all_nrec; /* New total number of records in right child */
/* Compute total of all records in each child node */
new_left_all_nrec = new_root->node_ptrs[0].node_nrec;
diff --git a/src/H5B2test.c b/src/H5B2test.c
index fa847af..cac5e30 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -125,7 +125,7 @@ H5B2_test_compare(const void *rec1, const void *rec2)
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_test_compare)
- FUNC_LEAVE_NOAPI(*(const hssize_t *)rec1-*(const hssize_t *)rec2);
+ FUNC_LEAVE_NOAPI((herr_t)(*(const hssize_t *)rec1-*(const hssize_t *)rec2));
} /* H5B2_test_compare() */
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index ec2da95..e216d85 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -578,7 +578,7 @@ H5D_mpio_spaces_write(H5D_io_info_t *io_info,
* Function: H5D_mpio_spaces_span_read
*
* Purpose: MPI-IO function to read directly from app buffer to file for
- span-tree
+ span-tree
*
* Return: non-negative on success, negative on failure.
*
@@ -641,9 +641,7 @@ H5D_mpio_spaces_span_write(H5D_io_info_t *io_info,
FUNC_ENTER_NOAPI_NOFUNC(H5D_mpio_spaces_span_write);
- fflush(stdout);
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
-
ret_value = H5D_mpio_spaces_span_xfer(io_info, elmt_size, file_space,
mem_space, (void*)buf, 1/*write*/);
diff --git a/src/H5FD.c b/src/H5FD.c
index d2f95d6..1abe23a 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -2883,7 +2883,7 @@ done:
*-------------------------------------------------------------------------
*/
haddr_t
-H5FD_get_eoa(H5FD_t *file)
+H5FD_get_eoa(const H5FD_t *file)
{
haddr_t ret_value;
@@ -3048,7 +3048,7 @@ done:
*-------------------------------------------------------------------------
*/
haddr_t
-H5FD_get_eof(H5FD_t *file)
+H5FD_get_eof(const H5FD_t *file)
{
haddr_t ret_value;
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 11d5cd3..b72887c 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -89,9 +89,9 @@ static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_core_close(H5FD_t *_file);
static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static haddr_t H5FD_core_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_core_get_eoa(const H5FD_t *_file);
static herr_t H5FD_core_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_core_get_eof(H5FD_t *_file);
+static haddr_t H5FD_core_get_eof(const H5FD_t *_file);
static herr_t H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
@@ -531,11 +531,11 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_core_get_eoa(H5FD_t *_file)
+H5FD_core_get_eoa(const H5FD_t *_file)
{
haddr_t ret_value; /* Return value */
- H5FD_core_t *file = (H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t*)_file;
FUNC_ENTER_NOAPI(H5FD_core_get_eoa, HADDR_UNDEF)
@@ -604,11 +604,11 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_core_get_eof(H5FD_t *_file)
+H5FD_core_get_eof(const H5FD_t *_file)
{
haddr_t ret_value; /* Return value */
- H5FD_core_t *file = (H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t*)_file;
FUNC_ENTER_NOAPI(H5FD_core_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 9ee9d2e..83e6c75 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -89,9 +89,9 @@ static H5FD_t *H5FD_family_open(const char *name, unsigned flags,
static herr_t H5FD_family_close(H5FD_t *_file);
static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_family_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_family_get_eoa(const H5FD_t *_file);
static herr_t H5FD_family_set_eoa(H5FD_t *_file, haddr_t eoa);
-static haddr_t H5FD_family_get_eof(H5FD_t *_file);
+static haddr_t H5FD_family_get_eof(const H5FD_t *_file);
static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/);
@@ -862,9 +862,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eoa(H5FD_t *_file)
+H5FD_family_get_eoa(const H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_get_eoa, HADDR_UNDEF)
@@ -970,9 +970,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eof(H5FD_t *_file)
+H5FD_family_get_eof(const H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
haddr_t eof=0;
int i; /* Local index variable */
haddr_t ret_value; /* Return value */
diff --git a/src/H5FDfphdf5.c b/src/H5FDfphdf5.c
index c2ea3d1..de25c33 100644
--- a/src/H5FDfphdf5.c
+++ b/src/H5FDfphdf5.c
@@ -51,9 +51,9 @@ static H5FD_t *H5FD_fphdf5_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_fphdf5_close(H5FD_t *_file);
static herr_t H5FD_fphdf5_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_fphdf5_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_fphdf5_get_eoa(const H5FD_t *_file);
static herr_t H5FD_fphdf5_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_fphdf5_get_eof(H5FD_t *_file);
+static haddr_t H5FD_fphdf5_get_eof(const H5FD_t *_file);
static herr_t H5FD_fphdf5_get_handle(H5FD_t *_file, hid_t fapl,
void **file_handle);
static herr_t H5FD_fphdf5_read(H5FD_t *_file, H5FD_mem_t mem_type, hid_t dxpl_id,
@@ -359,9 +359,9 @@ done:
*-------------------------------------------------------------------------
*/
hbool_t
-H5FD_fphdf5_is_sap(H5FD_t *_file)
+H5FD_fphdf5_is_sap(const H5FD_t *_file)
{
- H5FD_fphdf5_t *file = (H5FD_fphdf5_t*)_file;
+ const H5FD_fphdf5_t *file = (const H5FD_fphdf5_t*)_file;
hbool_t ret_value = FALSE;
FUNC_ENTER_NOAPI(H5FD_fphdf5_is_sap, FALSE)
@@ -834,9 +834,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_fphdf5_get_eoa(H5FD_t *_file)
+H5FD_fphdf5_get_eoa(const H5FD_t *_file)
{
- H5FD_fphdf5_t *file = (H5FD_fphdf5_t *)_file;
+ const H5FD_fphdf5_t *file = (const H5FD_fphdf5_t *)_file;
unsigned req_id = 0;
H5FP_status_t status = H5FP_STATUS_OK;
haddr_t ret_value;
@@ -921,9 +921,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_fphdf5_get_eof(H5FD_t *_file)
+H5FD_fphdf5_get_eof(const H5FD_t *_file)
{
- H5FD_fphdf5_t *file = (H5FD_fphdf5_t*)_file;
+ const H5FD_fphdf5_t *file = (const H5FD_fphdf5_t*)_file;
haddr_t ret_value;
FUNC_ENTER_NOAPI(H5FD_fphdf5_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDfphdf5.h b/src/H5FDfphdf5.h
index 6605b92..c2bbd0b 100644
--- a/src/H5FDfphdf5.h
+++ b/src/H5FDfphdf5.h
@@ -104,7 +104,7 @@ struct H5P_genplist_t;
H5_DLL hid_t H5FD_fphdf5_init(void);
H5_DLL void H5FD_fphdf5_term(void);
H5_DLL unsigned H5FD_fphdf5_file_id(H5FD_t *_file);
-H5_DLL hbool_t H5FD_fphdf5_is_sap(H5FD_t *_file);
+H5_DLL hbool_t H5FD_fphdf5_is_sap(const H5FD_t *_file);
H5_DLL hbool_t H5FD_fphdf5_is_captain(H5FD_t *_file);
H5_DLL hbool_t H5FD_is_fphdf5_driver(H5FD_t *_file);
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 38dcf4f..75c3c20 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -181,9 +181,9 @@ static herr_t H5FD_log_close(H5FD_t *_file);
static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-static haddr_t H5FD_log_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_log_get_eoa(const H5FD_t *_file);
static herr_t H5FD_log_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_log_get_eof(H5FD_t *_file);
+static haddr_t H5FD_log_get_eof(const H5FD_t *_file);
static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
@@ -890,9 +890,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_log_get_eoa(H5FD_t *_file)
+H5FD_log_get_eoa(const H5FD_t *_file)
{
- H5FD_log_t *file = (H5FD_log_t*)_file;
+ const H5FD_log_t *file = (const H5FD_log_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_get_eoa, HADDR_UNDEF)
@@ -959,9 +959,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_log_get_eof(H5FD_t *_file)
+H5FD_log_get_eof(const H5FD_t *_file)
{
- H5FD_log_t *file = (H5FD_log_t*)_file;
+ const H5FD_log_t *file = (const H5FD_log_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index f46bf9e..920d1e2 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -72,9 +72,9 @@ static H5FD_t *H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_mpio_close(H5FD_t *_file);
static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_mpio_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_mpio_get_eoa(const H5FD_t *_file);
static herr_t H5FD_mpio_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_mpio_get_eof(H5FD_t *_file);
+static haddr_t H5FD_mpio_get_eof(const H5FD_t *_file);
static herr_t H5FD_mpio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *buf);
@@ -983,9 +983,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mpio_get_eoa(H5FD_t *_file)
+H5FD_mpio_get_eoa(const H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_get_eoa, HADDR_UNDEF)
@@ -1067,9 +1067,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mpio_get_eof(H5FD_t *_file)
+H5FD_mpio_get_eof(const H5FD_t *_file)
{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ const H5FD_mpio_t *file = (const H5FD_mpio_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index d1b766f..b6bfa80 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -180,9 +180,9 @@ static H5FD_t *H5FD_mpiposix_open(const char *name, unsigned flags, hid_t fapl_i
static herr_t H5FD_mpiposix_close(H5FD_t *_file);
static int H5FD_mpiposix_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_mpiposix_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_mpiposix_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_mpiposix_get_eoa(const H5FD_t *_file);
static herr_t H5FD_mpiposix_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_mpiposix_get_eof(H5FD_t *_file);
+static haddr_t H5FD_mpiposix_get_eof(const H5FD_t *_file);
static herr_t H5FD_mpiposix_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_mpiposix_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
@@ -952,9 +952,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mpiposix_get_eoa(H5FD_t *_file)
+H5FD_mpiposix_get_eoa(const H5FD_t *_file)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eoa, HADDR_UNDEF)
@@ -1028,9 +1028,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mpiposix_get_eof(H5FD_t *_file)
+H5FD_mpiposix_get_eof(const H5FD_t *_file)
{
- H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ const H5FD_mpiposix_t *file = (const H5FD_mpiposix_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 1830bf3..eae6488 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -137,9 +137,9 @@ static H5FD_t *H5FD_multi_open(const char *name, unsigned flags,
static herr_t H5FD_multi_close(H5FD_t *_file);
static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_multi_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_multi_get_eoa(const H5FD_t *_file);
static herr_t H5FD_multi_set_eoa(H5FD_t *_file, haddr_t eoa);
-static haddr_t H5FD_multi_get_eof(H5FD_t *_file);
+static haddr_t H5FD_multi_get_eof(const H5FD_t *_file);
static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
@@ -292,7 +292,7 @@ herr_t
H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
const char *raw_ext, hid_t raw_plist_id)
{
- H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
const char *memb_name[H5FD_MEM_NTYPES];
char meta_name[1024], raw_name[1024];
@@ -304,12 +304,12 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
H5Eclear_stack(H5E_DEFAULT);
/* Initialize */
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ ALL_MEMBERS(mt) {
memb_map[mt] = (H5FD_MEM_DRAW==mt?mt:H5FD_MEM_SUPER);
memb_fapl[mt] = -1;
memb_name[mt] = NULL;
memb_addr[mt] = HADDR_UNDEF;
- }
+ } END_MEMBERS;
/* The file access properties */
memb_fapl[H5FD_MEM_SUPER] = meta_plist_id;
@@ -1024,7 +1024,6 @@ H5FD_multi_fapl_copy(const void *_old_fa)
{
const H5FD_multi_fapl_t *old_fa = (const H5FD_multi_fapl_t*)_old_fa;
H5FD_multi_fapl_t *new_fa = malloc(sizeof(H5FD_multi_fapl_t));
- H5FD_mem_t mt;
int nerrors = 0;
static const char *func="H5FD_multi_fapl_copy"; /* Function Name for error reporting */
@@ -1078,7 +1077,6 @@ static herr_t
H5FD_multi_fapl_free(void *_fa)
{
H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
- H5FD_mem_t mt;
static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1118,7 +1116,6 @@ H5FD_multi_dxpl_copy(const void *_old_dx)
{
const H5FD_multi_dxpl_t *old_dx = (const H5FD_multi_dxpl_t*)_old_dx;
H5FD_multi_dxpl_t *new_dx = malloc(sizeof(H5FD_multi_dxpl_t));
- H5FD_mem_t mt;
int nerrors = 0;
static const char *func="H5FD_multi_dxpl_copy"; /* Function Name for error reporting */
@@ -1166,7 +1163,6 @@ static herr_t
H5FD_multi_dxpl_free(void *_dx)
{
H5FD_multi_dxpl_t *dx = (H5FD_multi_dxpl_t*)_dx;
- H5FD_mem_t mt;
static const char *func="H5FD_multi_dxpl_free"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1369,23 +1365,24 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
- H5FD_mem_t mt;
+ H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
int cmp=0;
/* Clear the error stack */
H5Eclear_stack(H5E_DEFAULT);
ALL_MEMBERS(mt) {
+ out_mt = mt;
if (f1->memb[mt] && f2->memb[mt]) break;
if (!cmp) {
if (f1->memb[mt]) cmp = -1;
else if (f2->memb[mt]) cmp = 1;
}
} END_MEMBERS;
- assert(cmp || mt<H5FD_MEM_NTYPES);
- if (mt>=H5FD_MEM_NTYPES) return cmp;
+ assert(cmp || out_mt<H5FD_MEM_NTYPES);
+ if (out_mt>=H5FD_MEM_NTYPES) return cmp;
- return H5FDcmp(f1->memb[mt], f2->memb[mt]);
+ return H5FDcmp(f1->memb[out_mt], f2->memb[out_mt]);
}
@@ -1442,9 +1439,9 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_multi_get_eoa(H5FD_t *_file)
+H5FD_multi_get_eoa(const H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
/* Clear the error stack */
H5Eclear_stack(H5E_DEFAULT);
@@ -1530,9 +1527,9 @@ H5FD_multi_set_eoa(H5FD_t *_file, haddr_t eoa)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_multi_get_eof(H5FD_t *_file)
+H5FD_multi_get_eof(const H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
haddr_t eof=0, tmp;
static const char *func="H5FD_multi_eof"; /* Function Name for error reporting */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index afca51a..6660e49 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -59,9 +59,9 @@ H5_DLL haddr_t H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t
H5_DLL herr_t H5FD_free(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
H5_DLL haddr_t H5FD_realloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t old_addr,
hsize_t old_size, hsize_t new_size);
-H5_DLL haddr_t H5FD_get_eoa(H5FD_t *file);
+H5_DLL haddr_t H5FD_get_eoa(const H5FD_t *file);
H5_DLL herr_t H5FD_set_eoa(H5FD_t *file, haddr_t addr);
-H5_DLL haddr_t H5FD_get_eof(H5FD_t *file);
+H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file);
H5_DLL herr_t H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *buf/*out*/);
H5_DLL herr_t H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index 444627f..94e215b 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -168,9 +168,9 @@ typedef struct H5FD_class_t {
haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id,
haddr_t addr, hsize_t size);
- haddr_t (*get_eoa)(H5FD_t *file);
+ haddr_t (*get_eoa)(const H5FD_t *file);
herr_t (*set_eoa)(H5FD_t *file, haddr_t addr);
- haddr_t (*get_eof)(H5FD_t *file);
+ haddr_t (*get_eof)(const H5FD_t *file);
herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle);
herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl,
haddr_t addr, size_t size, void *buffer);
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 2229853..a83761f 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -145,9 +145,9 @@ static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
static herr_t H5FD_sec2_close(H5FD_t *_file);
static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_sec2_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_sec2_get_eoa(const H5FD_t *_file);
static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_sec2_get_eof(H5FD_t *_file);
+static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file);
static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
@@ -546,9 +546,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eoa(H5FD_t *_file)
+H5FD_sec2_get_eoa(const H5FD_t *_file)
{
- H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+ const H5FD_sec2_t *file = (const H5FD_sec2_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_sec2_get_eoa, HADDR_UNDEF)
@@ -615,9 +615,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eof(H5FD_t *_file)
+H5FD_sec2_get_eof(const H5FD_t *_file)
{
- H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+ const H5FD_sec2_t *file = (const H5FD_sec2_t*)_file;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_sec2_get_eof, HADDR_UNDEF)
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 0dd2901..99aae42 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -152,9 +152,9 @@ static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags,
static herr_t H5FD_stdio_close(H5FD_t *lf);
static int H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_stdio_get_eoa(H5FD_t *_file);
+static haddr_t H5FD_stdio_get_eoa(const H5FD_t *_file);
static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, haddr_t addr);
-static haddr_t H5FD_stdio_get_eof(H5FD_t *_file);
+static haddr_t H5FD_stdio_get_eof(const H5FD_t *_file);
static herr_t H5FD_stdio_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
@@ -543,9 +543,9 @@ H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eoa(H5FD_t *_file)
+H5FD_stdio_get_eoa(const H5FD_t *_file)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear_stack(H5E_DEFAULT);
@@ -609,9 +609,9 @@ H5FD_stdio_set_eoa(H5FD_t *_file, haddr_t addr)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stdio_get_eof(H5FD_t *_file)
+H5FD_stdio_get_eof(const H5FD_t *_file)
{
- H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
+ const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file;
/* Clear the error stack */
H5Eclear_stack(H5E_DEFAULT);
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 455b3ff..d23db5b 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -157,9 +157,9 @@ static H5FD_t *H5FD_stream_open (const char *name, unsigned flags,
static herr_t H5FD_stream_flush (H5FD_t *_stream, hid_t dxpl_id, unsigned closing);
static herr_t H5FD_stream_close (H5FD_t *_stream);
static herr_t H5FD_stream_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_stream_get_eoa (H5FD_t *_stream);
+static haddr_t H5FD_stream_get_eoa (const H5FD_t *_stream);
static herr_t H5FD_stream_set_eoa (H5FD_t *_stream, haddr_t addr);
-static haddr_t H5FD_stream_get_eof (H5FD_t *_stream);
+static haddr_t H5FD_stream_get_eof (const H5FD_t *_stream);
static herr_t H5FD_stream_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_stream_read (H5FD_t *_stream, H5FD_mem_t type,
hid_t fapl_id, haddr_t addr,
@@ -887,9 +887,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stream_get_eoa (H5FD_t *_stream)
+H5FD_stream_get_eoa (const H5FD_t *_stream)
{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
+ const H5FD_stream_t *stream = (const H5FD_stream_t *) _stream;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_stream_get_eoa, HADDR_UNDEF)
@@ -957,9 +957,9 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_stream_get_eof (H5FD_t *_stream)
+H5FD_stream_get_eof (const H5FD_t *_stream)
{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
+ const H5FD_stream_t *stream = (const H5FD_stream_t *) _stream;
haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_stream_get_eof, HADDR_UNDEF)
diff --git a/src/H5FPclient.c b/src/H5FPclient.c
index bc81ff1..a01bfaf 100644
--- a/src/H5FPclient.c
+++ b/src/H5FPclient.c
@@ -887,7 +887,7 @@ done:
* Modifications:
*/
herr_t
-H5FP_request_get_eoa(H5FD_t *file, haddr_t *eoa, unsigned *req_id, H5FP_status_t *status)
+H5FP_request_get_eoa(const H5FD_t *file, haddr_t *eoa, unsigned *req_id, H5FP_status_t *status)
{
H5FP_eoa_t sap_eoa;
H5FP_request_t req;
diff --git a/src/H5FPprivate.h b/src/H5FPprivate.h
index 2c2f8b1..e309982 100644
--- a/src/H5FPprivate.h
+++ b/src/H5FPprivate.h
@@ -329,7 +329,7 @@ extern haddr_t H5FP_client_alloc(H5FD_t *file, H5FD_mem_t type,
extern herr_t H5FP_request_free(H5FD_t *file, H5FD_mem_t mem_type,
haddr_t addr, hsize_t size,
unsigned *req_id, H5FP_status_t *status);
-extern herr_t H5FP_request_get_eoa(H5FD_t *file, haddr_t *eoa, unsigned *req_id,
+extern herr_t H5FP_request_get_eoa(const H5FD_t *file, haddr_t *eoa, unsigned *req_id,
H5FP_status_t *status);
extern herr_t H5FP_request_set_eoa(H5FD_t *file, haddr_t eoa, unsigned *req_id,
H5FP_status_t *status);
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 0334c65..fde63f7 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1283,7 +1283,6 @@ H5Pset_scaleoffset(hid_t plist_id, unsigned min_bits)
H5O_pline_t pline;
H5P_genplist_t *plist; /* Property list pointer */
unsigned cd_values[1]; /* Filter parameters */
- unsigned int config_flags;
herr_t ret_value=SUCCEED; /* return value */
FUNC_ENTER_API(H5Pset_scaleoffset, FAIL);
diff --git a/src/H5S.c b/src/H5S.c
index 04900f4..de7da2e 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1730,7 +1730,8 @@ static herr_t
H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc)
{
size_t extent_size;
- hssize_t select_size;
+ hssize_t sselect_size;
+ size_t select_size;
H5F_t f; /* fake file structure*/
herr_t ret_value = SUCCEED;
@@ -1744,8 +1745,9 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc)
if((extent_size=H5O_raw_size(H5O_SDSPACE_ID, &f, obj))==0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size");
- if((select_size=H5S_SELECT_SERIAL_SIZE(obj))<0)
+ if((sselect_size=H5S_SELECT_SERIAL_SIZE(obj))<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size");
+ H5_ASSIGN_OVERFLOW(select_size,sselect_size,hssize_t,size_t);
/* Verify the size of buffer. If it's not big enough, simply return the
* right size without filling the buffer. */
diff --git a/src/H5SL.c b/src/H5SL.c
index 3748644..582bd1a 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -573,7 +573,7 @@ H5SL_create(H5SL_type_t type, double p, size_t max_level)
/* Set the static internal fields */
new_slist->type=type;
new_slist->p=p;
- new_slist->p1=p*RAND_MAX;
+ new_slist->p1=(int)(p*RAND_MAX);
new_slist->max_level=max_level;
/* Set the dynamic internal fields */
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 202e15b..301aafd 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -126,7 +126,10 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned char *_dest=NULL; /* Alias for destination buffer */
unsigned bytesoftype; /* Number of bytes per element */
size_t numofelements; /* Number of elements in buffer */
- size_t i,j; /* Local index variables */
+ size_t i; /* Local index variables */
+#ifdef NO_DUFFS_DEVICE
+ size_t j; /* Local index variable */
+#endif /* NO_DUFFS_DEVICE */
size_t leftover; /* Extra bytes at end of buffer */
size_t ret_value; /* Return value */