summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-01-30 15:46:43 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-01-30 15:46:43 (GMT)
commite3cfd6f0df634d9dbff703ded657b1c894d003cf (patch)
treea0d66cae964a9ffd7a4630df4718e5d67a16d8f8 /src
parent2af7e952edcdefd37b114277e9562e472965b38c (diff)
downloadhdf5-e3cfd6f0df634d9dbff703ded657b1c894d003cf.zip
hdf5-e3cfd6f0df634d9dbff703ded657b1c894d003cf.tar.gz
hdf5-e3cfd6f0df634d9dbff703ded657b1c894d003cf.tar.bz2
[svn-r16386] Fix various warnings (errors in pgcc) associated with yesterday's dense
attribute object copy commit. Tested: jam (gcc and pgcc)
Diffstat (limited to 'src')
-rw-r--r--src/H5Aint.c19
-rw-r--r--src/H5Apkg.h6
-rw-r--r--src/H5Oattr.c3
3 files changed, 13 insertions, 15 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index a93d807..a47c5c3 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -37,9 +37,12 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
+#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
+#include "H5SMprivate.h" /* Shared Object Header Messages */
/****************/
@@ -68,12 +71,12 @@ typedef struct {
/* Data exchange structure to use when copying an attribute from _SRC to _DST */
typedef struct {
- H5O_ainfo_t *ainfo; /* dense information */
+ const H5O_ainfo_t *ainfo; /* dense information */
H5F_t *file; /* file */
hbool_t *recompute_size; /* Flag to indicate if size changed */
H5O_copy_t *cpy_info; /* Information on copying options */
hid_t dxpl_id; /* DXPL for operation */
- H5O_loc_t *oloc_src;
+ const H5O_loc_t *oloc_src;
H5O_loc_t *oloc_dst;
} H5A_dense_file_cp_ud_t;
@@ -792,7 +795,7 @@ H5A_set_version(const H5F_t *f, H5A_t *attr)
*-------------------------------------------------------------------------
*/
H5A_t *
-H5A_attr_copy_file(H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
+H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
H5O_copy_t *cpy_info, hid_t dxpl_id)
{
H5A_t *attr_dst = NULL;
@@ -1067,7 +1070,7 @@ done:
*/
herr_t
H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t UNUSED *attr_src,
- H5O_loc_t *dst_oloc, H5A_t *attr_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
+ H5O_loc_t *dst_oloc, const H5A_t *attr_dst, hid_t dxpl_id, H5O_copy_t *cpy_info)
{
H5F_t *file_src = src_oloc->file;
H5F_t *file_dst = dst_oloc->file;
@@ -1157,7 +1160,7 @@ H5A_dense_copy_file_cb(const H5A_t *attr_src, void *_udata)
done:
if (attr_dst) {
(void)H5A_free(attr_dst);
- H5FL_FREE(H5A_t, attr_dst);
+ (void)H5FL_FREE(H5A_t, attr_dst);
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -1180,7 +1183,7 @@ done:
*/
herr_t
H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst,
- H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id)
+ const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id)
{
H5A_dense_file_cp_ud_t udata; /* User data for iteration callback */
H5A_attr_iter_op_t attr_op; /* Attribute operator */
@@ -1207,7 +1210,7 @@ H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5A_dense_copy_file_all */
/*-------------------------------------------------------------------------
@@ -1228,7 +1231,6 @@ static herr_t
H5A_dense_post_copy_file_cb(const H5A_t *attr_dst, void *_udata)
{
H5A_dense_file_cp_ud_t *udata = (H5A_dense_file_cp_ud_t *)_udata;
- H5A_t *attr_src = NULL;
herr_t ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5A_dense_post_copy_file_cb)
@@ -1300,4 +1302,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index f66fa77..9027864 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -279,12 +279,12 @@ H5_DLL htri_t H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL int H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-H5_DLL H5A_t *H5A_attr_copy_file(H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
+H5_DLL H5A_t *H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
H5O_copy_t *cpy_info, hid_t dxpl_id);
H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,
- H5O_loc_t *dst_oloc, H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
+ H5O_loc_t *dst_oloc, const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
H5_DLL herr_t H5A_dense_copy_file_all(H5F_t *file_src, H5O_ainfo_t *ainfo_src, H5F_t *file_dst,
- H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id);
+ const H5O_ainfo_t *ainfo_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, hid_t dxpl_id);
H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index db216ad..b875d02 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -20,13 +20,10 @@
#include "H5private.h" /* Generic Functions */
#include "H5Apkg.h" /* Attributes */
-#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Spkg.h" /* Dataspaces */
-#include "H5SMprivate.h" /* Shared Object Header Messages */
/* PRIVATE PROTOTYPES */
static herr_t H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg);