summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-11 15:29:46 (GMT)
committerGitHub <noreply@github.com>2022-07-11 15:29:46 (GMT)
commit460ee73a642db71872efa8e5c51dcf5aee554790 (patch)
tree196f786f98c1877e19cbcc6929a56250232f8805 /tools
parentbe5de999a92ec1ba7853827ff0b5966f3569e792 (diff)
downloadhdf5-460ee73a642db71872efa8e5c51dcf5aee554790.zip
hdf5-460ee73a642db71872efa8e5c51dcf5aee554790.tar.gz
hdf5-460ee73a642db71872efa8e5c51dcf5aee554790.tar.bz2
Adds format attribute to additional functions (#1868)
* Adds format attribute to (s|p)io_perf code * Added gcc format attribute to additional test code * 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/h5perf/pio_perf.c10
-rw-r--r--tools/src/h5perf/sio_perf.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 7ebbefa..2e82dd4 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -199,7 +199,7 @@ static int destroy_comm_world(void);
static void output_results(const struct options *options, const char *name, minmax *table, int table_size,
off_t data_size);
static void output_times(const struct options *options, const char *name, minmax *table, int table_size);
-static void output_report(const char *fmt, ...);
+static void output_report(const char *fmt, ...) H5_ATTR_FORMAT(printf, 1, 2);
static void print_indent(int indent);
static void usage(const char *prog);
static void report_parameters(struct options *opts);
@@ -346,7 +346,7 @@ run_test_loop(struct options *opts)
/* only processes doing PIO will run the tests */
if (doing_pio) {
- output_report("Number of processors = %ld\n", parms.num_procs);
+ output_report("Number of processors = %d\n", parms.num_procs);
/* multiply the xfer buffer size by 2 for each loop iteration */
for (buf_size = opts->min_xfer_size; buf_size <= opts->max_xfer_size; buf_size <<= 1) {
@@ -1059,14 +1059,14 @@ output_times(const struct options *opts, const char *name, minmax *table, int ta
/* Note: The maximum throughput uses the minimum amount of time & vice versa */
print_indent(4);
- output_report("Minimum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files, (total_mm.min));
+ output_report("Minimum Accumulated Time using %ld file(s): %7.5f s\n", opts->num_files, (total_mm.min));
print_indent(4);
- output_report("Average Accumulated Time using %d file(s): %7.5f s\n", opts->num_files,
+ output_report("Average Accumulated Time using %ld file(s): %7.5f s\n", opts->num_files,
(total_mm.sum / total_mm.num));
print_indent(4);
- output_report("Maximum Accumulated Time using %d file(s): %7.5f s\n", opts->num_files, (total_mm.max));
+ output_report("Maximum Accumulated Time using %ld file(s): %7.5f s\n", opts->num_files, (total_mm.max));
}
/*
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 5432d6c..6da073a 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -172,7 +172,7 @@ static void get_minmax(minmax *mm, double val);
static void accumulate_minmax_stuff(const minmax *mm, int count, minmax *total_mm);
static void output_results(const struct options *options, const char *name, minmax *table, int table_size,
off_t data_size);
-static void output_report(const char *fmt, ...);
+static void output_report(const char *fmt, ...) H5_ATTR_FORMAT(printf, 1, 2);
static void print_indent(int indent);
static void usage(const char *prog);
static void report_parameters(struct options *opts);