summaryrefslogtreecommitdiffstats
path: root/perform/sio_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/sio_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/sio_perf.c')
-rw-r--r--perform/sio_perf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/perform/sio_perf.c b/perform/sio_perf.c
index 16e1750..5c09e84 100644
--- a/perform/sio_perf.c
+++ b/perform/sio_perf.c
@@ -827,14 +827,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);
}
}
@@ -860,8 +860,8 @@ report_parameters(struct options *opts)
HDfprintf(output, "IO API=");
print_io_api(opts->io_types);
- HDfprintf(output, "Number of iterations=%Hd\n",
- (long long)opts->num_iters);
+ HDfprintf(output, "Number of iterations=%d\n",
+ opts->num_iters);
HDfprintf(output, "Dataset size=");