summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2022-01-28 18:17:53 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2022-01-28 18:19:09 (GMT)
commit8788414eecced2da02a74c3cfcc13d5ee7c4259a (patch)
treecdf753de4aefa7043743f8273b396db3ef21d1d1 /src/H5detect.c
parentccc6bd88b9b0ea26b1fa0a2ca6ae5f2857891cb8 (diff)
downloadhdf5-8788414eecced2da02a74c3cfcc13d5ee7c4259a.zip
hdf5-8788414eecced2da02a74c3cfcc13d5ee7c4259a.tar.gz
hdf5-8788414eecced2da02a74c3cfcc13d5ee7c4259a.tar.bz2
Let the compiler check alignment in H5detect since it does not
purposefully make unaligned accesses any longer. Remove some setjmp(3)-related code.
Diffstat (limited to 'src/H5detect.c')
-rw-r--r--src/H5detect.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/H5detect.c b/src/H5detect.c
index 377dfd4..54435fb 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -49,11 +49,6 @@ static const char *FileHeader = "\n\
#include "H5Tpublic.h"
#include "H5Rpublic.h"
-/* Disable warning about cast increasing the alignment of the target type,
- * that's _exactly_ what this code is probing. -QAK
- */
-H5_GCC_CLANG_DIAG_OFF("cast-align")
-
#if defined(__has_attribute)
#if __has_attribute(no_sanitize_address)
#define HDF_NO_UBSAN __attribute__((no_sanitize_address))
@@ -66,30 +61,6 @@ H5_GCC_CLANG_DIAG_OFF("cast-align")
#define MAXDETECT 64
-/* The ALIGNMENT test code may generate the SIGBUS, SIGSEGV, or SIGILL signals.
- * We use setjmp/longjmp in the signal handlers for recovery. But setjmp/longjmp
- * do not necessary restore the signal blocking status while sigsetjmp/siglongjmp
- * do. If sigsetjmp/siglongjmp are not supported, need to use sigprocmask to
- * unblock the signal before doing longjmp.
- */
-/* Define H5SETJMP/H5LONGJMP depending on if sigsetjmp/siglongjmp are */
-/* supported. */
-#if defined(H5_HAVE_SIGSETJMP) && defined(H5_HAVE_SIGLONGJMP)
-/* Always save blocked signals to be restored by siglongjmp. */
-#define H5JMP_BUF sigjmp_buf
-#define H5SETJMP(buf) HDsigsetjmp(buf, 1)
-#define H5LONGJMP(buf, val) HDsiglongjmp(buf, val)
-#define H5HAVE_SIGJMP /* sigsetjmp/siglongjmp are supported. */
-#else
-#define H5JMP_BUF jmp_buf
-#define H5SETJMP(buf) HDsetjmp(buf)
-#define H5LONGJMP(buf, val) HDlongjmp(buf, val)
-#endif
-
-/* ALIGNMENT and signal-handling status codes */
-#define STA_NoALIGNMENT 0x0001 /* No ALIGNMENT Test */
-#define STA_NoHandlerVerify 0x0002 /* No signal handler Tests */
-
/*
* This structure holds information about a type that
* was detected.