summaryrefslogtreecommitdiffstats
path: root/tools/h5jam/h5jam.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-01-29 20:30:54 (GMT)
committerGitHub <noreply@github.com>2022-01-29 20:30:54 (GMT)
commitf64b2c0f25e4e1b27240b3b871a454a1d6f52fde (patch)
treefaee84970cb4ae7628ed106e6e898a91ed1f43a4 /tools/h5jam/h5jam.c
parentf8578a5e5c1316009a40b2e0ce07e5316fefeba8 (diff)
downloadhdf5-f64b2c0f25e4e1b27240b3b871a454a1d6f52fde.zip
hdf5-f64b2c0f25e4e1b27240b3b871a454a1d6f52fde.tar.gz
hdf5-f64b2c0f25e4e1b27240b3b871a454a1d6f52fde.tar.bz2
1 8 Remove const from the argv tools/tests main sig. #1390 (#1406)
Diffstat (limited to 'tools/h5jam/h5jam.c')
-rw-r--r--tools/h5jam/h5jam.c18
1 files changed, 9 insertions, 9 deletions
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;