Commit acc8b75a authored by gsell's avatar gsell

- several "duplicate const" warnings fixed

- some useless tests whether an unsigned int is less than zero removed
parent 078a51d6
......@@ -130,13 +130,7 @@ h5u_set_num_points (
hsize_t start;
hsize_t dmax = H5S_UNLIMITED;
if (nparticles < 0)
H5_RETURN_ERROR (
H5_ERR_INVAL,
"Invalid number of particles: %lld!\n",
(long long)nparticles);
#ifndef H5_HAVE_PARALLEL
#ifndef H5_HAVE_PARALLEL
/*
if we are not using parallel-IO, there is enough information
to know that we can short circuit this routine. However,
......@@ -231,7 +225,7 @@ h5u_set_num_points (
h5_err_t
h5u_has_view (
const const h5_file_t fh
const h5_file_t fh
) {
h5_file_p f = (h5_file_p)fh;
H5_CORE_API_ENTER (h5_ssize_t, "f=%p", f);
......
......@@ -23,7 +23,7 @@
h5_err_t
h5priv_link_exists_ (
const hid_t loc_id,
const char const* path[],
const char *const path[],
size_t size
) {
H5_PRIV_FUNC_ENTER (h5_err_t,
......
......@@ -163,12 +163,12 @@ hdf5_create_group (
h5_err_t
h5priv_link_exists_ (
const hid_t loc_id,
const char const* path[],
const char *const path[],
size_t size
);
#define h5priv_link_exists(loc_id, ...) \
(h5priv_link_exists_ (loc_id, \
(const char const*[]){__VA_ARGS__}, \
(const char *const[]){__VA_ARGS__}, \
PP_NARG(__VA_ARGS__)))
......@@ -195,7 +195,7 @@ hdf5_close_group (
static inline hid_t
h5priv_create_group (
const hid_t loc_id,
const char const* group_name
const char *const group_name
) {
H5_PRIV_FUNC_ENTER (hid_t,
"loc_id=%lld, (%s), group_name=%s",
......@@ -214,7 +214,7 @@ h5priv_create_group (
static inline hid_t
h5priv_open_group (
const hid_t loc_id,
const char const* group_name
const char *const group_name
) {
H5_PRIV_FUNC_ENTER (hid_t,
"loc_id=%lld, (%s), group_name=%s",
......@@ -809,17 +809,17 @@ get_class_type_name (
const hid_t class_id
) {
const char* const map[] = {
[H5T_INTEGER] "H5T_INTEGER",
[H5T_FLOAT] "H5T_FLOAT",
[H5T_TIME] "H5T_TIME",
[H5T_STRING] "H5T_STRING",
[H5T_BITFIELD] "H5T_BITFIELD",
[H5T_OPAQUE] "H5T_OPAQUE",
[H5T_COMPOUND] "H5T_COMPOUND",
[H5T_REFERENCE] "H5T_REFERENCE",
[H5T_ENUM] "H5T_ENUM",
[H5T_VLEN] "H5T_VLEN",
[H5T_ARRAY] "H5T_ARRAY"
[H5T_INTEGER] = "H5T_INTEGER",
[H5T_FLOAT] = "H5T_FLOAT",
[H5T_TIME] = "H5T_TIME",
[H5T_STRING] = "H5T_STRING",
[H5T_BITFIELD] = "H5T_BITFIELD",
[H5T_OPAQUE] = "H5T_OPAQUE",
[H5T_COMPOUND] = "H5T_COMPOUND",
[H5T_REFERENCE] = "H5T_REFERENCE",
[H5T_ENUM] = "H5T_ENUM",
[H5T_VLEN] = "H5T_VLEN",
[H5T_ARRAY] = "H5T_ARRAY"
};
if (class_id < 0 || class_id >= H5T_NCLASSES) {
return ("[unknown]");
......
......@@ -62,7 +62,7 @@ grow_strlist (
ssize_t
h5priv_insert_strlist (
h5_strlist_t** list,
const char const* item,
const char *const item,
size_t idx
) {
H5_PRIV_API_ENTER (ssize_t,
......
......@@ -160,7 +160,7 @@ h5_err_t
h5priv_free_strlist (h5_strlist_t**);
ssize_t
h5priv_insert_strlist (h5_strlist_t**, const char const*, size_t);
h5priv_insert_strlist (h5_strlist_t**, const char *const, size_t);
ssize_t
h5priv_find_strlist (h5_strlist_t*, const char* const item);
......
......@@ -136,7 +136,6 @@ h5tpriv_traverse_tv (
unsigned int* i
) {
assert (i != NULL);
if (*i < 0) i = 0;
if (*i >= m->num_loc_vertices[m->num_loaded_levels-1]) {
return NULL;
}
......@@ -166,7 +165,6 @@ h5tpriv_traverse_td (
unsigned int* i
) {
assert (i != NULL);
if (*i < 0) i = 0;
h5t_td_entry_t* entry = h5priv_htraverse (&m->adjacencies.td_hash, i);
h5_loc_idlist_t* result = NULL;
if (entry) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment