diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-06-21 15:05:34 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-06-21 15:05:34 (GMT) |
commit | 1ccbdfee589d9f56d71983506313879fa47c4e90 (patch) | |
tree | c1d64e0d77828bcf81dd0e4e4b4e9fda41911582 /src/H5Tnative.c | |
parent | 5fc5d947f084d1ef5d4c4a0bc2be55baa181f0fa (diff) | |
download | hdf5-1ccbdfee589d9f56d71983506313879fa47c4e90.zip hdf5-1ccbdfee589d9f56d71983506313879fa47c4e90.tar.gz hdf5-1ccbdfee589d9f56d71983506313879fa47c4e90.tar.bz2 |
Add support for GCC 7.x warnings, update warnhist script to account for them,
clean up warnings.
Diffstat (limited to 'src/H5Tnative.c')
-rw-r--r-- | src/H5Tnative.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 3554f75..f40d81b 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -551,6 +551,9 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, FUNC_ENTER_STATIC if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) { +/* Disable warning for intentional identical branches here -QAK */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wduplicated-branches" if(prec <= H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_SCHAR_g))) { match = H5T_NATIVE_INT_MATCH_CHAR; native_size = sizeof(char); @@ -570,6 +573,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, match = H5T_NATIVE_INT_MATCH_LLONG; native_size = sizeof(long long); } +#pragma GCC diagnostic pop } else if(direction == H5T_DIR_DESCEND) { if(prec > H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_LONG_g))) { match = H5T_NATIVE_INT_MATCH_LLONG; @@ -694,6 +698,9 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali HDassert(size>0); if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) { +/* Disable warning for intentional identical branches here -QAK */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wduplicated-branches" if(size<=sizeof(float)) { match=H5T_NATIVE_FLOAT_MATCH_FLOAT; native_size = sizeof(float); @@ -717,6 +724,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali native_size = sizeof(double); #endif } +#pragma GCC diagnostic pop } else { #if H5_SIZEOF_LONG_DOUBLE !=0 if(size>sizeof(double)) { @@ -810,6 +818,9 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, FUNC_ENTER_STATIC if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) { +/* Disable warning for intentional identical branches here -QAK */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wduplicated-branches" if(prec<=H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_B8_g))) { tid = H5T_NATIVE_B8; native_size = 1; @@ -831,6 +842,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, native_size = 8; align = H5T_NATIVE_UINT64_ALIGN_g; } +#pragma GCC diagnostic pop } else if(direction == H5T_DIR_DESCEND) { if(prec>H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_B32_g))) { tid = H5T_NATIVE_B64; |