summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-08-08 21:29:57 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-08-08 21:29:57 (GMT)
commitc56509b490d6834340dedcd3120893028ccb6e8c (patch)
tree0022dc98a7619d1bdce869760f101a079d82e6b9
parent0ce619b92d23416408b378f4971c83724c048340 (diff)
downloadhdf5-c56509b490d6834340dedcd3120893028ccb6e8c.zip
hdf5-c56509b490d6834340dedcd3120893028ccb6e8c.tar.gz
hdf5-c56509b490d6834340dedcd3120893028ccb6e8c.tar.bz2
Added gcc conditional for __attribute__((fallthrough)), removes 34 warnings on theta (10% of warnings).
-rw-r--r--src/H5private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 86cd615..00b7a07 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -317,8 +317,12 @@
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
# define H5_ATTR_PURE __attribute__((pure))
+#if defined(__GNUC__) && __GNUC__ >= 7
# define H5_ATTR_FALLTHROUGH __attribute__((fallthrough));
#else
+# define H5_ATTR_FALLTHROUGH /*void*/
+#endif
+#else
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
# define H5_ATTR_UNUSED /*void*/
# define H5_ATTR_NORETURN /*void*/