diff options
author | David Young <dyoung@hdfgroup.org> | 2019-12-09 16:30:58 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-12-09 16:30:58 (GMT) |
commit | c8f533cfc33ac743227cbed8eba361c715a2976f (patch) | |
tree | bcae5320f80bac774647cacbbd8493604f9384d2 /src/H5detect.c | |
parent | adcf8a315e82c0848d126e7e46b662930c081896 (diff) | |
download | hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2 |
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and
I share.
Now I need to put this branch on a fork with a less confusing name than
vchoi_fork!
Diffstat (limited to 'src/H5detect.c')
-rw-r--r-- | src/H5detect.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/H5detect.c b/src/H5detect.c index 4424009..d01ee9f 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -46,6 +46,11 @@ 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 + */ +#pragma GCC diagnostic ignored "-Wcast-align" + #if defined(__has_attribute) # if __has_attribute(no_sanitize_address) # define HDF_NO_UBSAN __attribute__((no_sanitize_address)) @@ -102,8 +107,8 @@ typedef struct detected_t { unsigned int comp_align; /* alignment for structure */ } detected_t; -/* This structure holds structure alignment for pointers, hvl_t, hobj_ref_t, - * hdset_reg_ref_t */ +/* This structure holds structure alignment for pointers, vlen and reference + * types. */ typedef struct malign_t { const char *name; unsigned int comp_align; /* alignment for structure */ @@ -378,9 +383,8 @@ precision (detected_t *d) /*------------------------------------------------------------------------- * Function: DETECT_M * - * Purpose: This macro takes only miscellaneous structures or pointer - * (pointer, hvl_t, hobj_ref_t, hdset_reg_ref_t). It - * constructs the names and decides the alignment in structure. + * Purpose: This macro takes only miscellaneous structures or pointer. + * It constructs the names and decides the alignment in structure. * * Return: void *------------------------------------------------------------------------- @@ -756,8 +760,8 @@ H5T__init_native(void)\n\ H5T_native_order_g = H5T_ORDER_%s;\n", "BE"); } - /* Structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */ - fprintf(rawoutstream, "\n /* Structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */\n"); + /* Structure alignment for pointers, vlen and reference types */ + fprintf(rawoutstream, "\n /* Structure alignment for pointers, vlen and reference types */\n"); for(j=0; j<na; j++) fprintf(rawoutstream, " H5T_%s_COMP_ALIGN_g = %lu;\n", misc_align[j].name, (unsigned long)(misc_align[j].comp_align)); @@ -1539,11 +1543,12 @@ detect_C99_floats(void) static void HDF_NO_UBSAN detect_alignments(void) { - /* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */ + /* Detect structure alignment for pointers, vlen and reference types */ DETECT_M(void *, POINTER, m_g[na_g]); na_g++; DETECT_M(hvl_t, HVL, m_g[na_g]); na_g++; DETECT_M(hobj_ref_t, HOBJREF, m_g[na_g]); na_g++; DETECT_M(hdset_reg_ref_t, HDSETREGREF, m_g[na_g]); na_g++; + DETECT_M(H5R_ref_t, REF, m_g[na_g]); na_g++; } |