diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2009-01-30 15:48:30 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2009-01-30 15:48:30 (GMT) |
commit | a1ffba8cdb5452687ca02b0f1ac69276ad9a1d5f (patch) | |
tree | ba80fb2756216913819813097c503897aec87ea1 /src | |
parent | 69d06e6ed44ead9c2cd65d63b372ed1ea36f8be6 (diff) | |
download | hdf5-a1ffba8cdb5452687ca02b0f1ac69276ad9a1d5f.zip hdf5-a1ffba8cdb5452687ca02b0f1ac69276ad9a1d5f.tar.gz hdf5-a1ffba8cdb5452687ca02b0f1ac69276ad9a1d5f.tar.bz2 |
[svn-r16387] 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.c | 19 | ||||
-rw-r--r-- | src/H5Apkg.h | 6 | ||||
-rw-r--r-- | src/H5Oattr.c | 3 |
3 files changed, 13 insertions, 15 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index e5aba4b..49a0186 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; @@ -793,7 +796,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; @@ -1068,7 +1071,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; @@ -1158,7 +1161,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) @@ -1181,7 +1184,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 */ @@ -1208,7 +1211,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 */ /*------------------------------------------------------------------------- @@ -1229,7 +1232,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) @@ -1301,4 +1303,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); |