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 /c++/test/ttypes.cpp | |
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 'c++/test/ttypes.cpp')
-rw-r--r-- | c++/test/ttypes.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 8afb4bb..794820e 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -28,12 +28,6 @@ using namespace H5; #include "h5cpputil.h" // C++ utilility header file /* - * Offset from aligned memory returned by malloc(). This can be used to test - * that type conversions handle non-aligned buffers correctly. - */ -#define ALIGNMENT 1 - -/* * Define if you want to test alignment code on a machine that doesn't * normally require alignment. When set, all native datatypes must be aligned * on a byte boundary equal to the data size. @@ -53,13 +47,6 @@ using namespace H5; const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", "dtypes4.h5", NULL}; -/* - * Count up or down depending on whether the machine is big endian or little - * endian. If local variable `endian' is H5T_ORDER_BE then the result will - * be I, otherwise the result will be Z-(I+1). - */ -#define ENDIAN(Z, I) (H5T_ORDER_BE == endian ? (I) : (Z) - ((I) + 1)) - typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t; typedef enum int_t { |