summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/HDFTests.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 /config/cmake_ext_mod/HDFTests.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 'config/cmake_ext_mod/HDFTests.c')
-rw-r--r--config/cmake_ext_mod/HDFTests.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 2b2a202..16686ba 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -80,54 +80,6 @@ SIMPLE_TEST(timezone=0);
#endif /* HAVE_TIMEZONE */
-#ifdef PRINTF_LL_WIDTH
-
-#ifdef HAVE_LONG_LONG
-# define LL_TYPE long long
-#else /* HAVE_LONG_LONG */
-# define LL_TYPE __int64
-#endif /* HAVE_LONG_LONG */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(_MSC_VER) && defined(_DEBUG)
-# include <crtdbg.h>
-int DebugReport(int reportType, char* message, int* returnValue)
-{
- (void)reportType;
- (void)message;
- (void)returnValue;
- return 1; /* no further handling required */
-}
-#endif
-
-int main(void)
-{
- char *llwidthArgs[] = { "I64", "l64", "ll", "l", "L", "q", NULL };
- char *s = malloc(128);
- char **currentArg = NULL;
- LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
- #if defined(_MSC_VER) && defined(_DEBUG)
- _CrtSetReportHook(DebugReport);
- #endif
- for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++)
- {
- char formatString[64];
- snprintf(formatString, sizeof(formatString), "%%%sd", *currentArg);
- snprintf(s, 128, formatString, x);
- if (strcmp(s, "1099511627776") == 0)
- {
- printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg);
- return 0;
- }
- }
- return 1;
-}
-
-#endif /* PRINTF_LL_WIDTH */
-
#ifdef SYSTEM_SCOPE_THREADS
#include <stdlib.h>
#include <pthread.h>