summaryrefslogtreecommitdiffstats
path: root/tools/src/h5perf
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-01-28 22:30:33 (GMT)
committerGitHub <noreply@github.com>2022-01-28 22:30:33 (GMT)
commitad71539d30c799c497953c18352df37d83a75310 (patch)
treef078b6bc5aeef7042356f084454ba71e64879ea4 /tools/src/h5perf
parentb5eed1b56324fc07154c2e2d8251d2b87505ca23 (diff)
downloadhdf5-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/h5perf')
-rw-r--r--tools/src/h5perf/pio_perf.c8
-rw-r--r--tools/src/h5perf/sio_perf.c8
2 files changed, 8 insertions, 8 deletions
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;