summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2019-06-24 21:29:40 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2019-06-24 21:29:40 (GMT)
commit7db3060e76733a0c5408f56a25f2cd52e2bd847b (patch)
treefdd53eacd7a99ea8eb1007c664f1817e6be32e47
parent7485981bcabfeb09ced49b840bf828c00816157a (diff)
parente35effff7da40fa8b0dda273be9bbdfa9c8c3624 (diff)
downloadhdf5-7db3060e76733a0c5408f56a25f2cd52e2bd847b.zip
hdf5-7db3060e76733a0c5408f56a25f2cd52e2bd847b.tar.gz
hdf5-7db3060e76733a0c5408f56a25f2cd52e2bd847b.tar.bz2
Merge pull request #9 in ~VCHOI/my_third_fork from develop to bugfix/new_shutdown_fsm
* commit 'e35effff7da40fa8b0dda273be9bbdfa9c8c3624': Move pragma statements outside of routines, to make older compilers happy.
-rw-r--r--src/H5Tnative.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index f40d81b..d213c45 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -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
/*-------------------------------------------------------------------------