summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5B2pkg.h5
-rw-r--r--src/H5B2private.h9
-rw-r--r--src/H5B2stat.c3
-rw-r--r--src/H5Dcompact.c7
-rw-r--r--src/H5Dcontig.c8
-rw-r--r--src/H5Dio.c96
-rw-r--r--src/H5Dpkg.h6
-rw-r--r--src/H5G.c7
-rw-r--r--src/H5Gdeprec.c26
-rw-r--r--src/H5L.c25
-rw-r--r--src/H5Lprivate.h2
-rw-r--r--src/H5O.c5
-rw-r--r--src/H5Olayout.c2
-rw-r--r--src/H5Opline.c3
-rwxr-xr-xtest/cross_read.c5
-rw-r--r--test/enum.c3
-rw-r--r--test/fheap.c4
-rw-r--r--test/tarray.c1
-rw-r--r--test/tskiplist.c1
-rw-r--r--tools/lib/h5tools.c50
20 files changed, 117 insertions, 151 deletions
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 82f58cf..784b1e5 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -147,11 +147,6 @@ typedef struct H5B2_internal_t {
unsigned nrec; /* Number of records in node */
} H5B2_internal_t;
-/* B-tree metadata statistics info */
-typedef struct H5B2_stat_t {
- int placeholder; /* Replace this with real metadata statistic fields */
-} H5B2_stat_t;
-
/*****************************/
/* Package Private Variables */
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 6f90ef6..0990317 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -95,6 +95,11 @@ typedef struct H5B2_class_t {
} H5B2_class_t;
+/* v2 B-tree metadata statistics info */
+typedef struct H5B2_stat_t {
+ int none; /* No information yet */
+} H5B2_stat_t;
+
/*****************************/
/* Library-private Variables */
/*****************************/
@@ -126,5 +131,9 @@ H5_DLL herr_t H5B2_get_nrec(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
haddr_t addr);
+/* Statistics routines */
+H5_DLL herr_t H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
+ haddr_t addr, H5B2_stat_t *info);
+
#endif /* _H5B2private_H */
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index cd0881c..b00df55 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -70,7 +70,7 @@
/*-------------------------------------------------------------------------
* Function: H5B2_stat_info
*
- * Purpose: Retrieve metadata statistics for the fractal heap
+ * Purpose: Retrieve metadata statistics for a v2 B-tree
*
* Return: Success: non-negative
*
@@ -101,6 +101,7 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header")
/* XXX: Fill in metadata statistics for the heap */
+ info = info; /* Quiet compiler for now) */
done:
/* Release B-tree header node */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index ae4e473..842ad9c 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -160,8 +160,8 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src,
- H5F_t *f_dst, H5O_layout_t *layout_dst, H5T_t *dt_src, hid_t dxpl_id)
+H5D_compact_copy(const H5O_layout_t *layout_src, H5F_t *f_dst, H5O_layout_t *layout_dst,
+ H5T_t *dt_src, hid_t dxpl_id)
{
hid_t tid_src = -1; /* Datatype ID for source datatype */
hid_t tid_dst = -1; /* Datatype ID for destination datatype */
@@ -175,9 +175,8 @@ H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src,
FUNC_ENTER_NOAPI(H5D_compact_copy, FAIL)
/* Check args */
- HDassert(f_src);
- HDassert(f_dst);
HDassert(layout_src && H5D_COMPACT == layout_src->type);
+ HDassert(f_dst);
HDassert(layout_dst && H5D_COMPACT == layout_dst->type);
/* If there's a source datatype, set up type conversion information */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 285f121..544e092 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -1007,9 +1007,9 @@ H5D_contig_copy(H5F_t *f_src, H5O_layout_t *layout_src,
hid_t tid_src = -1; /* Datatype ID for source datatype */
hid_t tid_dst = -1; /* Datatype ID for destination datatype */
hid_t tid_mem = -1; /* Datatype ID for memory datatype */
- size_t src_dt_size; /* Source datatype size */
- size_t mem_dt_size; /* Memory datatype size */
- size_t dst_dt_size; /* Destination datatype size */
+ size_t src_dt_size = 0; /* Source datatype size */
+ size_t mem_dt_size = 0; /* Memory datatype size */
+ size_t dst_dt_size = 0; /* Destination datatype size */
size_t max_dt_size; /* Max. datatype size */
size_t nelmts = 0; /* Number of elements in buffer */
size_t src_nbytes; /* Number of bytes to read from source */
@@ -1030,8 +1030,8 @@ H5D_contig_copy(H5F_t *f_src, H5O_layout_t *layout_src,
/* Check args */
HDassert(f_src);
- HDassert(f_dst);
HDassert(layout_src && H5D_CONTIGUOUS == layout_src->type);
+ HDassert(f_dst);
HDassert(layout_dst && H5D_CONTIGUOUS == layout_dst->type);
/* Allocate space for destination raw data */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 05b428e..6675bc5 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -993,11 +993,10 @@ H5D_contig_read(H5D_io_info_t *io_info, hsize_t nelmts,
else
#endif
{
- if((io_info->ops.read)(io_info,
- (size_t)nelmts, H5T_get_size(dataset->shared->type),
- file_space, mem_space,0,
- buf/*out*/)<0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "contiguous read failed ");
+ if((io_info->ops.read)(io_info, (size_t)nelmts,
+ H5T_get_size(dataset->shared->type), file_space, mem_space,
+ (haddr_t)0, buf/*out*/) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "contiguous read failed ");
}
#ifdef H5S_DEBUG
@@ -1252,11 +1251,10 @@ H5D_contig_write(H5D_io_info_t *io_info, hsize_t nelmts,
else
#endif
{
- if((io_info->ops.write)(io_info,
- (size_t)nelmts, H5T_get_size(dataset->shared->type),
- file_space, mem_space,0,
- buf/*out*/)<0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "contiguous write failed ");
+ if((io_info->ops.write)(io_info, (size_t)nelmts,
+ H5T_get_size(dataset->shared->type), file_space, mem_space,
+ (haddr_t)0, buf/*out*/) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "contiguous write failed ");
}
#ifdef H5S_DEBUG
@@ -1517,31 +1515,28 @@ H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
else {/* sequential or independent read */
#endif
- /* Get first node in chunk skip list */
- chunk_node=H5SL_first(fm.fsel);
+ /* Get first node in chunk skip list */
+ chunk_node=H5SL_first(fm.fsel);
- while(chunk_node) {
- H5D_chunk_info_t *chunk_info; /* chunk information */
+ while(chunk_node) {
+ H5D_chunk_info_t *chunk_info; /* chunk information */
- /* Get the actual chunk information from the skip list node */
- chunk_info=H5SL_item(chunk_node);
+ /* Get the actual chunk information from the skip list node */
+ chunk_info=H5SL_item(chunk_node);
- /* Pass in chunk's coordinates in a union. */
- store.chunk.offset = chunk_info->coords;
- store.chunk.index = chunk_info->index;
+ /* Pass in chunk's coordinates in a union. */
+ store.chunk.offset = chunk_info->coords;
+ store.chunk.index = chunk_info->index;
- /* Perform the actual read operation */
- status = (io_info->ops.read)(io_info,
- chunk_info->chunk_points, H5T_get_size(dataset->shared->type),
- chunk_info->fspace, chunk_info->mspace, 0,buf);
+ /* Perform the actual read operation */
+ if((io_info->ops.read)(io_info, chunk_info->chunk_points,
+ H5T_get_size(dataset->shared->type), chunk_info->fspace,
+ chunk_info->mspace, (haddr_t)0, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, " chunked read failed")
- /* Check return value from optimized read */
- if (status<0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, " chunked read failed")
-
- chunk_node = H5SL_next(chunk_node);
-
- }
+ /* Advance to next chunk in list */
+ chunk_node = H5SL_next(chunk_node);
+ }
#ifdef H5_HAVE_PARALLEL
}
#endif
@@ -1840,34 +1835,29 @@ H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunked write failed in collective mode");
}
else {/* sequential or independent write */
+#endif /* H5_HAVE_PARALLEL */
+ /* Get first node in chunk skip list */
+ chunk_node=H5SL_first(fm.fsel);
- #endif /* H5_HAVE_PARALLEL */
- /* Get first node in chunk skip list */
- chunk_node=H5SL_first(fm.fsel);
-
- while(chunk_node) {
- H5D_chunk_info_t *chunk_info; /* Chunk information */
-
- /* Get the actual chunk information from the skip list node */
- chunk_info=H5SL_item(chunk_node);
-
- /* Pass in chunk's coordinates in a union. */
- store.chunk.offset = chunk_info->coords;
- store.chunk.index = chunk_info->index;
-
- /* Perform the actual read operation */
+ while(chunk_node) {
+ H5D_chunk_info_t *chunk_info; /* Chunk information */
- status = (io_info->ops.write)(io_info,
- chunk_info->chunk_points, H5T_get_size(dataset->shared->type),
- chunk_info->fspace, chunk_info->mspace, 0,buf);
+ /* Get the actual chunk information from the skip list node */
+ chunk_info=H5SL_item(chunk_node);
- /* Check return value from optimized read */
- if (status<0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, " chunked write failed")
+ /* Pass in chunk's coordinates in a union. */
+ store.chunk.offset = chunk_info->coords;
+ store.chunk.index = chunk_info->index;
- chunk_node = H5SL_next(chunk_node);
+ /* Perform the actual read operation */
+ if((io_info->ops.write)(io_info, chunk_info->chunk_points,
+ H5T_get_size(dataset->shared->type), chunk_info->fspace,
+ chunk_info->mspace, (haddr_t)0, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, " chunked write failed")
- }
+ /* Advance to next chunk in list */
+ chunk_node = H5SL_next(chunk_node);
+ } /* end while */
#ifdef H5_HAVE_PARALLEL
}
#endif
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 4c1c663..f6946f2 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -68,14 +68,14 @@
struct H5D_io_info_t;
typedef herr_t (*H5D_io_read_func_t)(struct H5D_io_info_t *io_info,
size_t nelmts, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,haddr_t addr,
+ const H5S_t *file_space, const H5S_t *mem_space, haddr_t addr,
void *buf/*out*/);
/* Write directly from app buffer to file */
typedef herr_t (*H5D_io_write_func_t)(struct H5D_io_info_t *io_info,
size_t nelmts, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,haddr_t addr,
+ const H5S_t *file_space, const H5S_t *mem_space, haddr_t addr,
const void *buf);
/* Function pointers for I/O on particular types of dataset layouts */
@@ -279,7 +279,7 @@ H5_DLL ssize_t H5D_compact_writevv(const H5D_io_info_t *io_info,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[],
const void *buf);
-H5_DLL herr_t H5D_compact_copy(H5F_t *f_src, H5O_layout_t *layout_src,
+H5_DLL herr_t H5D_compact_copy(const H5O_layout_t *layout_src,
H5F_t *f_dst, H5O_layout_t *layout_dst, H5T_t *src_dtype, hid_t dxpl_id);
/* Functions that operate on indexed storage */
diff --git a/src/H5G.c b/src/H5G.c
index 21767a0..2fc408c 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -929,9 +929,10 @@ H5Gcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
obj_open = TRUE;
/* Get correct property lists */
- if(H5P_DEFAULT == lcpl_id)
+ if(H5P_DEFAULT == lcpl_id) {
if((lcpl_id = H5L_get_default_lcpl()) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to get default lcpl")
+ } /* end if */
else
if(TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link creation property list")
@@ -2160,17 +2161,13 @@ static herr_t
H5G_copy(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name,
hid_t ocpypl_id, hid_t lcpl_id)
{
- H5P_genplist_t *gcrt_plist=NULL; /* Group create property list created */
H5P_genplist_t *gcpy_plist=NULL; /* Group copy property list created */
hid_t dxpl_id=H5AC_dxpl_id;
H5G_name_t new_path; /* Copied object group hier. path */
H5O_loc_t new_oloc; /* Copied object object location */
H5G_loc_t new_loc; /* Group location of object copied */
hbool_t entry_inserted=FALSE; /* Flag to indicate that the new entry was inserted into a group */
- hbool_t gcrt_plist_created=FALSE; /* Flag to indicate if H5G_CREATE_INTERMEDIATE_GROUP_FLAG is set */
unsigned cpy_option = 0; /* Copy options */
- H5P_genclass_t *gcrt_class; /* Group creation property class */
- hid_t gcplist_id = H5P_DEFAULT; /* Group creation property list */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_copy, FAIL);
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index c27826e..98d2cf8 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -66,6 +66,7 @@ H5Glink(hid_t cur_loc_id, H5L_link_t type, const char *cur_name, const char *new
done:
FUNC_LEAVE_API(ret_value)
}
+
/*-------------------------------------------------------------------------
* Function: H5Glink2
@@ -75,34 +76,34 @@ done:
*
*-------------------------------------------------------------------------
*/
-H5Glink2(hid_t cur_loc_id, const char *cur_name,
- H5L_link_t type, hid_t new_loc_id, const char *new_name)
+herr_t
+H5Glink2(hid_t cur_loc_id, const char *cur_name, H5L_link_t type,
+ hid_t new_loc_id, const char *new_name)
{
herr_t ret_value;
FUNC_ENTER_API(H5Glink2, FAIL)
- if(type == H5L_LINK_HARD)
- {
- if((ret_value = H5Lcreate_hard(cur_loc_id, cur_name, new_loc_id, new_name, H5P_DEFAULT)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "Couldn't create link")
+ if(type == H5L_LINK_HARD) {
+ if((ret_value = H5Lcreate_hard(cur_loc_id, cur_name, new_loc_id, new_name, H5P_DEFAULT)) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "Couldn't create link")
}
- else if(type == H5L_LINK_SOFT)
- {
+ else if(type == H5L_LINK_SOFT) {
/* Soft links only need one location, the new_loc_id, but it's possible that
* new_loc_id is H5L_SAME_LOC */
if(new_loc_id == H5L_SAME_LOC)
new_loc_id = cur_loc_id;
if((ret_value = H5Lcreate_soft(cur_name, new_loc_id, new_name, H5P_DEFAULT)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "Couldn't create link")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "Couldn't create link")
}
else
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid link type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid link type")
done:
FUNC_LEAVE_API(ret_value)
}
+
/*-------------------------------------------------------------------------
* Function: H5Gmove
@@ -125,6 +126,7 @@ H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name)
done:
FUNC_LEAVE_API(ret_value)
}
+
/*-------------------------------------------------------------------------
* Function: H5Gmove2
@@ -146,6 +148,7 @@ herr_t H5Gmove2(hid_t src_loc_id, const char *src_name,
done:
FUNC_LEAVE_API(ret_value)
}
+
/*-------------------------------------------------------------------------
* Function: H5Gunlink
@@ -168,6 +171,7 @@ H5Gunlink(hid_t loc_id, const char *name)
done:
FUNC_LEAVE_API(ret_value)
}
+
/*-------------------------------------------------------------------------
* Function: H5Gget_linkval
@@ -190,4 +194,4 @@ herr_t H5Gget_linkval(hid_t loc_id, const char *name,
done:
FUNC_LEAVE_API(ret_value)
}
-
+
diff --git a/src/H5L.c b/src/H5L.c
index 4127067..082681f 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -169,30 +169,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_term_interface
- *
- * Purpose: Terminate any resources allocated in H5L_init_interface.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: James Laird
- * Tuesday, January 24, 2006
- *
- *-------------------------------------------------------------------------
- */
-int
-H5L_term_interface(void)
-{
- int n=0;
-
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5L_term_interface)
-
- /* The H5L interface currently has no resources that need to be freed. */
-
- FUNC_LEAVE_NOAPI(n)
-}
-
-/*-------------------------------------------------------------------------
* Function: H5Lmove
*
* Purpose: Renames an object within an HDF5 file and moves it to a new
@@ -616,7 +592,6 @@ herr_t
H5L_link(H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc,
hid_t dxpl_id, hid_t lcpl_id)
{
- char *norm_new_name = NULL; /* Pointer to normalized new name */
H5F_t *file = NULL; /* File link will be in */
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index 02e6fc6..78743da 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -38,6 +38,6 @@ struct H5HL_t; /* defined in H5HLprivate.h */
H5_DLL herr_t H5L_link(H5G_loc_t *new_loc, const char *new_name,
H5G_loc_t *obj_loc, hid_t dxpl, hid_t lcpl_id);
-H5_DLL hid_t H5L_get_default_lcpl();
+H5_DLL hid_t H5L_get_default_lcpl(void);
#endif /* _H5Lprivate_H */
diff --git a/src/H5O.c b/src/H5O.c
index 14b0b09..e035ed4 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -4077,11 +4077,11 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
H5O_t *oh_dst = NULL; /* Object header for destination object */
unsigned chunkno = 0, mesgno = 0;
size_t hdr_size;
- haddr_t addr_new;
+ haddr_t addr_new = HADDR_UNDEF;
H5O_mesg_t *mesg_src; /* Message in source object header */
H5O_mesg_t *mesg_dst; /* Message in source object header */
const H5O_msg_class_t *copy_type; /* Type of message to use for copying */
- const H5O_obj_class_t *obj_class; /* Type of object we are copying */
+ const H5O_obj_class_t *obj_class = NULL; /* Type of object we are copying */
void *udata = NULL; /* User data for passing to message callbacks */
herr_t ret_value = SUCCEED;
@@ -4285,6 +4285,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* Set the dest. object location to the first chunk address */
+ HDassert(H5F_addr_defined(addr_new));
oloc_dst->addr = addr_new;
/* Allocate space for the address mapping of the object copied */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index bff1dfb..ff7f085 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -650,7 +650,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hid_t dxp
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate memory for compact dataset")
/* copy compact raw data */
- if(H5D_compact_copy(file_src, layout_src, file_dst, layout_dst, udata->src_dtype, dxpl_id) < 0)
+ if(H5D_compact_copy(layout_src, file_dst, layout_dst, udata->src_dtype, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to copy chunked storage")
layout_dst->u.compact.dirty = TRUE;
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 29cd0fd..5b0c065 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -441,7 +441,7 @@ H5O_pline_free (void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *type,
+H5O_pline_pre_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t UNUSED *type,
void *mesg_src, hbool_t UNUSED *deleted, const H5O_copy_t UNUSED *cpy_info,
void *_udata)
{
@@ -452,7 +452,6 @@ H5O_pline_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *type,
FUNC_ENTER_NOAPI_NOINIT(H5O_pline_pre_copy_file)
/* check args */
- HDassert(file_src);
HDassert(pline_src);
/* If the user data is non-NULL, assume we are copying a dataset
diff --git a/test/cross_read.c b/test/cross_read.c
index d24ffa9..bc41bb3 100755
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -43,8 +43,7 @@ static int read_data(char *fname)
hid_t dt;
double data_in[NX][NY]; /* input buffer */
double data_out[NX][NY]; /* output buffer */
- int i, j, rank;
- herr_t status;
+ int i, j;
unsigned nerrors = 0;
pathname[0] = '\0';
@@ -153,7 +152,7 @@ int main(void)
nerrors += read_data(filename);
if (nerrors) {
- printf("***** %lu FAILURE%s! *****\n",
+ printf("***** %u FAILURE%s! *****\n",
nerrors, 1==nerrors?"":"S");
HDexit(1);
}
diff --git a/test/enum.c b/test/enum.c
index f626f5c..02cad81 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -445,9 +445,8 @@ test_value_dsnt_exist(void)
static int
test_funcs(void)
{
- hid_t type=-1, cwg=-1;
+ hid_t type=-1;
c_e1 val;
- signed char val8;
int size;
H5T_pad_t inpad;
H5T_cset_t cset;
diff --git a/test/fheap.c b/test/fheap.c
index f041706..64f3efb 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -10197,7 +10197,7 @@ test_abs_random_managed(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, f
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
- unsigned long seed; /* Random # seed */
+ unsigned long seed = 0; /* Random # seed */
size_t num_ids = 0; /* # of heap IDs in array */
size_t alloc_ids = 0; /* # of heap IDs allocated in array */
hsize_t total_obj_added; /* Size of objects added */
@@ -10354,7 +10354,7 @@ test_abs_random_pow2_managed(hsize_t size_limit, hid_t fapl, H5HF_create_t *cpar
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
- unsigned long seed; /* Random # seed */
+ unsigned long seed = 0; /* Random # seed */
size_t num_ids = 0; /* # of heap IDs in array */
size_t alloc_ids = 0; /* # of heap IDs allocated in array */
hsize_t total_obj_added; /* Size of objects added */
diff --git a/test/tarray.c b/test/tarray.c
index 50fe1a9..22fb02b 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -189,7 +189,6 @@ test_array_funcs(void)
int size;
H5T_pad_t inpad;
H5T_norm_t norm;
- H5T_sign_t sign;
H5T_cset_t cset;
H5T_str_t strpad;
herr_t ret; /* Generic return value */
diff --git a/test/tskiplist.c b/test/tskiplist.c
index c76b79c..5b54dbd 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -1175,7 +1175,6 @@ test_skiplist_remove_first(void)
unsigned data[10]={ 10, 20, 15, 5, 50, 30, 31, 32, 80, 90};
unsigned sorted_data[10]={ 5, 10, 15, 20, 30, 31, 32, 50, 80, 90};
unsigned *found_item; /* Item found in skip list */
- unsigned find_item; /* Item to add to skip list */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 24d9f7e..aa91474 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1378,7 +1378,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
#if H5_SIZEOF_LONG_DOUBLE !=0
long double templdouble;
#endif
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
static char fmt_llong[8], fmt_ullong[8];
if (!fmt_llong[0]) {
sprintf(fmt_llong, "%%%sd", H5_PRINTF_LL_WIDTH);
@@ -1391,7 +1391,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
if (H5Tequal(tid, H5T_NATIVE_FLOAT))
{
memcpy(&tempfloat, mem, sizeof(float));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%g ", tempfloat);
#else
if (1 != fwrite(&tempfloat, size, 1, stream))
@@ -1401,7 +1401,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_DOUBLE))
{
memcpy(&tempdouble, mem, sizeof(double));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%g ", tempdouble);
#else
if (1 != fwrite(&tempdouble, size, 1, stream))
@@ -1412,7 +1412,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_LDOUBLE))
{
memcpy(&templdouble, mem, sizeof(long double));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%Lf ", templdouble);
#else
if (1 != fwrite(&templdouble, size, 1, stream))
@@ -1442,7 +1442,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
for (i=0; i<size && (s[i] || pad!=H5T_STR_NULLTERM); i++)
{
memcpy(&tempuchar, &s[i], sizeof(unsigned char));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%d", tempuchar);
#else
if (1 != fwrite(&tempuchar, size, 1, stream))
@@ -1453,7 +1453,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_INT))
{
memcpy(&tempint, mem, sizeof(int));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%d ", tempint);
#else
if (1 != fwrite(&tempint, size, 1, stream))
@@ -1463,7 +1463,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_UINT))
{
memcpy(&tempuint, mem, sizeof(unsigned int));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%u ", tempuint);
#else
if (1 != fwrite(&tempuint, size, 1, stream))
@@ -1473,7 +1473,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_SCHAR))
{
memcpy(&tempschar, mem, sizeof(char));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%d ", tempschar);
#else
if (1 != fwrite(&tempschar, size, 1, stream))
@@ -1483,7 +1483,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_UCHAR))
{
memcpy(&tempuchar, mem, sizeof(unsigned char));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%u ", tempuchar);
#else
if (1 != fwrite(&tempuchar, size, 1, stream))
@@ -1493,7 +1493,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_SHORT))
{
memcpy(&tempshort, mem, sizeof(short));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%d ", tempshort);
#else
if (1 != fwrite(&tempshort, size, 1, stream))
@@ -1503,7 +1503,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_USHORT))
{
memcpy(&tempushort, mem, sizeof(unsigned short));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%u ", tempushort);
#else
if (1 != fwrite(&tempushort, size, 1, stream))
@@ -1513,7 +1513,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_LONG))
{
memcpy(&templong, mem, sizeof(long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%ld ", templong);
#else
if (1 != fwrite(&templong, size, 1, stream))
@@ -1523,7 +1523,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_ULONG))
{
memcpy(&tempulong, mem, sizeof(unsigned long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%lu ", tempulong);
#else
if (1 != fwrite(&tempulong, size, 1, stream))
@@ -1533,7 +1533,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_LLONG))
{
memcpy(&templlong, mem, sizeof(long_long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_llong, templlong);
#else
if (1 != fwrite(&templlong, size, 1, stream))
@@ -1543,7 +1543,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (H5Tequal(tid, H5T_NATIVE_ULLONG))
{
memcpy(&tempullong, mem, sizeof(unsigned long_long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_ullong, tempullong);
#else
if (1 != fwrite(&tempullong, size, 1, stream))
@@ -1555,7 +1555,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
if (sizeof(hssize_t) == sizeof(int))
{
memcpy(&tempint, mem, sizeof(int));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%d ", tempint);
#else
if (1 != fwrite(&tempint, size, 1, stream))
@@ -1565,7 +1565,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (sizeof(hssize_t) == sizeof(long))
{
memcpy(&templong, mem, sizeof(long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%ld ", templong);
#else
if (1 != fwrite(&templong, size, 1, stream))
@@ -1575,7 +1575,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else
{
memcpy(&templlong, mem, sizeof(long_long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_llong, templlong);
#else
if (1 != fwrite(&templlong, size, 1, stream))
@@ -1588,7 +1588,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
if (sizeof(hsize_t) == sizeof(int))
{
memcpy(&tempuint, mem, sizeof(unsigned int));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%u ", tempuint);
#else
if (1 != fwrite(&tempuint, size, 1, stream))
@@ -1598,7 +1598,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else if (sizeof(hsize_t) == sizeof(long))
{
memcpy(&tempulong, mem, sizeof(unsigned long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%lu ", tempulong);
#else
if (1 != fwrite(&tempulong, size, 1, stream))
@@ -1608,7 +1608,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
else
{
memcpy(&tempullong, mem, sizeof(unsigned long_long));
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, fmt_ullong, tempullong);
#else
if (1 != fwrite(&tempullong, size, 1, stream))
@@ -1641,7 +1641,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
unsigned int i;
if (1==size)
{
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "0x%02x", mem[0]);
#else
if (1 != fwrite(&mem[0], size, 1, stream))
@@ -1652,7 +1652,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
{
for (i = 0; i < size; i++)
{
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%s%02x", i?":":"", mem[i]);
#else
if (1 != fwrite(&mem[i], sizeof(char), 1, stream))
@@ -1718,7 +1718,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
size_t i;
if (1==size)
{
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "0x%02x", mem[0]);
#else
if (1 != fwrite(&mem[0], size, 1, stream))
@@ -1729,7 +1729,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem)
{
for (i = 0; i < size; i++)
{
-#if DEBUG_H5DUMP_BIN
+#ifdef DEBUG_H5DUMP_BIN
fprintf(stream, "%s%02x", i?":":"", mem[i]);
#else
if (1 != fwrite(&mem[i], sizeof(char), 1, stream))