mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
Merge pull request #1770 in HDFFV/hdf5 from ~KOZIOL/hdf5:develop to develop
* commit 'cb92adccf61d712ee8c4fcac04c1b297c05ab941': Move pragma statements outside of routines, to make older compilers happy.
This commit is contained in:
commit
e35effff7d
@ -515,6 +515,9 @@ done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_type() */
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_integer
|
||||
@ -551,9 +554,6 @@ 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);
|
||||
@ -573,7 +573,6 @@ 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;
|
||||
@ -659,7 +658,11 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_integer() */
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_float
|
||||
@ -698,9 +701,6 @@ 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);
|
||||
@ -724,7 +724,6 @@ 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)) {
|
||||
@ -788,7 +787,11 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_float() */
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/* Disable warning for intentional identical branches here -QAK */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T__get_native_bitfield
|
||||
@ -818,9 +821,6 @@ 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;
|
||||
@ -842,7 +842,6 @@ 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;
|
||||
@ -878,6 +877,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T__get_native_bitfield() */
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user