summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-11-26 00:21:14 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-11-26 00:21:14 (GMT)
commitdcae4544a3cf7b262aeb8e934b55b40fd59ca25a (patch)
tree2d769950d65efa63f61fccbcd3f089dd95e88e27 /tools
parentbe971e8ec2e8934d5157e247bbec3239ae91660c (diff)
parenta8892bb42d6f6e4fbc30fae0eb2b957f81c938b9 (diff)
downloadhdf5-dcae4544a3cf7b262aeb8e934b55b40fd59ca25a.zip
hdf5-dcae4544a3cf7b262aeb8e934b55b40fd59ca25a.tar.gz
hdf5-dcae4544a3cf7b262aeb8e934b55b40fd59ca25a.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'a8892bb42d6f6e4fbc30fae0eb2b957f81c938b9': (45 commits) Oops, remove more C99 designated initializers for VS 2010 compatibility. Add an #include to get a function declaration. Don't use C99 designated initializers, they're not compatible with Visual Studio 2010. Quiet some more maybe-uninitialized warnings---each is a false positive, *sigh*. This is more code that may not compile with VS2010, *sigh sigh*. Always warn on maybe-uninitialized. -Wincompatible-pointer-types was not available until GCC 5, so enable it only if that's the GCC version we're using. Only promote maybe-uninitialized warnings to errors on GCC 8. Even on GCC 8, there may be false positives at low optimization levels? I need to check. Only use -Werror=cast-function-type with GCC 8 and later. Put all of the -W options back into the order I found them in so that it's easier to compare old and new config/gnu-flags. Add new source files to CMakeLists.txt. Mention the -Werror= flags in libhdf5.settings.in. free -> HDfree Promote decleration-after-statement warnings to errors. Quiet decleration-after-statement warnings. Move a statement under some declarations since some vintages of Visual Studio don't like declarations after statements. Document H5D__chunk_mem_xfree_wrapper(). Undo accidental test deletion. Oops, delete a debug printf that snuck in here. Undo my changes to the HD macros, hadn't really intended those to be on this branch.... Make errors of some more warnings. Move disabled warnings to DEVELOPER_WARNING_CFLAGS. Put just one warning option on a line, and sort some of the options. Cast to the parameter type, H5VL_token_t *, instead of to unsigned char *. ...
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff.c3
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5tools_utils.c2
-rw-r--r--tools/src/h5import/h5import.c2
-rw-r--r--tools/src/h5repack/h5repack_main.c14
-rw-r--r--tools/test/h5repack/h5repackgentest.c1
6 files changed, 17 insertions, 9 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index b22af18..a4c4dd0 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -258,6 +258,8 @@ free_exclude_path_list(diff_opt_t *opts)
* Parameter:
* table_out [OUT] : return the list
*------------------------------------------------------------------------*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Wunused-but-set-variable"
static void
build_match_list (const char *objname1, trav_info_t *info1, const char *objname2, trav_info_t *info2,
trav_table_t ** table_out, diff_opt_t *opts)
@@ -374,6 +376,7 @@ done:
*table_out = table;
h5difftrace("build_match_list finish\n");
}
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index c83b88d..c952ec7 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2251,6 +2251,9 @@ static hsize_t character_compare(char *mem1, char *mem2, hsize_t i, size_t u,
*-------------------------------------------------------------------------
*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Wunused-but-set-variable"
+
static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2,
hsize_t i, int rank, hsize_t *dims, hsize_t *acc, hsize_t *pos, diff_opt_t *opts, const char *obj1, const char *obj2, int *ph)
{
@@ -2311,6 +2314,7 @@ static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2,
return nfound;
}
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
* Function: diff_float
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 7b47f4d..fdf2335 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -1279,7 +1279,7 @@ done:
int
h5tools_set_configured_fapl(hid_t fapl_id,
const char vfd_name[],
- void *fapl_t_ptr)
+ void *fapl_t_ptr H5_ATTR_UNUSED)
{
int ret_value = 1;
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 1eef5ab..65c2359 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -1428,7 +1428,7 @@ static int processConfigurationFile(char *infile, struct Input *in)
/* Initialize machine endian */
volatile uint32_t ibyte=0x01234567;
/* 0 for big endian, 1 for little endian. */
- if ((*((uint8_t*)(&ibyte))) == 0x67) {
+ if ((*((volatile uint8_t*)(&ibyte))) == 0x67) {
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
(void) HDfprintf(stderr, "%s", err11e);
return (-1);
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index c628beb..16899a3 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -281,7 +281,7 @@ int read_info(const char *filename, pack_opt_t *options)
char comp_info[1024];
FILE *fp = NULL;
char c;
- int i, rc = 1;
+ int i;
int ret_value = EXIT_SUCCESS;
if (NULL == (fp = HDfopen(filename, "r"))) {
@@ -412,7 +412,7 @@ set_sort_order(const char *form)
static
int parse_command_line(int argc, const char **argv, pack_opt_t* options)
{
- int opt;
+ int bound, opt;
int ret_value = 0;
/* parse command line options */
@@ -492,19 +492,21 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case 'j':
- options->low_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->low_bound < H5F_LIBVER_EARLIEST || options->low_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing low bound\n");
goto done;
}
+ options->low_bound = bound;
break;
case 'k':
- options->high_bound = (H5F_libver_t)HDatoi(opt_arg);
- if (options->high_bound < H5F_LIBVER_EARLIEST || options->high_bound > H5F_LIBVER_LATEST) {
+ bound = HDatoi(opt_arg);
+ if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing high bound\n");
goto done;
}
+ options->high_bound = bound;
break;
case 'c':
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index aaac285..87ca31c 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -314,7 +314,6 @@ generate_f32le(hbool_t external) {
int
main(void) {
int i = 0;
- int ret_value = 0;
for (i = 0; i < 2; i++) {
hbool_t external = (i & 1) ? TRUE : FALSE;