diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-28 22:30:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 22:30:33 (GMT) |
commit | ad71539d30c799c497953c18352df37d83a75310 (patch) | |
tree | f078b6bc5aeef7042356f084454ba71e64879ea4 /tools | |
parent | b5eed1b56324fc07154c2e2d8251d2b87505ca23 (diff) | |
download | hdf5-ad71539d30c799c497953c18352df37d83a75310.zip hdf5-ad71539d30c799c497953c18352df37d83a75310.tar.gz hdf5-ad71539d30c799c497953c18352df37d83a75310.tar.bz2 |
Remove const from the argv tools/tests main sig. (#1390)
* Remove const from the argv tools/tests main sig.
* also remove const from H5_get_option and parse_command_line.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/src/h5copy/h5copy.c | 4 | ||||
-rw-r--r-- | tools/src/h5diff/h5diff_common.c | 2 | ||||
-rw-r--r-- | tools/src/h5diff/h5diff_common.h | 2 | ||||
-rw-r--r-- | tools/src/h5diff/h5diff_main.c | 4 | ||||
-rw-r--r-- | tools/src/h5diff/ph5diff_main.c | 7 | ||||
-rw-r--r-- | tools/src/h5dump/h5dump.c | 6 | ||||
-rw-r--r-- | tools/src/h5format_convert/h5format_convert.c | 6 | ||||
-rw-r--r-- | tools/src/h5jam/h5jam.c | 8 | ||||
-rw-r--r-- | tools/src/h5jam/h5unjam.c | 6 | ||||
-rw-r--r-- | tools/src/h5ls/h5ls.c | 2 | ||||
-rw-r--r-- | tools/src/h5perf/pio_perf.c | 8 | ||||
-rw-r--r-- | tools/src/h5perf/sio_perf.c | 8 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_main.c | 8 | ||||
-rw-r--r-- | tools/src/h5stat/h5stat.c | 6 | ||||
-rw-r--r-- | tools/src/misc/h5clear.c | 6 | ||||
-rw-r--r-- | tools/src/misc/h5delete.c | 2 | ||||
-rw-r--r-- | tools/src/misc/h5mkgrp.c | 6 | ||||
-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.h | 3 | ||||
-rw-r--r-- | tools/test/perform/sio_standalone.h | 3 | ||||
-rw-r--r-- | tools/test/perform/zip_perf.c | 4 |
23 files changed, 60 insertions, 57 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index 4e9a25e..6f10fee 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -212,7 +212,7 @@ parse_flag(const char *s_flag, unsigned *flag) */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t fid_src = H5I_INVALID_HID; hid_t fid_dst = H5I_INVALID_HID; @@ -242,7 +242,7 @@ main(int argc, const char *argv[]) } /* end if */ /* parse command line options */ - while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { + while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'd': oname_dst = HDstrdup(H5_optarg); diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index ec41d21..77a6785 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -206,7 +206,7 @@ parse_subset_params(const char *dset) */ void -parse_command_line(int argc, const char *argv[], const char **fname1, const char **fname2, +parse_command_line(int argc, const char *const *argv, const char **fname1, const char **fname2, const char **objname1, const char **objname2, diff_opt_t *opts) { int i; diff --git a/tools/src/h5diff/h5diff_common.h b/tools/src/h5diff/h5diff_common.h index 83f4255..35e5dfb 100644 --- a/tools/src/h5diff/h5diff_common.h +++ b/tools/src/h5diff/h5diff_common.h @@ -23,7 +23,7 @@ extern "C" { #endif void usage(void); -void parse_command_line(int argc, const char *argv[], const char **fname1, const char **fname2, +void parse_command_line(int argc, const char *const *argv, const char **fname1, const char **fname2, const char **objname1, const char **objname2, diff_opt_t *opts); void h5diff_exit(int status); void print_info(diff_opt_t *opts); diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index 37c215b..2a43b56 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -65,7 +65,7 @@ */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { int ret; int i; @@ -86,7 +86,7 @@ main(int argc, const char *argv[]) * process the command-line *------------------------------------------------------------------------- */ - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); + parse_command_line(argc, (const char *const *)argv, &fname1, &fname2, &objname1, &objname2, &opts); /* enable error reporting if command line option */ h5tools_error_report(); diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index ec78e49..8e5c3e8 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -44,7 +44,7 @@ static void ph5diff_worker(int); */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { int nID = 0; const char *fname1 = NULL; @@ -72,7 +72,7 @@ main(int argc, const char *argv[]) g_Parallel = 0; - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); + parse_command_line(argc, (const char *const *)argv, &fname1, &fname2, &objname1, &objname2, &opts); h5diff(fname1, fname2, objname1, objname2, &opts); @@ -83,7 +83,8 @@ main(int argc, const char *argv[]) /* Have the manager process the command-line */ if (nID == 0) { - parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &opts); + parse_command_line(argc, (const char *const *)argv, &fname1, &fname2, &objname1, &objname2, + &opts); h5diff(fname1, fname2, objname1, objname2, &opts); diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index a57b0e3..8c04bc7 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -828,7 +828,7 @@ free_handler(struct handler_t *hand, int len) *------------------------------------------------------------------------- */ static struct handler_t * -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { struct handler_t *hand = NULL; struct handler_t *last_dset = NULL; @@ -1329,7 +1329,7 @@ error: *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t fid = H5I_INVALID_HID; hid_t gid = H5I_INVALID_HID; @@ -1349,7 +1349,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - if ((hand = parse_command_line(argc, argv)) == NULL) { + if ((hand = parse_command_line(argc, (const char *const *)argv)) == NULL) { goto done; } diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c index ddf129c..b9572fe 100644 --- a/tools/src/h5format_convert/h5format_convert.c +++ b/tools/src/h5format_convert/h5format_convert.c @@ -94,7 +94,7 @@ usage(const char *prog) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char **argv) +parse_command_line(int argc, const char *const *argv) { int opt; @@ -383,7 +383,7 @@ error: *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t fid = H5I_INVALID_HID; @@ -394,7 +394,7 @@ main(int argc, const char *argv[]) h5tools_init(); /* Parse command line options */ - if (parse_command_line(argc, argv) < 0) + if (parse_command_line(argc, (const char *const *)argv) < 0) goto done; else if (verbose_g) HDfprintf(stdout, "Process command line options\n"); diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 07140b5..45978bb 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -22,7 +22,7 @@ herr_t write_pad(int ofile, hsize_t old_where, hsize_t *new_where); hsize_t compute_user_block_size(hsize_t); hsize_t copy_some_to_file(int, int, hsize_t, hsize_t, ssize_t); -void parse_command_line(int, const char *[]); +void parse_command_line(int, const char *const *); int do_clobber = FALSE; char *output_file = NULL; @@ -104,7 +104,7 @@ leave(int ret) */ void -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt = FALSE; @@ -149,7 +149,7 @@ parse_command_line(int argc, const char *argv[]) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { int ufid = -1; int h5fid = -1; @@ -174,7 +174,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/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index fa23b06..8ff354e 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -92,7 +92,7 @@ usage(const char *prog) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt = FALSE; @@ -172,7 +172,7 @@ leave(int ret) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t ifile = H5I_INVALID_HID; hid_t plist = H5I_INVALID_HID; @@ -189,7 +189,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - if (EXIT_FAILURE == parse_command_line(argc, argv)) + if (EXIT_FAILURE == parse_command_line(argc, (const char *const *)argv)) goto done; /* enable error reporting if command line option */ diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 17abf43..0d34574 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -2646,7 +2646,7 @@ leave(int ret) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t file_id = H5I_INVALID_HID; char * fname = NULL, *oname = NULL, *x = NULL; diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index bf5f62f..c233684 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -188,7 +188,7 @@ typedef struct _minmax { /* local functions */ static off_t parse_size_directive(const char *size); -static struct options *parse_command_line(int argc, char *argv[]); +static struct options *parse_command_line(int argc, const char *const *argv); static void run_test_loop(struct options *options); static int run_test(iotype iot, parameters parms, struct options *opts); static void output_all_info(minmax *mm, int count, int indent_level); @@ -260,7 +260,7 @@ main(int argc, char *argv[]) pio_comm_g = MPI_COMM_WORLD; h5_set_info_object(); - opts = parse_command_line(argc, argv); + opts = parse_command_line(argc, (const char *const *)argv); if (!opts) { exit_value = EXIT_FAILURE; @@ -1276,7 +1276,7 @@ report_parameters(struct options *opts) * Added 2D testing (Christian Chilan, 10. August 2005) */ static struct options * -parse_command_line(int argc, char *argv[]) +parse_command_line(int argc, const char *const *argv) { register int opt; struct options *cl_opts; @@ -1305,7 +1305,7 @@ parse_command_line(int argc, char *argv[]) cl_opts->h5_write_only = FALSE; /* Do both read and write by default */ cl_opts->verify = FALSE; /* No Verify data correctness by default */ - while ((opt = H5_get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) { + while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'a': cl_opts->h5_alignment = parse_size_directive(H5_optarg); diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index 0eb4508..f245b92 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -164,7 +164,7 @@ typedef struct { /* local functions */ static hsize_t parse_size_directive(const char *size); -static struct options *parse_command_line(int argc, const char *argv[]); +static struct options *parse_command_line(int argc, const char *const *argv); static void run_test_loop(struct options *options); static int run_test(iotype iot, parameters parms, struct options *opts); static void output_all_info(minmax *mm, int count, int indent_level); @@ -185,7 +185,7 @@ static void report_parameters(struct options *opts); * Modifications: */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { int exit_value = EXIT_SUCCESS; struct options *opts = NULL; @@ -197,7 +197,7 @@ main(int argc, const char *argv[]) output = stdout; - opts = parse_command_line(argc, argv); + opts = parse_command_line(argc, (const char *const *)argv); if (!opts) { exit_value = EXIT_FAILURE; @@ -817,7 +817,7 @@ report_parameters(struct options *opts) * Added multidimensional testing (Christian Chilan, April, 2008) */ static struct options * -parse_command_line(int argc, const char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt; struct options *cl_opts; diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 0a26500..68e37fd 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -18,7 +18,7 @@ /* Name of tool */ #define PROGRAMNAME "h5repack" -static int parse_command_line(int argc, const char **argv, pack_opt_t *options); +static int parse_command_line(int argc, const char *const *argv, pack_opt_t *options); static void leave(int ret) H5_ATTR_NORETURN; /* module-scoped variables */ @@ -507,7 +507,7 @@ set_sort_order(const char *form) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char **argv, pack_opt_t *options) +parse_command_line(int argc, const char *const *argv, pack_opt_t *options) { h5tools_vol_info_t in_vol_info; h5tools_vol_info_t out_vol_info; @@ -928,7 +928,7 @@ done: *------------------------------------------------------------------------- */ int -main(int argc, const char **argv) +main(int argc, char **argv) { pack_opt_t options; /*the global options */ int parse_ret; @@ -958,7 +958,7 @@ main(int argc, const char **argv) /* Initialize default indexing options */ sort_by = H5_INDEX_CRT_ORDER; - parse_ret = parse_command_line(argc, argv, &options); + parse_ret = parse_command_line(argc, (const char *const *)argv, &options); if (parse_ret < 0) { HDprintf("Error occurred while parsing command-line options\n"); h5tools_setstatus(EXIT_FAILURE); diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 6b01e49..f1156f0 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -830,7 +830,7 @@ hand_free(struct handler_t *hand) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char *argv[], struct handler_t **hand_ret) +parse_command_line(int argc, const char *const *argv, struct handler_t **hand_ret) { int opt; unsigned u; @@ -1677,7 +1677,7 @@ print_statistics(const char *name, const iter_t *iter) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { iter_t iter; const char * fname = NULL; @@ -1693,7 +1693,7 @@ main(int argc, const char *argv[]) HDmemset(&iter, 0, sizeof(iter)); - if (parse_command_line(argc, argv, &hand) < 0) + if (parse_command_line(argc, (const char *const *)argv, &hand) < 0) goto done; /* enable error reporting if command line option */ diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index face2f0..15c170d 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -109,7 +109,7 @@ usage(const char *prog) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char **argv) +parse_command_line(int argc, const char *const *argv) { int opt; @@ -224,7 +224,7 @@ leave(int ret) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { char * fname = NULL; /* File name */ hid_t fapl = H5I_INVALID_HID; /* File access property list */ @@ -240,7 +240,7 @@ main(int argc, const char *argv[]) h5tools_init(); /* Parse command line options */ - if (parse_command_line(argc, argv) < 0) + if (parse_command_line(argc, (const char *const *)argv) < 0) goto done; if (fname_g == NULL) diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c index 3c4f8d5..20e81a1 100644 --- a/tools/src/misc/h5delete.c +++ b/tools/src/misc/h5delete.c @@ -29,7 +29,7 @@ usage(void) } int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hbool_t quiet = FALSE; const char *name = NULL; diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index 1e66fce..1b8b23d 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -131,7 +131,7 @@ usage(const char *prog) *------------------------------------------------------------------------- */ static int -parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) +parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options) { int opt; /* Option from command line */ size_t curr_group; /* Current group name to copy */ @@ -281,7 +281,7 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) *------------------------------------------------------------------------- */ int -main(int argc, const char *argv[]) +main(int argc, char *argv[]) { hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ hid_t lcpl_id = H5I_INVALID_HID; /* Link creation property list ID */ @@ -303,7 +303,7 @@ main(int argc, const char *argv[]) } /* Parse command line */ - if (parse_command_line(argc, argv, ¶ms_g) < 0) { + if (parse_command_line(argc, (const char *const *)argv, ¶ms_g) < 0) { error_msg("unable to parse command line arguments\n"); leave(EXIT_FAILURE); } 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 e6769ec..f264d9b 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.h b/tools/test/perform/pio_standalone.h index f1fb946..e64a765 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -461,7 +461,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.h b/tools/test/perform/sio_standalone.h index 99cca75..57180e5 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -476,7 +476,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 37e69e2..74b1685 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': |