summaryrefslogtreecommitdiffstats
path: root/perform/sio_perf.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-07-08 14:04:23 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-07-08 14:04:23 (GMT)
commit38bdc241ed4f62c9d628de563f6f98f3dda6281c (patch)
tree61fc02af6d14212eb8917d31e118b6c61aa9dec9 /perform/sio_perf.c
parent55de59d03430cd3804905e0dbeade08308da48e7 (diff)
downloadhdf5-38bdc241ed4f62c9d628de563f6f98f3dda6281c.zip
hdf5-38bdc241ed4f62c9d628de563f6f98f3dda6281c.tar.gz
hdf5-38bdc241ed4f62c9d628de563f6f98f3dda6281c.tar.bz2
[svn-r23868] bring r 23862 from trunk:
Change printfs in perform output and h5dump to prevent overflow. This fixes: https://jira.hdfgroup.uiuc.edu/browse/HDFFV-8450
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=");