summaryrefslogtreecommitdiffstats
path: root/src/H5FDfamily.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2019-07-10 03:21:33 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2019-07-10 03:21:33 (GMT)
commit22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0 (patch)
tree43f503fea615b405e03863e1befc1c91bd9f65ef /src/H5FDfamily.c
parentc33f2cbf18b4cc0aafedfe2d1cc29ed7730c91f6 (diff)
parent73df02f13c2b1e0b256cdbff1c7c584e84548df4 (diff)
downloadhdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.zip
hdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.tar.gz
hdf5-22d78bdfa4d560a0b8a2dbb547574bfe61bf64f0.tar.bz2
Merge pull request #1788 in HDFFV/hdf5 from ~KOZIOL/hdf5:feature/update_gcc_flags to develop
* commit '73df02f13c2b1e0b256cdbff1c7c584e84548df4': Updates to warnhist script, along with a few cleanups, and add some comments to warning cleanups that are a bit obscure. Cleaned up code that genericizes warning output, and add "-u" option to leave unique types in warnings (i.e. don't genericize output). Also fixed the '-S' option to work correctly. Added GCC9 flags to CMake build Add support for GCC9, update warnhist script, and clean up warnings.
Diffstat (limited to 'src/H5FDfamily.c')
-rw-r--r--src/H5FDfamily.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index c8893f9..bc00403 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -613,6 +613,14 @@ done:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * memb_name & temp in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static H5FD_t *
H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
@@ -763,6 +771,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_open() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
@@ -942,6 +951,14 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() call with
+ * memb_name in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
@@ -1008,6 +1025,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------