summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-05 18:14:26 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-11-05 18:14:26 (GMT)
commit34eff2aae501e0276f58d2113c02d15b51fca7d8 (patch)
treeee23f90c1458653e680c2a1f088f8f6d071e2b95 /tools
parentafd4b291315e39e3966eadaf8ae9894b30e9504e (diff)
downloadhdf5-34eff2aae501e0276f58d2113c02d15b51fca7d8.zip
hdf5-34eff2aae501e0276f58d2113c02d15b51fca7d8.tar.gz
hdf5-34eff2aae501e0276f58d2113c02d15b51fca7d8.tar.bz2
Change some GCC warnings to errors. Fix code to quiet some warnings.
Diffstat (limited to 'tools')
-rw-r--r--tools/src/h5import/h5import.c2
-rw-r--r--tools/src/h5repack/h5repack_main.c14
2 files changed, 9 insertions, 7 deletions
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':