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 /config/cmake | |
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 'config/cmake')
-rw-r--r-- | config/cmake/H5pubconf.h.in | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 9a581cb..4b2d2ee 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -464,9 +464,6 @@ /* Define Fortran Maximum Real Decimal Precision */ #define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ -/* Width for printf() for type `long long' or `__int64', use `ll' */ -#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@ - /* The size of `bool', as computed by sizeof. */ #cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@ @@ -559,8 +556,7 @@ #endif -/* Define size of long long and/or __int64 bit integer type only if the type - exists. */ +/* The size of `long long', as computed by sizeof. */ #if !defined(__APPLE__) #cmakedefine H5_SIZEOF_LONG_LONG @H5_SIZEOF_LONG_LONG@ #else @@ -627,9 +623,6 @@ /* The size of `__float128', as computed by sizeof. */ #define H5_SIZEOF___FLOAT128 @H5_SIZEOF___FLOAT128@ -/* The size of `__int64', as computed by sizeof. */ -#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@ - /* Define if strict file format checks are enabled */ #cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@ |