]> sourceware.org Git - systemtap.git/commitdiff
runtime: adapt to -Werror=implicit-fallthrough=5, dyninst runtime
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 26 Jul 2021 02:35:59 +0000 (22:35 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 26 Jul 2021 02:35:59 +0000 (22:35 -0400)
The runtime/dyninst/runtime.h also needs a fallthrough macro def'n.

runtime/dyninst/runtime.h

index 9e61ef50b7ec8121bb18dc2906ab7c631aafa36f..6f028e27dfcceae2d9b2aea0f33b961ba8c25dde 100644 (file)
@@ -389,4 +389,20 @@ static void stp_dyninst_dtor(void)
     _stp_copy_destroy();
 }
 
+
+/* A fallthrough; macro to let the runtime survive -Wimplicit-fallthrough=5 */
+/* from <linux/compiler_attribute.h> */
+#ifndef fallthrough
+#if __GNUC__ < 5
+# define fallthrough                    do {} while (0)  /* fallthrough */
+#else
+#if __has_attribute(__fallthrough__)
+# define fallthrough                    __attribute__((__fallthrough__))
+#else
+# define fallthrough                    do {} while (0)  /* fallthrough */
+#endif
+#endif
+#endif
+
+
 #endif /* _STAPDYN_RUNTIME_H_ */
This page took 0.028295 seconds and 5 git commands to generate.