From f64b2c0f25e4e1b27240b3b871a454a1d6f52fde Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Sat, 29 Jan 2022 14:30:54 -0600 Subject: 1 8 Remove const from the argv tools/tests main sig. #1390 (#1406) --- tools/h5copy/h5copy.c | 2 +- tools/h5diff/h5diff_common.c | 4 ++-- tools/h5diff/h5diff_common.h | 2 +- tools/h5diff/h5diff_main.c | 6 +++--- tools/h5diff/ph5diff_main.c | 7 ++++--- tools/h5dump/binread.c | 2 +- tools/h5dump/h5dump.c | 8 ++++---- tools/h5jam/getub.c | 8 ++++---- tools/h5jam/h5jam.c | 18 +++++++++--------- tools/h5jam/h5unjam.c | 6 +++--- tools/h5jam/tellub.c | 6 +++--- tools/h5ls/h5ls.c | 2 +- tools/h5repack/h5repack_main.c | 10 +++++----- tools/h5stat/h5stat.c | 8 ++++---- tools/lib/h5tools_utils.c | 2 +- tools/lib/h5tools_utils.h | 2 +- tools/misc/h5mkgrp.c | 6 +++--- tools/perform/pio_perf.c | 12 ++++++------ tools/perform/pio_standalone.c | 2 +- tools/perform/pio_standalone.h | 2 +- tools/perform/sio_perf.c | 12 ++++++------ tools/perform/sio_standalone.c | 2 +- tools/perform/sio_standalone.h | 2 +- 23 files changed, 66 insertions(+), 65 deletions(-) diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index f618914..8b61918 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/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; diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 4a99f4c..4a36ef4 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -194,7 +194,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; @@ -271,7 +271,7 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char break; case 'q': - /* use quiet mode; supress the message "0 differences found" */ + /* use quiet mode; suppress the message "0 differences found" */ opts->mode_quiet = 1; break; diff --git a/tools/h5diff/h5diff_common.h b/tools/h5diff/h5diff_common.h index 83f4255..35e5dfb 100644 --- a/tools/h5diff/h5diff_common.h +++ b/tools/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/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index a835953..2a43b56 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -33,7 +33,7 @@ * * Modifications: July 2004 * Introduced the four modes: - * Normal mode: print the number of differences found and where they occured + * Normal mode: print the number of differences found and where they occurred * Report mode: print the above plus the differences * Verbose mode: print the above plus a list of objects and warnings * Quiet mode: do not print output @@ -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/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c index ec78e49..8e5c3e8 100644 --- a/tools/h5diff/ph5diff_main.c +++ b/tools/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/h5dump/binread.c b/tools/h5dump/binread.c index d6206ca..341a085 100644 --- a/tools/h5dump/binread.c +++ b/tools/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/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 8638c08..f8b5872 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -873,7 +873,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; } @@ -1497,7 +1497,7 @@ main(int argc, const char *argv[]) dset_table = table_list.tables[0].dset_table; type_table = table_list.tables[0].type_table; - /* does there exist unamed committed datatype */ + /* does there exist unnamed committed datatype */ for (u = 0; u < type_table->nobjs; u++) if (!type_table->objs[u].recorded) { unamedtype = 1; diff --git a/tools/h5jam/getub.c b/tools/h5jam/getub.c index 095aba5..6f35518 100644 --- a/tools/h5jam/getub.c +++ b/tools/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/h5jam/h5jam.c b/tools/h5jam/h5jam.c index 1a85f24..cbbdc4a 100644 --- a/tools/h5jam/h5jam.c +++ b/tools/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; @@ -108,7 +108,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; @@ -153,7 +153,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; @@ -178,7 +178,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(); @@ -362,7 +362,7 @@ done: * Purpose: Copy part of the input file to output. * infid: fd of file to read * outfid: fd of file to write - * startin: offset of where to read from infid + * starting: offset of where to read from infid * startout: offset of where to write to outfid * limit: bytes to read/write * @@ -377,7 +377,7 @@ done: *------------------------------------------------------------------------- */ hsize_t -copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, ssize_t limit) +copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssize_t limit) { char buf[1024]; h5_stat_t sbuf; @@ -390,9 +390,9 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, ssiz ssize_t toend; ssize_t fromend; - if (startin > startout) { + if (starting > startout) { /* this case is prohibited */ - error_msg("copy_some_to_file: panic: startin > startout?\n"); + error_msg("copy_some_to_file: panic: starting > startout?\n"); exit(EXIT_FAILURE); } /* end if */ @@ -413,7 +413,7 @@ copy_some_to_file(int infid, int outfid, hsize_t startin, hsize_t startout, ssiz return 0; toend = (ssize_t)startout + howmuch; - fromend = (ssize_t)startin + howmuch; + fromend = (ssize_t)starting + howmuch; if (howmuch > 512) { to = toend - 512; diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 04fd27a..242a584 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -96,7 +96,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; @@ -176,7 +176,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; @@ -193,7 +193,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/h5jam/tellub.c b/tools/h5jam/tellub.c index 54f545a..90e1072 100644 --- a/tools/h5jam/tellub.c +++ b/tools/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/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 1f9f504..ef230e6 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -2587,7 +2587,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/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 847d475..40931b1 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/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 */ @@ -268,7 +268,7 @@ read_info(const char *filename, pack_opt_t *options) goto done; } - /* find begining of info */ + /* find beginning of info */ i = 0; c = '0'; while (c != ' ') { @@ -376,7 +376,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) { int opt; int ret_value = 0; @@ -604,7 +604,7 @@ done: *------------------------------------------------------------------------- */ int -main(int argc, const char **argv) +main(int argc, char **argv) { pack_opt_t options; /*the global options */ int parse_ret; @@ -634,7 +634,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/h5stat/h5stat.c b/tools/h5stat/h5stat.c index eef8efa5..3ef70e2 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -31,7 +31,7 @@ #define H5_NFILTERS_IMPL \ 8 /* Number of currently implemented filters + one to \ accommodate for user-define filters + one \ - to accomodate datasets whithout any filters */ + to accommodate datasets without any filters */ /* Datatype statistics for datasets */ typedef struct dtype_info_t { @@ -817,7 +817,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; @@ -1588,7 +1588,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; @@ -1604,7 +1604,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/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index e066416..0f2279c 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -176,7 +176,7 @@ help_ref_msg(FILE *output) *------------------------------------------------------------------------- */ int -get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts) +get_option(int argc, char **argv, const char *opts, const struct 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/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 34ac89b..63fda3f 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -88,7 +88,7 @@ typedef struct long_options { * this gets returned from get_option */ } long_options; -H5TOOLS_DLL int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt); +H5TOOLS_DLL int get_option(int argc, char **argv, const char *opt, const struct long_options *l_opt); /* * end get_option section */ diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c index 7e92c83..9b0d8f0 100644 --- a/tools/misc/h5mkgrp.c +++ b/tools/misc/h5mkgrp.c @@ -112,7 +112,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 */ @@ -203,7 +203,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 */ @@ -225,7 +225,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/perform/pio_perf.c b/tools/perform/pio_perf.c index 51c7999..333e209 100644 --- a/tools/perform/pio_perf.c +++ b/tools/perform/pio_perf.c @@ -298,7 +298,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); @@ -370,7 +370,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; @@ -689,7 +689,7 @@ run_test(iotype iot, parameters parms, struct options *opts) output_results(opts, "Raw Data Write", write_raw_mm_table, parms.num_iters, raw_size); } /* end if */ - /* show mpi write statics */ + /* show mpi write statistics */ if (pio_debug_level >= 3) { /* output all of the times for all iterations */ print_indent(3); @@ -755,7 +755,7 @@ run_test(iotype iot, parameters parms, struct options *opts) output_results(opts, "Raw Data Read", read_raw_mm_table, parms.num_iters, raw_size); } /* end if */ - /* show mpi read statics */ + /* show mpi read statistics */ if (pio_debug_level >= 3) { /* output all of the times for all iterations */ print_indent(3); @@ -1257,7 +1257,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; @@ -1286,7 +1286,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 = get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) { + while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'a': cl_opts->h5_alignment = parse_size_directive(opt_arg); diff --git a/tools/perform/pio_standalone.c b/tools/perform/pio_standalone.c index 0a9bfc0..c046d65 100644 --- a/tools/perform/pio_standalone.c +++ b/tools/perform/pio_standalone.c @@ -32,7 +32,7 @@ int opt_ind = 1; /*token pointer */ const char *opt_arg; /*flag argument (or value) */ int -get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts) +get_option(int argc, char **argv, const char *opts, const struct 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/perform/pio_standalone.h b/tools/perform/pio_standalone.h index 87da2ee..f08cbd0 100644 --- a/tools/perform/pio_standalone.h +++ b/tools/perform/pio_standalone.h @@ -493,7 +493,7 @@ typedef struct long_options { * this gets returned from get_option */ } long_options; -extern int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt); +extern int get_option(int argc, char **argv, const char *opt, const struct long_options *l_opt); extern int nCols; /*max number of columns for outputting */ diff --git a/tools/perform/sio_perf.c b/tools/perform/sio_perf.c index 54bdde0..d7f13c6 100644 --- a/tools/perform/sio_perf.c +++ b/tools/perform/sio_perf.c @@ -301,7 +301,7 @@ typedef struct _minmax { /* local functions */ static hsize_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); @@ -334,7 +334,7 @@ main(int argc, 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; @@ -564,7 +564,7 @@ run_test(iotype iot, parameters parms, struct options *opts) output_results(opts, "Raw Data Write", write_raw_mm_table, parms.num_iters, raw_size); } /* end if */ - /* show sys write statics */ + /* show sys write statistics */ #if 0 if (sio_debug_level >= 3) { /* output all of the times for all iterations */ @@ -610,7 +610,7 @@ run_test(iotype iot, parameters parms, struct options *opts) output_results(opts, "Raw Data Read", read_raw_mm_table, parms.num_iters, raw_size); } /* end if */ - /* show mpi read statics */ + /* show mpi read statistics */ #if 0 if (sio_debug_level >= 3) { /* output all of the times for all iterations */ @@ -954,7 +954,7 @@ report_parameters(struct options *opts) * Added multidimensional testing (Christian Chilan, April, 2008) */ static struct options * -parse_command_line(int argc, char *argv[]) +parse_command_line(int argc, const char *const *argv) { int opt; struct options *cl_opts; @@ -994,7 +994,7 @@ parse_command_line(int argc, char *argv[]) cl_opts->h5_extendable = FALSE; /* Use extendable dataset */ cl_opts->verify = FALSE; /* No Verify data correctness by default */ - while ((opt = get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) { + while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'a': cl_opts->h5_alignment = parse_size_directive(opt_arg); diff --git a/tools/perform/sio_standalone.c b/tools/perform/sio_standalone.c index abc0777..fee4d66 100644 --- a/tools/perform/sio_standalone.c +++ b/tools/perform/sio_standalone.c @@ -28,7 +28,7 @@ int opt_ind = 1; /*token pointer */ const char *opt_arg; /*flag argument (or value) */ int -get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts) +get_option(int argc, char **argv, const char *opts, const struct 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/perform/sio_standalone.h b/tools/perform/sio_standalone.h index 8affd49..48d9ed4 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -508,7 +508,7 @@ typedef struct long_options { * this gets returned from get_option */ } long_options; -extern int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt); +extern int get_option(int argc, char **argv, const char *opt, const struct long_options *l_opt); extern int nCols; /*max number of columns for outputting */ -- cgit v0.12