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/src/h5diff | |
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/src/h5diff')
-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 |
4 files changed, 8 insertions, 7 deletions
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); |