diff options
author | Sean McBride <sean@rogue-research.com> | 2022-06-22 16:16:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 16:16:30 (GMT) |
commit | 8b2e7b32b5b9987938ebf6936205f324bc5050b8 (patch) | |
tree | 17062db1b0521cbe22e759c5083b216ae6c62437 /src/H5Dcompact.c | |
parent | 55f4cc0caa69d65c505e926fb7b2568ab1a76c58 (diff) | |
download | hdf5-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 'src/H5Dcompact.c')
-rw-r--r-- | src/H5Dcompact.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 92252dc..94dc64d 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -285,7 +285,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "can't get file handle") /* Setup operation flags and arguments */ - op_flags = H5FD_CTL__ROUTE_TO_TERMINAL_VFD_FLAG | H5FD_CTL__FAIL_IF_UNKNOWN_FLAG; + op_flags = H5FD_CTL_ROUTE_TO_TERMINAL_VFD_FLAG | H5FD_CTL_FAIL_IF_UNKNOWN_FLAG; op_args.dstbuf = udata->dstbuf; op_args.dst_off = dst_off; @@ -294,7 +294,7 @@ H5D__compact_iovv_memmanage_cb(hsize_t dst_off, hsize_t src_off, size_t len, voi op_args.len = len; /* Make request to file driver */ - if (H5FD_ctl(file_handle, H5FD_CTL__MEM_COPY, op_flags, &op_args, NULL) < 0) + if (H5FD_ctl(file_handle, H5FD_CTL_MEM_COPY, op_flags, &op_args, NULL) < 0) HGOTO_ERROR(H5E_IO, H5E_FCNTL, FAIL, "VFD memcpy request failed") done: |