summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-06-28 14:10:43 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-06-28 14:10:43 (GMT)
commitd5130bb57332ce0049302c5836bbf666b23513cd (patch)
treefd710a4a2d419a0d3829a933905d8e5bef0f9e7f /tools
parent2c69584fb124c20e1dd06c31f2baf240b50b381c (diff)
downloadhdf5-d5130bb57332ce0049302c5836bbf666b23513cd.zip
hdf5-d5130bb57332ce0049302c5836bbf666b23513cd.tar.gz
hdf5-d5130bb57332ce0049302c5836bbf666b23513cd.tar.bz2
Updated configure & CMake compiler flags for GCC 8.x, along with corresponding
changes to warnhist script (and some extra improvements for condensing C++ and Java warnings), and fixed a bunch of warnings.
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_array.c8
-rw-r--r--tools/lib/h5tools.c6
-rw-r--r--tools/lib/h5tools_str.c6
-rw-r--r--tools/src/h5dump/h5dump_xml.c4
-rw-r--r--tools/src/h5format_convert/h5format_convert.c10
-rw-r--r--tools/test/misc/talign.c8
-rw-r--r--tools/test/perform/chunk_cache.c2
7 files changed, 22 insertions, 22 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 0169131..ac385c9 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -516,14 +516,14 @@ static hsize_t diff_datum(
if (H5Tis_variable_str(m_type)) {
h5difftrace("diff_datum H5T_STRING variable\n");
/* Get pointer to first string */
- s1 = *(char**) mem1;
+ s1 = *(char **)((void *)mem1);
if (s1)
size1 = HDstrlen(s1);
else
size1 = 0;
/* Get pointer to second string */
- s2 = *(char**) mem2;
+ s2 = *(char **)((void *)mem2);
if (s2)
size2 = HDstrlen(s2);
else
@@ -828,10 +828,10 @@ static hsize_t diff_datum(
size = H5Tget_size(memb_type);
/* get the number of sequence elements */
- nelmts = ((hvl_t *) mem1)->len;
+ nelmts = ((hvl_t *)((void *)mem1))->len;
for (j = 0; j < nelmts; j++)
- nfound += diff_datum(((char *) (((hvl_t *) mem1)->p)) + j * size, ((char *) (((hvl_t *) mem2)->p)) + j * size, memb_type, index,
+ nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *) mem2)->p)) + j * size, memb_type, index,
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
H5Tclose(memb_type);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index d93f7b0..f103647 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1283,7 +1283,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
mem = ((unsigned char*)_mem) + block_index * size;
if (H5Tis_variable_str(tid)) {
- s = *(char**) mem;
+ s = *(char **)((void *)mem);
if (s != NULL)
size = HDstrlen(s);
else
@@ -1375,10 +1375,10 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
for (block_index = 0; block_index < block_nelmts; block_index++) {
mem = ((unsigned char*)_mem) + block_index * size;
/* Get the number of sequence elements */
- nelmts = ((hvl_t *) mem)->len;
+ nelmts = ((hvl_t *)((void *)mem))->len;
/* dump the array element */
- if (render_bin_output(stream, container, memb, ((char *) (((hvl_t *) mem)->p)), nelmts) < 0) {
+ if (render_bin_output(stream, container, memb, ((char *) (((hvl_t *)((void *)mem))->p)), nelmts) < 0) {
H5Tclose(memb);
H5E_THROW(FAIL, H5E_tools_min_id_g, "render_bin_output failed")
}
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 3e8f1fe..17e3f18 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -787,7 +787,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
if(H5Tis_variable_str(type)) {
/* cp_vp is the pointer into the struct where a `char*' is stored. So we have
* to dereference the pointer to get the `char*' to pass to HDstrlen(). */
- s = *(char**) cp_vp;
+ s = *(char **)((void *)cp_vp);
if(s != NULL) size = HDstrlen(s);
}
else {
@@ -1240,7 +1240,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, "%s", OPT(info->vlen_pre, "("));
/* Get the number of sequence elements */
- nelmts = ((hvl_t *) cp_vp)->len;
+ nelmts = ((hvl_t *)((void *)cp_vp))->len;
for(i = 0; i < nelmts; i++) {
if(i) h5tools_str_append(str, "%s", OPT(info->vlen_sep, "," OPTIONAL_LINE_BREAK));
@@ -1264,7 +1264,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
ctx->indent_level++;
/* Dump the array element */
- h5tools_str_sprint(str, info, container, memb, ((char *) (((hvl_t *) cp_vp)->p)) + i * size, ctx);
+ h5tools_str_sprint(str, info, container, memb, ((char *) (((hvl_t *)((void *)cp_vp))->p)) + i * size, ctx);
ctx->indent_level--;
} /* end for */
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index ec76511..2fa9fd0 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -2881,7 +2881,7 @@ xml_print_refs(hid_t did, int source)
goto error;
}
- refbuf = (hobj_ref_t *) buf;
+ refbuf = (hobj_ref_t *)((void *)buf);
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -3057,7 +3057,7 @@ xml_print_strs(hid_t did, int source)
for (i = 0; i < (hsize_t)ssiz; i++) {
if (is_vlstr) {
- onestring = *(char **) bp;
+ onestring = *(char **)((void *)bp);
if (onestring)
str_size = HDstrlen(onestring);
}
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index b9ed9ce..257a047 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -259,7 +259,7 @@ convert(hid_t fid, const char *dname)
error_msg("unable to get the chunk indexing type for \"%s\"\n", dname);
h5tools_setstatus(EXIT_FAILURE);
goto error;
- }
+ }
else if(verbose_g)
HDfprintf(stdout, "Retrieve the dataset's chunk indexing type\n");
@@ -268,11 +268,11 @@ convert(hid_t fid, const char *dname)
HDfprintf(stdout, "Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
- }
+ }
else if (verbose_g)
HDfprintf(stdout, "Dataset's chunk indexing type is not version 1 B-tree\n");
- break;
+ break;
case H5D_CONTIGUOUS:
if(verbose_g)
@@ -302,8 +302,8 @@ convert(hid_t fid, const char *dname)
if(noop_g) {
if(verbose_g)
HDfprintf(stdout, "Not converting the dataset\n");
- h5tools_setstatus(EXIT_SUCCESS);
- goto done;
+ h5tools_setstatus(EXIT_SUCCESS);
+ goto done;
}
if(verbose_g)
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index ce866b4..08ebfc7 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -130,7 +130,7 @@ int main(void)
set = H5Dopen2(fil, setname, H5P_DEFAULT);
H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
H5Dclose(set);
out:
@@ -151,7 +151,7 @@ out:
if(mname)
H5free_memory(mname);
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
mname = H5Tget_member_name(fix, 1);
printf("Data comparison:\n"
"%14s (%2d) %6f = %f\n"
@@ -162,7 +162,7 @@ out:
if(mname)
H5free_memory(mname);
- fptr = (float *)(data + H5Tget_member_offset(fix, 2));
+ fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2)));
mname = H5Tget_member_name(fix, 2);
printf("%14s (%2d) %6f = %f\n"
" %6f = %6f\n",
@@ -172,7 +172,7 @@ out:
if(mname)
H5free_memory(mname);
- fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
printf("\n"
"Short circuit\n"
" %6f = %f\n"
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index 47734b6..3962edd 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -79,7 +79,7 @@ counter (unsigned flags, size_t cd_nelmts,
}
/*---------------------------------------------------------------------------*/
-double retrieve_time(void)
+static double retrieve_time(void)
{
#ifdef H5_HAVE_GETTIMEOFDAY
struct timeval t;