summaryrefslogtreecommitdiffstats
path: root/tools/src/h5perf/pio_engine.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2022-06-22 16:16:30 (GMT)
committerGitHub <noreply@github.com>2022-06-22 16:16:30 (GMT)
commit8b2e7b32b5b9987938ebf6936205f324bc5050b8 (patch)
tree17062db1b0521cbe22e759c5083b216ae6c62437 /tools/src/h5perf/pio_engine.c
parent55f4cc0caa69d65c505e926fb7b2568ab1a76c58 (diff)
downloadhdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.zip
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.gz
hdf5-8b2e7b32b5b9987938ebf6936205f324bc5050b8.tar.bz2
Various warning fixes (#1812)
* Fixed -Wreserved-id-macro warnings from header include guards * Removed all __int64 and LL suffix stuff now that C99 is minimum requirement * Rename `H5FD_CTL__` to `H5FD_CTL_` to fix -Wreserved-id-macro warnings Double underscore is reserved in C++ and this public header should be C++ compatible. * Never define __STDC_FORMAT_MACROS anymore Defining it causes a -Wreserved-id-macro. Happily, according to the C++11 standard: "The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++." https://cplusplus.github.io/LWG/issue984 So looks like it's not necessary to define it with reasonably new toolchains. * Fixed some -Wunused-macros warnings, removed dead code * Fixed all -Wdouble-promotion warnings in C++ files * Fixed remaining -Wsuggest-destructor-override warnings * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/src/h5perf/pio_engine.c')
-rw-r--r--tools/src/h5perf/pio_engine.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 1baaca2..9d08938 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -234,7 +234,7 @@ do_pio(parameters param)
}
if ((snbytes % pio_mpi_nprocs_g) != 0) {
HDfprintf(stderr,
- "Dataset size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size (%lld) must be a multiple of the "
"number of processes (%d)\n",
(long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
@@ -243,7 +243,7 @@ do_pio(parameters param)
if (!param.dim2d) {
if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size/process (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)(snbytes / pio_mpi_nprocs_g), buf_size);
GOTOERROR(FAIL);
@@ -252,7 +252,7 @@ do_pio(parameters param)
else {
if (((size_t)snbytes % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset side size (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)snbytes, buf_size);
GOTOERROR(FAIL);
@@ -625,15 +625,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}
@@ -1640,15 +1638,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}