diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-31 05:06:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 05:06:01 (GMT) |
commit | 79d93d1661563f3570b2d0128a07bc7d7fc93ea8 (patch) | |
tree | d2be68b11b61a649a61fdf5cdca8d5499cf2a329 /tools/test | |
parent | 3b575625cbae00f24217a41d3ef2eb787b2e45d4 (diff) | |
download | hdf5-79d93d1661563f3570b2d0128a07bc7d7fc93ea8.zip hdf5-79d93d1661563f3570b2d0128a07bc7d7fc93ea8.tar.gz hdf5-79d93d1661563f3570b2d0128a07bc7d7fc93ea8.tar.bz2 |
1 10 Remove const from the argv tools/tests main sig. #1390 (#1405)
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5dump/binread.c | 2 | ||||
-rw-r--r-- | tools/test/h5jam/getub.c | 8 | ||||
-rw-r--r-- | tools/test/h5jam/tellub.c | 6 | ||||
-rw-r--r-- | tools/test/perform/pio_standalone.c | 2 | ||||
-rw-r--r-- | tools/test/perform/pio_standalone.h | 3 | ||||
-rw-r--r-- | tools/test/perform/sio_standalone.c | 2 | ||||
-rw-r--r-- | tools/test/perform/sio_standalone.h | 3 | ||||
-rw-r--r-- | tools/test/perform/zip_perf.c | 6 |
8 files changed, 17 insertions, 15 deletions
diff --git a/tools/test/h5dump/binread.c b/tools/test/h5dump/binread.c index d6206ca..341a085 100644 --- a/tools/test/h5dump/binread.c +++ b/tools/test/h5dump/binread.c @@ -59,7 +59,7 @@ usage(void) */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { FILE * stream; size_t numread; diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index fd21d6c..4e67e98 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -15,7 +15,7 @@ #include "h5tools.h" #include "h5tools_utils.h" -void parse_command_line(int argc, const char *argv[]); +void parse_command_line(int argc, const char *const *argv); /* Name of tool */ #define PROGRAM_NAME "getub" @@ -52,7 +52,7 @@ usage(const char *prog) *------------------------------------------------------------------------- */ void -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt; @@ -77,7 +77,7 @@ parse_command_line(int argc, const char *argv[]) } /* end parse_command_line() */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { int fd = H5I_INVALID_HID; unsigned size; @@ -91,7 +91,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - parse_command_line(argc, argv); + parse_command_line(argc, (const char *const *)argv); if (NULL == nbytes) { /* missing arg */ diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index 46e5ae3..5272bd4 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -56,7 +56,7 @@ usage(const char *prog) */ static void -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt; @@ -98,7 +98,7 @@ leave(int ret) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { char * ifname; hid_t ifile = H5I_INVALID_HID; @@ -113,7 +113,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - parse_command_line(argc, argv); + parse_command_line(argc, (const char *const *)argv); /* enable error reporting if command line option */ h5tools_error_report(); diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c index 032bfba..9ea47d6 100644 --- a/tools/test/perform/pio_standalone.c +++ b/tools/test/perform/pio_standalone.c @@ -23,7 +23,7 @@ int nCols = 80; int -get_option(int argc, const char **argv, const char *opts, const struct h5_long_options *l_opts) +get_option(int argc, char **argv, const char *opts, const struct h5_long_options *l_opts) { static int sp = 1; /* character index in current token */ int opt_opt = '?'; /* option character passed back to user */ diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index 23cd0e8..5cc9a63 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -483,7 +483,8 @@ struct h5_long_options { */ }; -extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt); +extern int H5_get_option(int argc, const char *const *argv, const char *opt, + const struct h5_long_options *l_opt); extern int nCols; /*max number of columns for outputting */ diff --git a/tools/test/perform/sio_standalone.c b/tools/test/perform/sio_standalone.c index 7c22b53..ace6b7e 100644 --- a/tools/test/perform/sio_standalone.c +++ b/tools/test/perform/sio_standalone.c @@ -23,7 +23,7 @@ int nCols = 80; int -get_option(int argc, const char **argv, const char *opts, const struct h5_long_options *l_opts) +get_option(int argc, char **argv, const char *opts, const struct h5_long_options *l_opts) { static int sp = 1; /* character index in current token */ int opt_opt = '?'; /* option character passed back to user */ diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index bf925f1..2fc644f 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -498,7 +498,8 @@ struct h5_long_options { */ }; -extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt); +extern int H5_get_option(int argc, const char *const *argv, const char *opt, + const struct h5_long_options *l_opt); extern int nCols; /*max number of columns for outputting */ diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 123fb98..5db97d1 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -489,7 +489,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long * Modifications: */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { unsigned long min_buf_size = 128 * ONE_KB, max_buf_size = ONE_MB; unsigned long file_size = 64 * ONE_MB; @@ -500,7 +500,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) > 0) { + while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) > 0) { switch ((char)opt) { case '0': case '1': @@ -551,7 +551,7 @@ main(int argc, const char *argv[]) } if (min_buf_size > max_buf_size) - error("minmum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size); + error("minimum buffer size (%d) exceeds maximum buffer size (%d)", min_buf_size, max_buf_size); HDfprintf(stdout, "Filesize: %ld\n", file_size); |