summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-23 17:57:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-23 17:57:16 (GMT)
commit09ee6ebc4ca6284aef70d87a4abd6bd6d43f54f7 (patch)
treebb60773615fc7926781e7f6d1428a59fa0c7e612
parentd6bb759cbdaa4ef5326cdb4e43a9ca815ccb9710 (diff)
downloadhdf5-09ee6ebc4ca6284aef70d87a4abd6bd6d43f54f7.zip
hdf5-09ee6ebc4ca6284aef70d87a4abd6bd6d43f54f7.tar.gz
hdf5-09ee6ebc4ca6284aef70d87a4abd6bd6d43f54f7.tar.bz2
[svn-r8733] Purpose:
Code cleanup Description: Reduce compiler warnings on SGI IRIX Platforms tested: FreeBSD 4.10 (sleipnir) SGI IRIX6 (Cheryl's machine) Too minor to require full h5committest
-rw-r--r--config/irix6.x4
-rw-r--r--perform/perf_meta.c6
-rw-r--r--src/H5.c7
-rw-r--r--src/H5AC.c12
-rw-r--r--src/H5D.c6
-rw-r--r--src/H5Distore.c6
-rw-r--r--src/H5MM.c4
-rw-r--r--src/H5Olayout.c6
-rw-r--r--src/H5Omtime.c4
-rw-r--r--src/H5Sall.c2
-rw-r--r--src/H5Shyper.c3
-rw-r--r--src/H5Snone.c2
-rw-r--r--src/H5Sselect.c8
-rw-r--r--src/H5Tvlen.c4
-rw-r--r--test/dtypes.c3
-rw-r--r--tools/h5dump/h5dump.c2
16 files changed, 45 insertions, 34 deletions
diff --git a/config/irix6.x b/config/irix6.x
index a79613a..44785c0 100644
--- a/config/irix6.x
+++ b/config/irix6.x
@@ -73,11 +73,11 @@ case "X-$CC_BASENAME" in
DEBUG_CPPFLAGS=
# Extra production flags
- PROD_CFLAGS="-O -s"
+ PROD_CFLAGS="-O -OPT:Olimit=0 -s"
PROD_CPPFLAGS=
# Extra profiling flags
- PROFILE_CFLAGS=-pg
+ PROFILE_CFLAGS=
PROFILE_CPPFLAGS=
;;
esac
diff --git a/perform/perf_meta.c b/perform/perf_meta.c
index 9609b62..55adc57 100644
--- a/perform/perf_meta.c
+++ b/perform/perf_meta.c
@@ -668,15 +668,17 @@ error:
*/
double retrieve_time(void)
{
+#ifdef H5_HAVE_PARALLEL
if(facc_type == FACC_DEFAULT) {
+#endif /*H5_HAVE_PARALLEL*/
struct timeval t;
gettimeofday(&t, NULL);
return ((double)t.tv_sec + (double)t.tv_usec / 1000000);
- } else {
#ifdef H5_HAVE_PARALLEL
+ } else {
return MPI_Wtime();
-#endif /*H5_HAVE_PARALLEL*/
}
+#endif /*H5_HAVE_PARALLEL*/
}
diff --git a/src/H5.c b/src/H5.c
index 5c5f3ad..6f810bf 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -318,11 +318,10 @@ H5dont_atexit(void)
H5TRACE0("e","");
if (dont_atexit_g)
- HGOTO_DONE(FAIL);
+ ret_value=FAIL;
+ else
+ dont_atexit_g = TRUE;
- dont_atexit_g = TRUE;
-
-done:
FUNC_LEAVE_API(ret_value);
}
diff --git a/src/H5AC.c b/src/H5AC.c
index 254d928..1f866e3 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -194,12 +194,10 @@ H5AC_init_interface(void)
unsigned block_before_meta_write; /* "block before meta write" property value */
unsigned library_internal=1; /* "library internal" property value */
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
-#endif /* H5_HAVE_PARALLEL */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5AC_init_interface);
-#ifdef H5_HAVE_PARALLEL
/* Sanity check */
assert(H5P_CLS_DATASET_XFER_g!=(-1));
@@ -272,17 +270,21 @@ H5AC_init_interface(void)
xfer_mode=H5FD_MPIO_INDEPENDENT;
if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value");
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
#else /* H5_HAVE_PARALLEL */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_init_interface);
+
/* Sanity check */
assert(H5P_LST_DATASET_XFER_g!=(-1));
H5AC_dxpl_id=H5P_DATASET_XFER_DEFAULT;
H5AC_noblock_dxpl_id=H5P_DATASET_XFER_DEFAULT;
H5AC_ind_dxpl_id=H5P_DATASET_XFER_DEFAULT;
-#endif /* H5_HAVE_PARALLEL */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
+#endif /* H5_HAVE_PARALLEL */
} /* end H5AC_init_interface() */
diff --git a/src/H5D.c b/src/H5D.c
index 90932b5..e6b3ef9 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -607,7 +607,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_fill_value_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_fill_value_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_fill_t *fill1=(const H5O_fill_t *)value1, /* Create local aliases for values */
*fill2=(const H5O_fill_t *)value2;
@@ -663,7 +663,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_ext_file_list_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_ext_file_list_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_efl_t *efl1=(const H5O_efl_t *)value1, /* Create local aliases for values */
*efl2=(const H5O_efl_t *)value2;
@@ -745,7 +745,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_pline_t *pline1=(const H5O_pline_t *)value1, /* Create local aliases for values */
*pline2=(const H5O_pline_t *)value2;
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 9d30387..4abf0e1 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1694,7 +1694,9 @@ H5D_istore_readvv(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache, hid_t dxp
{
H5D_istore_ud1_t udata; /*B-tree pass-through */
haddr_t chunk_addr; /* Chunk address on disk */
+#ifndef NDEBUG
size_t u; /* Local index variables */
+#endif
ssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5D_istore_readvv, FAIL);
@@ -1797,7 +1799,9 @@ H5D_istore_writevv(H5F_t *f, const struct H5D_dxpl_cache_t *dxpl_cache,
{
H5D_istore_ud1_t udata; /*B-tree pass-through */
haddr_t chunk_addr; /* Chunk address on disk */
+#ifndef NDEBUG
size_t u; /* Local index variables */
+#endif
ssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5D_istore_writevv, FAIL);
@@ -2023,7 +2027,7 @@ H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
unsigned u;
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_istore_get_addr);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_get_addr);
assert(f);
assert(layout && (layout->u.chunk.ndims > 0));
diff --git a/src/H5MM.c b/src/H5MM.c
index dc3cd2c..afbf8b4 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -59,7 +59,7 @@ void *
H5MM_malloc(size_t size)
{
/* Use FUNC_ENTER_NOAPI_NOINIT here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT(H5MM_malloc);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_malloc);
assert(size);
@@ -92,7 +92,7 @@ void *
H5MM_calloc(size_t size)
{
/* Use FUNC_ENTER_NOAPI_NOINIT here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT(H5MM_calloc);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MM_calloc);
assert(size);
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 0b6b4a8..1839343 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -128,7 +128,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "dimensionality is too large");
/* Layout class */
- mesg->type = *p++;
+ mesg->type = (H5D_layout_t)*p++;
assert(H5D_CONTIGUOUS == mesg->type || H5D_CHUNKED == mesg->type || H5D_COMPACT == mesg->type);
/* Reserved bytes */
@@ -176,7 +176,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t
} /* end if */
else {
/* Layout class */
- mesg->type = *p++;
+ mesg->type = (H5D_layout_t)*p++;
/* Interpret the rest of the message according to the layout class */
switch(mesg->type) {
@@ -340,7 +340,6 @@ H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid layout class");
- break;
} /* end switch */
} /* end else */
@@ -502,7 +501,6 @@ H5O_layout_meta_size(H5F_t *f, const void *_mesg)
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, 0, "Invalid layout class");
- break;
} /* end switch */
} /* end else */
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 0f56ee1..ac99bc1 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -120,6 +120,7 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
H5O_shared_t UNUSED *sh)
{
time_t *mesg, the_time;
+ uint32_t tmp_time; /* Temporary copy of the time */
int version; /* Version of mtime information */
void *ret_value; /* Return value */
@@ -139,7 +140,8 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
p+=3;
/* Get the time_t from the file */
- UINT32DECODE(p, the_time);
+ UINT32DECODE(p, tmp_time);
+ the_time=(time_t)tmp_time;
/* The return value */
if (NULL==(mesg = H5FL_MALLOC(time_t)))
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 8b53cb9..e004800 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -415,7 +415,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_all_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
+H5S_all_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection)
{
herr_t ret_value=SUCCEED; /* return value */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index c93c704..269b030 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -5934,7 +5934,6 @@ H5S_hyper_get_seq_list_gen(const H5S_t *space,H5S_sel_iter_t *iter,
size_t span_size=0; /* Number of bytes in current span to actually process */
size_t io_left; /* Number of elements left to process */
size_t io_bytes_left; /* Number of bytes left to process */
- size_t start_io_bytes_left; /* Initial number of bytes left to process */
size_t io_used; /* Number of elements processed */
size_t curr_seq=0; /* Number of sequence/offsets stored in the arrays */
size_t elem_size; /* Size of each element iterating over */
@@ -5969,7 +5968,7 @@ H5S_hyper_get_seq_list_gen(const H5S_t *space,H5S_sel_iter_t *iter,
/* Set the amount of elements to perform I/O on, etc. */
H5_CHECK_OVERFLOW(iter->elmt_left,hsize_t,size_t);
io_left=MIN(maxelem,(size_t)iter->elmt_left);
- start_io_bytes_left=io_bytes_left=io_left*elem_size;
+ io_bytes_left=io_left*elem_size;
/* Compute the cumulative size of dataspace dimensions */
for(i=fast_dim, acc=elem_size; i>=0; i--) {
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 9e5e726..6a07a47 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -383,7 +383,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_none_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
+H5S_none_copy(H5S_t *dst, const H5S_t UNUSED *src, hbool_t UNUSED share_selection)
{
herr_t ret_value=SUCCEED; /* return value */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 891e812..31d9a41 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -37,9 +37,11 @@
static int interface_initialize_g = 0;
/* Local functions */
+#ifdef LATER
static herr_t H5S_select_iter_block (const H5S_sel_iter_t *iter, hssize_t *start, hssize_t *end);
static htri_t H5S_select_iter_has_next_block (const H5S_sel_iter_t *iter);
static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter);
+#endif /* LATER */
/* Declare external the free list for hssize_t arrays */
H5FL_ARR_EXTERN(hssize_t);
@@ -843,6 +845,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_coords() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -884,6 +887,7 @@ H5S_select_iter_block (const H5S_sel_iter_t *iter, hssize_t *start, hssize_t *en
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
@@ -923,6 +927,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_nelmts() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -960,6 +965,7 @@ H5S_select_iter_has_next_block (const H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_has_next_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
@@ -1005,6 +1011,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_next() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -1044,6 +1051,7 @@ H5S_select_iter_next_block(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_next_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 6ab21d1..2de8db6 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -754,10 +754,8 @@ H5T_vlen_disk_getlen(void *_vl)
*-------------------------------------------------------------------------
*/
static void *
-H5T_vlen_disk_getptr(void *_vl)
+H5T_vlen_disk_getptr(void UNUSED *vl)
{
- uint8_t *vl=(uint8_t *)_vl; /* Pointer to the disk VL information */
-
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_disk_getptr)
/* check parameters */
diff --git a/test/dtypes.c b/test/dtypes.c
index 8393c5d..24f78a8 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1663,10 +1663,9 @@ test_compound_10(void)
cmpd_struct wdata[ARRAY_DIM];
cmpd_struct rdata[ARRAY_DIM];
hid_t file;
- hid_t arr_tid, cmpd_tid, cstr_id, vlstr_id, dup_tid;
+ hid_t arr_tid, cmpd_tid, cstr_id, vlstr_id;
hid_t space_id;
hid_t dset_id;
- hid_t xfer_pid;
hsize_t arr_dim[1] = {ARRAY_DIM}; /* Array dimensions */
hsize_t dim1[1];
void *t1, *t2;
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index f608c45..3cbef84 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -2419,7 +2419,7 @@ dump_fcpl(hid_t fid)
indentation(indent + COL);
printf("%s %d\n","OBJECTHEADER_VERSION", shhdr);
indentation(indent + COL);
- printf("%s %d\n","USERBLOCK_VERSION", userblock);
+ HDfprintf(stdout,"%s %Hu\n","USERBLOCK_VERSION", userblock);
indentation(indent + COL);
printf("%s %d\n","OFFSET_SIZE", off_size);
indentation(indent + COL);