Whamcloud - gitweb
LU-15492 build: fallthrough macro for pre/post gcc-7
[fs/lustre-release.git] / lustre / include / lustre / lustreapi.h
index 0284da0..caaa780 100644 (file)
@@ -62,7 +62,11 @@ extern "C" {
 #endif
 
 #ifndef fallthrough
-#define fallthrough do {} while (0)  /* fallthrough */
+# if defined(__GNUC__) && __GNUC__ >= 7
+#  define fallthrough  __attribute__((fallthrough)) /* fallthrough */
+# else
+#  define fallthrough do {} while (0)  /* fallthrough */
+# endif
 #endif
 
 typedef struct statx lstatx_t;
@@ -1106,6 +1110,7 @@ static const struct comp_flag_name {
        { LCME_FL_OFFLINE,      "offline" },
        { LCME_FL_NOSYNC,       "nosync" },
        { LCME_FL_EXTENSION,    "extension" },
+       { LCME_FL_PARITY,       "parity" },
 };
 
 /**