summaryrefslogtreecommitdiffstats
path: root/tools/src/h5perf/sio_perf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5perf/sio_perf.c')
-rw-r--r--tools/src/h5perf/sio_perf.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 227ee4e..cc6a1c0 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -172,8 +172,8 @@ 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 print_indent(register int indent);
+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);
@@ -190,10 +190,8 @@ main(int argc, char *argv[])
int exit_value = EXIT_SUCCESS;
struct options *opts = NULL;
-#ifndef STANDALONE
/* Initialize h5tools lib */
h5tools_init();
-#endif
output = stdout;
@@ -299,25 +297,25 @@ run_test_loop(struct options *opts)
static int
run_test(iotype iot, parameters parms, struct options *opts)
{
- results res;
- register int i, ret_value = SUCCESS;
- off_t raw_size;
- minmax *write_sys_mm_table = NULL;
- minmax *write_mm_table = NULL;
- minmax *write_gross_mm_table = NULL;
- minmax *write_raw_mm_table = NULL;
- minmax *read_sys_mm_table = NULL;
- minmax *read_mm_table = NULL;
- minmax *read_gross_mm_table = NULL;
- minmax *read_raw_mm_table = NULL;
- minmax write_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax write_mm = {0.0, 0.0, 0.0, 0};
- minmax write_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax write_raw_mm = {0.0, 0.0, 0.0, 0};
- minmax read_sys_mm = {0.0, 0.0, 0.0, 0};
- minmax read_mm = {0.0, 0.0, 0.0, 0};
- minmax read_gross_mm = {0.0, 0.0, 0.0, 0};
- minmax read_raw_mm = {0.0, 0.0, 0.0, 0};
+ results res;
+ int i, ret_value = SUCCESS;
+ off_t raw_size;
+ minmax *write_sys_mm_table = NULL;
+ minmax *write_mm_table = NULL;
+ minmax *write_gross_mm_table = NULL;
+ minmax *write_raw_mm_table = NULL;
+ minmax *read_sys_mm_table = NULL;
+ minmax *read_mm_table = NULL;
+ minmax *read_gross_mm_table = NULL;
+ minmax *read_raw_mm_table = NULL;
+ minmax write_sys_mm = {0.0, 0.0, 0.0, 0};
+ minmax write_mm = {0.0, 0.0, 0.0, 0};
+ minmax write_gross_mm = {0.0, 0.0, 0.0, 0};
+ minmax write_raw_mm = {0.0, 0.0, 0.0, 0};
+ minmax read_sys_mm = {0.0, 0.0, 0.0, 0};
+ minmax read_mm = {0.0, 0.0, 0.0, 0};
+ minmax read_gross_mm = {0.0, 0.0, 0.0, 0};
+ minmax read_raw_mm = {0.0, 0.0, 0.0, 0};
raw_size = (off_t)parms.num_bytes;
parms.io_type = iot;
@@ -647,7 +645,9 @@ output_report(const char *fmt, ...)
va_list ap;
HDva_start(ap, fmt);
+ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(output, fmt, ap);
+ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
HDva_end(ap);
}
@@ -657,10 +657,9 @@ output_report(const char *fmt, ...)
* things.
* Return: Nothing
* Programmer: Bill Wendling, 29. October 2001
- * Modifications:
*/
static void
-print_indent(register int indent)
+print_indent(int indent)
{
indent *= TAB_SPACE;
@@ -675,25 +674,25 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"GB%s",
val / ONE_GB, end);
else
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"MB%s",
val / ONE_MB, end);
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"KB%s",
val / ONE_KB, end);
}
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"%s",
val, end);
}