summaryrefslogtreecommitdiffstats
path: root/src
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-09 14:55:33 (GMT)
commit8a0663b93851adc152e38a2bd9607cd1d73bad36 (patch)
treeb78a8ed9427c62176481b0cf1562e1beb9fdb06c /src
parentbe970ccdc253697f2a02d0f909f5cfc47793376e (diff)
downloadhdf5-8a0663b93851adc152e38a2bd9607cd1d73bad36.zip
hdf5-8a0663b93851adc152e38a2bd9607cd1d73bad36.tar.gz
hdf5-8a0663b93851adc152e38a2bd9607cd1d73bad36.tar.bz2
Added gcc conditional for __attribute__((fallthrough)), removes 34 warnings on theta (10% of warnings).
Diffstat (limited to 'src')
-rw-r--r--src/H5private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 06fd06f..a9f1577 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -313,6 +313,11 @@
# 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*/