summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-07-03 16:12:32 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-07-03 16:12:32 (GMT)
commitdfcb3cebf17c20b6dfc0a1dd5178c2e2d01c4422 (patch)
tree6dd345c9832ff210c96dc7d642ba2e2f4d394bf6 /perform/pio_perf.c
parent6da129cef05328a6935bb6ce65319944cdce5a95 (diff)
downloadhdf5-dfcb3cebf17c20b6dfc0a1dd5178c2e2d01c4422.zip
hdf5-dfcb3cebf17c20b6dfc0a1dd5178c2e2d01c4422.tar.gz
hdf5-dfcb3cebf17c20b6dfc0a1dd5178c2e2d01c4422.tar.bz2
[svn-r23862] Change printfs in perform output and h5dump to prevent overflow.
This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450 Tested on Jam.
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 337e982..a47754b 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -1116,14 +1116,14 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output, "%HdGB%s", val / ONE_GB, end);
+ HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""GB%s", val / ONE_GB, end);
else
- HDfprintf(output, "%HdMB%s", val / ONE_MB, end);
+ HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""MB%s", val / ONE_MB, end);
} else {
- HDfprintf(output, "%HdKB%s", val / ONE_KB, end);
+ HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""KB%s", val / ONE_KB, end);
}
} else {
- HDfprintf(output, "%Hd%s", val, end);
+ HDfprintf(output, "%" H5_PRINTF_LL_WIDTH "d""%s", val, end);
}
}
@@ -1150,12 +1150,12 @@ report_parameters(struct options *opts)
HDfprintf(output, "rank %d: IO API=", rank);
print_io_api(opts->io_types);
- HDfprintf(output, "rank %d: Number of files=%Hd\n", rank,
- (long long)opts->num_files);
- HDfprintf(output, "rank %d: Number of datasets=%Hd\n", rank,
- (long long)opts->num_dsets);
- HDfprintf(output, "rank %d: Number of iterations=%Hd\n", rank,
- (long long)opts->num_iters);
+ HDfprintf(output, "rank %d: Number of files=%ld\n", rank,
+ opts->num_files);
+ HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank,
+ opts->num_dsets);
+ HDfprintf(output, "rank %d: Number of iterations=%d\n", rank,
+ opts->num_iters);
HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank,
opts->min_num_procs, opts->max_num_procs);