summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-08 17:52:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-08 17:52:17 (GMT)
commit6680e94aebf3f7b2929c740c7951b4bcf3f9b555 (patch)
tree6f0d4a47c1ad88413ab94574cd2e8eac75253214
parentd8397a6f426227d09d20e647ce8b12b8c6295b2d (diff)
downloadhdf5-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
-rw-r--r--src/H5I.c4
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5Sall.c6
-rw-r--r--src/H5Snone.c10
-rw-r--r--src/H5Sselect.c10
-rw-r--r--src/H5T.c4
-rw-r--r--test/enum.c2
-rw-r--r--test/links.c8
-rw-r--r--test/set_extent.c6
-rw-r--r--test/unlink.c4
10 files changed, 28 insertions, 28 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 2d668ea..9f4619d 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -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);
diff --git a/src/H5O.c b/src/H5O.c
index aede4d4..a569e3c 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -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 */
diff --git a/src/H5T.c b/src/H5T.c
index 34b45c0..ab48191 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -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);
diff --git a/test/enum.c b/test/enum.c
index 1def5bc..83fa736 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -360,7 +360,7 @@ static int
test_value_dsnt_exist(void)
{
- hid_t datatype_id; /* identifiers */
+ hid_t datatype_id=(-1); /* identifiers */
int val;
char nam[100];
size_t size = 100;
diff --git a/test/links.c b/test/links.c
index 53ba3fc..ea44764 100644
--- a/test/links.c
+++ b/test/links.c
@@ -105,10 +105,10 @@ mklinks(hid_t fapl)
static int
new_links(hid_t fapl)
{
- hid_t file_a, file_b;
- hid_t grp1_a, grp1_b, grp2_a, grp2_b;
- hid_t scalar;
- hid_t dset1, dset2;
+ hid_t file_a, file_b=(-1);
+ hid_t grp1_a=(-1), grp1_b=(-1), grp2_a=(-1), grp2_b=(-1);
+ hid_t scalar=(-1);
+ hid_t dset1=(-1), dset2=(-1);
char filename[1024];
static hsize_t size[1] = {1};
diff --git a/test/set_extent.c b/test/set_extent.c
index 2d0c85f..7a2a9e5 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -28,9 +28,9 @@ int main( void )
{
hid_t file_id;
- hid_t dataset_id;
- hid_t space_id;
- hid_t plist_id;
+ hid_t dataset_id=(-1);
+ hid_t space_id=(-1);
+ hid_t plist_id=(-1);
hsize_t dims[RANK] = { 90, 90 };
hsize_t dims_new[RANK] = { 70, 70 };
hsize_t dims_chunk[RANK] = { 20, 20 };
diff --git a/test/unlink.c b/test/unlink.c
index 2cc7efb..2f4ca7b 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -298,8 +298,8 @@ test_rename(hid_t file)
static int
test_new_move(void)
{
- hid_t fapl, file_a, file_b;
- hid_t grp_1, grp_2, grp_move, moved_grp;
+ hid_t fapl, file_a, file_b=(-1);
+ hid_t grp_1=(-1), grp_2=(-1), grp_move=(-1), moved_grp=(-1);
char filename[1024];
TESTING("new move");