From c56509b490d6834340dedcd3120893028ccb6e8c Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Thu, 8 Aug 2019 16:29:57 -0500 Subject: Added gcc conditional for __attribute__((fallthrough)), removes 34 warnings on theta (10% of warnings). --- src/H5private.h | 4 ++++ 1 file changed, 4 insertions(+) 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*/ -- cgit v0.12