diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-08 17:52:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-08 17:52:17 (GMT) |
commit | 6680e94aebf3f7b2929c740c7951b4bcf3f9b555 (patch) | |
tree | 6f0d4a47c1ad88413ab94574cd2e8eac75253214 /src | |
parent | d8397a6f426227d09d20e647ce8b12b8c6295b2d (diff) | |
download | hdf5-6680e94aebf3f7b2929c740c7951b4bcf3f9b555.zip hdf5-6680e94aebf3f7b2929c740c7951b4bcf3f9b555.tar.gz hdf5-6680e94aebf3f7b2929c740c7951b4bcf3f9b555.tar.bz2 |
[svn-r5843] Purpose:
Code cleanup
Description:
Clean up a few warnings which were showing up with --enable-production
turned on.
Platforms tested:
FreeBSD 4.6 (sleipnir) serial & parallel
Diffstat (limited to 'src')
-rw-r--r-- | src/H5I.c | 4 | ||||
-rw-r--r-- | src/H5O.c | 2 | ||||
-rw-r--r-- | src/H5Sall.c | 6 | ||||
-rw-r--r-- | src/H5Snone.c | 10 | ||||
-rw-r--r-- | src/H5Sselect.c | 10 | ||||
-rw-r--r-- | src/H5T.c | 4 |
6 files changed, 18 insertions, 18 deletions
@@ -356,7 +356,7 @@ H5I_clear_group(H5I_type_t grp, hbool_t force) /* Check for a 'free' function and call it, if it exists */ if (grp_ptr->free_func && (grp_ptr->free_func)(cur->obj_ptr)<0) { if (force) { -#if H5I_DEBUG +#ifdef H5I_DEBUG if (H5DEBUG(I)) { fprintf(H5DEBUG(I), "H5I: free grp=%d obj=0x%08lx " "failure ignored\n", (int)grp, @@ -879,7 +879,7 @@ H5I_dec_ref(hid_t id) H5I_type_t grp = H5I_GROUP(id); /*group the object is in*/ H5I_id_group_t *grp_ptr = NULL; /*ptr to the group */ H5I_id_info_t *id_ptr = NULL; /*ptr to the new ID */ - int ret_value; /*return value */ + int ret_value=FAIL; /*return value */ FUNC_ENTER_NOAPI(H5I_dec_ref, FAIL); @@ -908,7 +908,7 @@ H5O_count (H5G_entry_t *ent, const H5O_class_t *type) ret_value=acc; done: - FUNC_LEAVE (acc); + FUNC_LEAVE (ret_value); } diff --git a/src/H5Sall.c b/src/H5Sall.c index 0d30339..4f4371d 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -226,7 +226,7 @@ H5S_all_is_valid (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ hssize_t -H5S_all_serial_size (const H5S_t *space) +H5S_all_serial_size (const H5S_t UNUSED *space) { hssize_t ret_value=FAIL; /* return value */ @@ -588,8 +588,8 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_all_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t *iter, - size_t elem_size, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, +H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_iter_t *iter, + size_t elem_size, size_t UNUSED maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len) { hsize_t bytes_left; /* The number of bytes left in the selection */ diff --git a/src/H5Snone.c b/src/H5Snone.c index fc95d1f..823225b 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -153,7 +153,7 @@ H5S_none_release (H5S_t * UNUSED space) REVISION LOG --------------------------------------------------------------------------*/ hsize_t -H5S_none_npoints (const H5S_t *space) +H5S_none_npoints (const H5S_t UNUSED *space) { FUNC_ENTER_NOAPI(H5S_none_npoints, 0); @@ -215,7 +215,7 @@ H5S_none_is_valid (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ hssize_t -H5S_none_serial_size (const H5S_t *space) +H5S_none_serial_size (const H5S_t UNUSED *space) { hssize_t ret_value=FAIL; /* return value */ @@ -556,9 +556,9 @@ done: REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_none_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t *iter, - size_t elem_size, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, - hsize_t *off, size_t *len) +H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_iter_t UNUSED *iter, + size_t UNUSED elem_size, size_t UNUSED maxseq, size_t UNUSED maxbytes, size_t *nseq, size_t *nbytes, + hsize_t UNUSED *off, size_t UNUSED *len) { FUNC_ENTER_NOAPI (H5S_none_get_seq_list, FAIL); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 1905d7a..4314d44 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -537,7 +537,7 @@ htri_t H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2) { H5S_hyper_span_t *span1=NULL,*span2=NULL; /* Hyperslab span node */ - hsize_t elmts1,elmts2; /* Number of elements in each dimension of selection */ + hsize_t elmts1=0,elmts2=0; /* Number of elements in each dimension of selection */ unsigned u; /* Index variable */ htri_t ret_value=TRUE; /* return value */ @@ -1141,7 +1141,7 @@ H5S_select_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, H5P_genplist_t *dx_plist; /* Dataset transfer property list */ H5S_sel_iter_t *mem_iter=NULL; /* Memory selection iteration info */ H5S_sel_iter_t *file_iter=NULL; /* File selection iteration info */ - uint8_t *buf; /* Local buffer pointer, for address arithmetic */ + uint8_t *buf=NULL; /* Local buffer pointer, for address arithmetic */ hsize_t *mem_off=NULL; /* Array to store sequence offsets in memory */ hsize_t *file_off=NULL; /* Array to store sequence offsets in the file */ size_t vector_size; /* Value for vector size */ @@ -1156,7 +1156,7 @@ H5S_select_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, size_t curr_file_seq; /* Current file sequence to operate on */ size_t tmp_file_len; /* Temporary number of bytes in file sequence */ unsigned partial_file; /* Whether a partial file sequence was accessed */ - size_t orig_file_len; /* Original file sequence length for partial file access */ + size_t orig_file_len=0; /* Original file sequence length for partial file access */ size_t orig_file_seq; /* Original file sequence to operate on */ size_t tot_file_seq; /* Number of file sequences to access */ herr_t ret_value=SUCCEED; /* Return value */ @@ -1371,7 +1371,7 @@ H5S_select_write(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, H5P_genplist_t *dx_plist; /* Dataset transfer property list */ H5S_sel_iter_t *mem_iter=NULL; /* Memory selection iteration info */ H5S_sel_iter_t *file_iter=NULL; /* File selection iteration info */ - const uint8_t *buf; /* Local buffer pointer, for address arithmetic */ + const uint8_t *buf=NULL; /* Local buffer pointer, for address arithmetic */ hsize_t *mem_off=NULL; /* Array to store sequence offsets in memory */ hsize_t *file_off=NULL; /* Array to store sequence offsets in the file */ size_t vector_size; /* Value for vector size */ @@ -1386,7 +1386,7 @@ H5S_select_write(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, size_t curr_file_seq; /* Current file sequence to operate on */ size_t tmp_file_len; /* Temporary number of bytes in file sequence */ unsigned partial_file; /* Whether a partial file sequence was accessed */ - size_t orig_file_len; /* Original file sequence length for partial file access */ + size_t orig_file_len=0; /* Original file sequence length for partial file access */ size_t orig_file_seq; /* Original file sequence to operate on */ size_t tot_file_seq; /* Number of file sequences to access */ herr_t ret_value=SUCCEED; /* Return value */ @@ -6612,7 +6612,7 @@ char * H5T_enum_nameof(H5T_t *dt, void *value, char *name/*out*/, size_t size) { int lt, md, rt; /*indices for binary search */ - int cmp; /*comparison result */ + int cmp=(-1); /*comparison result */ char *ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5T_enum_nameof, NULL); @@ -6686,7 +6686,7 @@ herr_t H5T_enum_valueof(H5T_t *dt, const char *name, void *value/*out*/) { int lt, md, rt; /*indices for binary search */ - int cmp; /*comparison result */ + int cmp=(-1); /*comparison result */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_enum_valueof, FAIL); |